Repository navigation
A base branch with too many review_exclude_paths patterns no longer stops every /ship (GST-3399) - #4637
Merged
Conversation
…ops every /ship (GST-3399) When every error in the base policy is in review_exclude_paths or review_content_patterns, readers of the base set both keys aside (every file reviewed) and apply the rest; the plan warns, the receipt records review_exclude_fallback, and validate still reports the list. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…LAN_TIMEOUT_MS Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…he receipt records it gstack-ship-policy show-effective now reports such a base valid with its other keys and prints the fallback warning; only validate keeps the list's errors. Tests cover show-effective and the receipt's review_exclude_fallback record at write and carry. (GST-3399) Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/specialist-batched#1 reader=testing Review-Finding: lib/ship-receipt-depth.ts:69:stale-comment reader=core Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… exclusion list 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.
When the base branch's ship policy fails only because of its
review_exclude_pathsorreview_content_patternslist (for example 65 patterns, one over the limit of 64), /ship now reviews every file instead of stopping.Why: harness-evals main went to 65 patterns, and every /ship there stopped with POLICY_INVALID, including the PR that shortens the list.
Nothing to do: the plan prints a
REVIEW_EXCLUDE: fallback (WARNING: ...)line naming the error and the fix, andgstack-ship-policy validatestill reports the list.What changed
On a base whose exclusion list has 65 patterns, the review plan used to refuse; it now reviews every file and prints the fallback warning.
Before/after as text: On a base whose exclusion list has 65 patterns, the review plan used to refuse; it now reviews every file and prints the fallback warning
A repository whose base policy had one pattern too many could not ship anything, not even the fix for the list. Now, when every error in the base's
.gstack/ship-policy.jsonis inreview_exclude_pathsorreview_content_patterns, the policy loader drops both keys and applies the rest of the committed policy, so every file is reviewed and the readers'forbid_paths,forbid_fetchandreviewsettings still apply. Falling back to the built-in defaults would have dropped those, which would be looser. Any other error, invalid JSON or an unreadable base still refuses, and a branch's own policy never counts before it lands.gstack-review-planprints the fallback line on stdout and stderr, and--jsoncarriesreview_exclude: { state: "fallback", source, errors }.review_exclude_fallback, and the merge step and pre-merge checks read the base the same way.gstack-ship-policy show-effective(the /ship policy line and the version check in /land-and-deploy) now reports such a base as valid with its other keys and prints the same warning; onlyvalidatestill reports the list as invalid.MAX_LIST, v1.91.73.0 feat(ship): repo ship policy,gstack-restampstamp-at-merge, tree receipt, evidence bundle, ship receipt (multi-agent wave C-stamp) #3118), whichreview_exclude_pathsadopted in v1.93.33.0 wave(review): #3705 #3744 #3745 #3764 #3765 #3795 #3852.REVIEW_PLAN_STOPPED's fix text now tells large repositories to setGSTACK_REVIEW_PLAN_TIMEOUT_MS(the follow-up from Large repos can raise the review-plan time limit for every /ship step (GST-3398) #4632's review).Why
"Every plan there refused POLICY_INVALID, the PR that shortens the list included." A bad exclusion list on the base deadlocked the repository. Now the list is set aside loudly, review gets wider rather than narrower, and the PR that fixes the list can be reviewed and land.
Blast radius
The change reaches every reader of the base policy. That means the review plan, the record /ship writes, the merge step, the pre-merge checks and
show-effective. It is safe because only the two exclusion keys are dropped and both only remove files from review, so the fallback can never review less than the committed policy. A /ship record from a review that left a PR file out is also refused when it is re-checked after a base merge (walked in tests:test/review-exclude-base-fallback.test.ts,test/review-exclude.test.ts, and a QA run on a 65-pattern repository).Test Coverage
Coverage audit (audit-only): 9 of 14 changed paths tested before the fix round. The two gaps that mattered, the
review_exclude_fallbackrecord /ship writes and its re-check after a base merge, andshow-effectiveon a set-aside base, now have tests. Remaining gaps: the REVIEW_DIFF_TOO_LARGE fix text under a set-aside list, and theREVIEW_PLAN_STOPPEDfix sentence (static text).Tests ran: targeted 107
Tests ran: free 1734 (files, taken from CI run 44959954725)
Pre-Landing Review
Two full passes and one fix round. Pass 1 (specialists, a second reader for missed issues) found three informational items and one stale comment: two were fixed in 83611fd (one security-category finding, details recorded privately; the missing test for the merge-step record), the comment was moved back, and one wording item (security-category finding, details recorded privately) was left as a note. Pass 2 on the fix range found nothing. The adversarial reader found three low notes below; the second-model review returned CLEAN.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
bin/gstack-ship-policy:96p2/adversarial-native#1bin/gstack-ship-policy:95p2/adversarial-native#2bin/gstack-ship-policy:95p2/adversarial-native#3Exploratory QA
Smoke on a scratch repository whose main holds 65 patterns:
gstack-review-planrefused POLICY_INVALID with the main-branch build and planned with the fallback line on this branch;show-effectiveexited 1 with valid:false before the fix and reports valid withqueue_modeafter;validate --policy-from basestill reports POLICY_INVALID. No checks blocked or not run.Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Scope Drift
Scope Check: CLEAN
Plan Completion
Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). This is a bug fix exempt from planning.
TODOS
No TODO items completed in this PR.
Documentation
Status: updated. One factual correction to docs/ship-policy.md; no blockers.
Scope: base c8641cc to head 83611fd on base-policy-exclusion-fallback. That is 15 committed files (the review-plan, ship-policy and ship-record commands, review-exclude, ship-policy loader, ship record schema, result codes, tests). Nothing was staged, unstaged or untracked.
Documentation health:
gstack-ship-policy show-effectiveamong the steps that read the base policy the same way, and says it prints the same warning on stderr.Coverage debt: the new
REVIEW_EXCLUDE: fallbackstate, thereview_exclude_fallbackfield in the ship record and--jsonreview_exclude.state: "fallback"have reference and how-to coverage (ship-policy.md, troubleshooting.md). There is no gap.Diagram drift: none.
Tests
bun test test/review-exclude-base-fallback.test.ts test/review-exclude.test.ts test/review-dispatch-plan-timeout.test.ts test/gstack-ship-policy.test.ts test/headless-artifacts.test.ts: 107 passedbun run test(CI free-tests run 44959954725): 1734 files passedbun run typecheck, module-size ratchet: passedAgent notes
Agent notes
Refs GST-3399 (from HARN-109; harness-evals main reached 65 patterns at 0bbbac28, #536). This follows the owner's ruling as relayed: an invalid base never reads the head's policy, and the fallback is loud and recorded. One deliberate narrowing: the ruling said "fall back to the built-in default policy", but that would drop the base's readers forbid rules and review settings, so only the exclusion keys are set aside, and any other error still refuses.
Approvals
No approvals recorded for branch base-policy-exclusion-fallback.
Plan: exempt: bug fix GST-3399 under the GSTA-36 ruling
Plan check: exempt bug fix
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=3 fixed=3 scope=frozen ledgers_read=3 dispatches=8
Gate edits: none detected (8 listed, 5 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)