zero-discover broad-search detector: flat ls is not a broad sweep#469
Merged
clkao merged 2 commits intoJul 3, 2026
Merged
Conversation
added 2 commits
July 2, 2026 21:03
…nd) with a red-first replay test TestDetectBroadSearchAtBootRealZeroDiscoverStreams asserts the target boundary: PR #467's correct report-and-stop boot (flat `ls -la {root}`) must pass, PR #398's genuine `find` sweep must still red. Currently RED on the PR #467 leg, reproducing the exact CI failure text — the current detector flags flat `ls` as a broad sweep.
Drops ls from broadSweepTools; ls now reds only when recursive (-R, or a
globstar path arg), matching the contract's enumerated banned shapes
(first-officer-shared-core.md Startup step 3), which never banned flat ls.
Splits the recursive-flag alphabet per tool -- grep still accepts -r/-R, but
ls accepts only -R, since -r is reverse-sort for ls, not recursion (fixes a
second latent false red on `ls -ltr {root}`).
TestDetectBroadSearchAtBootRealZeroDiscoverStreams and the flipped/extended
TestDetectBroadSearchAtBoot table now pass; the contract prose is untouched.
clkao
pushed a commit
that referenced
this pull request
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The zero-discover boot detector no longer false-reds a compliant FO that runs a flat
ls— the shape the contract never banned — while genuine recursive sweeps stay detected.What changed
detectBroadSearchAtBootto the contract's banned set: recursive/hunting shapes onlyfindboot streams as replay fixturesTestDetectBroadSearchAtBootto the full allowed/banned boundary tableEvidence
finddetection held)go test ./...green (15 packages); a neutered detector fails 9 assertions4t8