Skip to main content

scan_within

Function scan_within 

Source
async fn scan_within<S: BuildHasher>(
    cwd: &Path,
    env: &HashMap<String, String, S>,
    prev: Option<&GitDiffSnapshot>,
    base: Option<&str>,
    pr_refresh: PrRefresh,
    kick: bool,
    budget: Duration,
) -> GitDiffSnapshot
Expand description

scan with the scan’s command budget spelled: the shell gives every child a scan spawns the 10 s COMMAND_TIMEOUT, and a test gives them one of its own.

The budget is a bound on the machine, not on the scan’s work: it is spent starting each child, so a machine can hold a child’s first output past the shell’s 10 s and fail or blank a layer that is merely slow - measured 2026-10-14: the PR lookup’s gh child was killed at 10.5 s and 10.9 s while a gate ran beside the suite, and a gh held back 11 s reproduces it on demand, the same mechanism that reds a scan whose git child stalls. A test that inherits the shell’s budget goes red over a stall that is no part of what it pins.