Repository navigation
perf(guards): prefilter clean-room candidate files - #1535
Conversation
Role review
|
overtrue
left a comment
There was a problem hiding this comment.
Reviewed head b4864d8. Build guard self-test 5 fails its unchanged scanner-process ceiling: 19 observed, 12 allowed. The job completed every assigned case (7 of 35 in group 5/5, exactly once) in 24 of 380 seconds. The Test aggregate failure is downstream; this is not a timeout or a main failure.
The fixed-word prefilter selects 575 tracked files in an independent local check. Scanning them in groups of 64 adds enough scanner processes to reproduce the exact 19-versus-12 failure. Keep the existing ceiling and coverage; reduce batching overhead instead.
The originating session already has an unpublished byte-bounded batching repair and is running its commit gates. An independent snapshot check of that candidate used 11/12 scanner processes and passed all 12 focused allowance tests. Removing the final candidate-batch scan made its new rejection test fail as intended; restoring it passed again. These are candidate-source observations, not CI acceptance of this published head or an independent full workspace gate. No alternative commit or CI rerun was published by this review session.
Role Verdicts
- simplicity-adversary: scripts/check_no_minio_source.sh:218 — the new 64-file tracked-candidate batches exceed the existing scanner-process ceiling on the repository corpus.
overtrue
left a comment
There was a problem hiding this comment.
Reviewed the batching repair on head 2d2dc16 against the previously reviewed head. Both changed files are byte-for-byte identical to the candidate snapshot independently checked in the previous review: 11/12 scanner processes, 12 passing allowance tests, and a failing final-batch omission mutation followed by a passing restoration. The unchanged ceiling, full expression, extra-file scans, failure propagation and assigned case census are preserved. No additional actionable finding in this delta.
The author records a fresh ordered local gate and complete verifier. I have not independently repeated that workspace gate. The serial verifier's reported aggregate duration is separate from its individually bounded stages and from CI wall time. Current remote checks are still running; this review does not declare CI acceptance or authorize bypassing them.
Role Verdicts
- simplicity-adversary: attacked bounded argument accumulation, final-batch reachability, scanner error propagation, unchanged process ceiling, and prefilter coverage — no break found.
Summary
The clean-room provenance guard repeatedly applies a costly regular expression to the tracked tree during its mutation suite. First select candidate files using fixed words that every branch of the expression requires, then apply the original expression to those candidates. Untracked files and tracked symlink targets retain their original scan. Command failures remain failures.
Related to #1465. This improves one measured cost; it does not establish the cause of the earlier incomplete guard census.
Verification
The full verifier exited zero but its reported 642.35 seconds exceeds the documented 600-second whole-command feedback target. The two phase budgets passed separately. The 1983-case guard census independently passed on both baseline and an earlier candidate, in 321.35 and 297.99 seconds respectively; other work overlapped both runs, so that difference is not a controlled causal estimate. Three direct baseline guard timings were 2.90, 3.76 and 3.67 seconds; three final candidate timings were 1.89, 1.76 and 1.84 seconds on this host.
The first workspace run failed one socket observation, which reported reset instead of closed, and one corpus test reporting cases c-h2-0019 and c-h2-0020 as regressions. Each corresponding focused test passed on the original main scripts; their causes remain unknown. The unchanged complete workspace gate then passed on the candidate.
The first CI run failed Build guard self-test 5 because the original 64-file batches spawned 19 scanner processes against the existing ceiling of 12. The final candidate uses argument-size-bounded batches: the exact local group 5 control reported 11/12 scanner processes and all seven cases passed. A 601-file test detected a deliberately omitted final batch.
The new controls caught independent removal of each of the four fixed-word alternatives, suppression of a failed prefilter, and alterations to the licence, origin and prefilter-failure diagnostics. The original full expression and existing tests remain intact.
Role Verdicts
Breaking Change
Checklist
cargo xtask verify)went red. The PR description names which ones
BREAKINGand a migration pathunsafeintroducedinventory/linkmeintroduced#[non_exhaustive]added to a DTO