Repository navigation
Review exclusions stay in place when the repo's own policy test pins an excluded path (GST-3512) - #4699
Merged
Conversation
…s an excluded path (GST-3512) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Only quoted array entries in the exclusion's contract test are exempt; a quoted call argument, object value or constant still keeps the file. Review-Finding: p1/specialist-batched#1 reader=security Review-Finding: p1/specialist-batched#2 reader=testing Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…comments Only a quoted array entry that is itself a base-policy review_exclude_paths pattern is exempt; the bracket scan now skips strings and comments. Review-Finding: p2/outside-voice#1 reader=outside-voice Review-Finding: p2/outside-voice#2 reader=outside-voice Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
3 tasks done
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.
An excluded data file no longer comes back into review just because the repo's own test for
review_exclude_pathspins that exact path in its pattern list.Results PRs that exclude a single data file and pin the list in a test now stay under the reader limit; code that reads the file, and example paths the test checks against the patterns, still keep it in review.
What changed
lib/review-exclude.ts: a test file that namesreview_exclude_pathsno longer keeps a path as named-by-code when the path is itself one of the base policy'sreview_exclude_pathspatterns and every mention of it in that file is a whole quoted array entry ('p',"p"or a backtick string). The bracket scan now reads forward and skips other strings and comments (#comments too in.pyfiles), so a bracket inside a comment or string no longer changes the answer.test.eachtables,for…oflists).docs/ship-policy.md: the named-by-code row says the same. Changelog fragment added.Why
A results PR (GEVA-569) stayed at about 4.8 MB in review because its policy test pinned
PATTERNS, which lists the literal path of a largesessions.jsonl. That one quoted pin kept the excluded file in every reader's diff.Blast radius
Only the named-by-code keep rule in
lib/review-exclude.tschanges, and only for test files that namereview_exclude_paths; every other file and keep reason reads as before. The new tests fail against the previous rule and pass now, and the negative-control test (code, another test, call argument, object value, joined path) keeps all six files (test/review-exclude-contract-test.test.ts, run in CI at this head).Pre-Landing Review
Two review passes and one granted follow-up read of the fix. Pass 2's second-model review found two blocking gaps in the first version (an iterated example array was exempt, and the bracket scan counted brackets inside strings and comments); both are fixed here, with a failing-first test row for each, and the follow-up read found the fix clean apart from one informational note below.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
sf-6db6d23b3421security finding, details recorded privately.pypolicy test, Python's floor division//is read as a comment start, so a list using//can leave a bracket open and a later top-level string equal to a single-file pattern reads as an array entry. Follow-up.for p in ['wiki/b2/sessions.jsonl']: open(p)) still leaves that file out of review; the rule matches the pinned list by text and cannot tell a pin from a fixture with the same exact path.Documentation
Status: current. The audit found no needed edits and no blockers.
Scope: base 3cff6a4 to head 0a793acb (four commits; nothing staged, unstaged or untracked). Changed files:
lib/review-exclude.ts(the review exclusion's own contract test no longer counts as code that names an excluded file),test/review-exclude-contract-test.test.ts,docs/ship-policy.md(thenamed-by-coderow) and a changelog fragment. Docs checked against the code:docs/ship-policy.md(thereview_exclude_pathskey row, the keep-reason table, the name-scan paragraphs and the declared-content rules),docs/review-policy.md(what readers read underreview_exclude_paths, and the list of files it maps to code),docs/troubleshooting.md(REVIEW_EXCLUDE_KEEP_TOO_LARGE), README.md and CLAUDE.md.Result: The new
named-by-coderow matchescontractExampleandarrayEntries. Only test files are exempt, and only when the file containsreview_exclude_paths, the path exactly equals one of the base policy's patterns, and every place the path appears is a whole quoted entry inside an array; the scan skips past other strings and comments. A call argument, an object value, a constant, a joined or prefixed path, or a mention in a comment still keeps the file in review.Documentation health:
Documentation debt: none. Reference coverage for the refined exclusion is the
docs/ship-policy.mdrow, which also gives the reason for the rule. No how-to or tutorial is needed for an internal review-scoping rule.Diagram drift: none. No architecture diagram names
lib/review-exclude.ts.Tests
bun test test/review-exclude-contract-test.test.ts test/review-exclude.test.ts test/module-size-ratchet.test.ts test/review-exclude-vendored.test.ts: green, 72 tests with no failureslib/review-exclude.tsand the new tests, 3 of 4 contract-test cases failbun run typecheck: clean; trial merge with Review and ship tools: read Codex numbered severities, check Remote Control sessions, see every worktree #4681: clean, typecheck clean, review-exclude tests green (56 tests)Agent notes
GST-3512, relayed by GEVA-2 from GEVA-569. Their tests/ci/review-exclude-policy.test.ts pins PATTERNS including the literal wiki/board/.../sessions.jsonl; that pin no longer keeps the file. Their quick/laneb/arms/manifests/b2/*.files.tsv hits and any example arrays of non-pattern paths still keep files.
REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=4 fixed=4 scope=frozen fix_checks=1 dispatches=6
Gate edits: none detected (GATE_SCAN tagged=0 at 7dabdad)
Second-model review: completed (openai/gpt-6.2-sol); 2 blocking findings fixed under grant a-9c520e4373a1.
Fix-check row reused evidence: the reader's prompt was re-rendered byte-identical (sha256 cd170debfc86) at tree 43ff01d2b229 under a fresh token, because the first token predated the fix commit.
Approvals
Approved: yes (record r-0313babb8c21). The full approval record stays private.
Plan: exempt: bug fix (GST-3512 repro on main 3cff6a4)
Plan check: exempt bug fix