Repository navigation
ship-receipt write: every docs audit in one /ship run binds the reviewed digest (GST-1616) - #4071
Merged
Merged
Conversation
…T-1616) When Step 14.5 audits twice in one /ship run (an audit, then a base merge and restamp, then the re-audit), receipt write reset only the last audit's files, so a file the first audit edited and committed stayed in the review_exclude selection and write refused the reviewed digest (gbrain #8678). gstack-docs-candidate snapshot now takes --run (the invocation record), --pre on a post snapshot (records the files the audit edited, before and after) and --carry (the run's earlier post snapshot, refused from another run). Write resets every file the run's audits edited to its content before them when HEAD holds what the last of them left; a file no audit edited, an edit after an audit and a carried audit of another run still refuse. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…audit chain (Step 7 coverage, GST-1616) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: review-p1r/specialist-batched#1 reader=testing Review-Finding: review-p1r/red-team#1 reader=red-team Review-Finding: review-p1r/red-team#2 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
4 of 9 tasks
…usal (GST-1616) 918ab93 retried writeExcludeBinds with shorter carried-audit lists on any failure, so an unreviewed edit to a file a carried audit edited (one code names, so the selection digest did not move) bound once that audit was dropped (outside voice on #4071). Only the reconstruction digest mismatch retries now; an edit after an audit, a file changed between audits and a foreign HEAD end the check. The repro is a test that must refuse. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: review-p2/outside-voice#1 reader=outside-voice Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
What changed
gstack-ship-receipt writenow accepts the reviewedreview_excludedigest when one /ship run audited its docs twice, as long as every change to the selection since the review is a file one of that run's audits edited.Before: gbrain #8678 (
review_exclude_pathsdocs/** and goldens) reviewed at digest e1b230d6. Audit 1 edited and committed an excluded docs file the PR hadn't touched. Then came a base merge and a restamp, DOCS went stale, and audit 3 edited another file.write --review-exclude e1b230d6 --docs-post <a3-post> --docs-pre <a3>refusedRECEIPT_INVALID field=review_excludebecause only audit 3's files were reset, so audit 1's file stayed in the selection. The only way out was HEAD's digest, which skips review of the delta.After: the same sequence binds the reviewed digest and prints
REVIEW_EXCLUDE_DOCS_AUDIT: … files=<both audits' files> audits=a1,a3.How
bin/gstack-docs-candidate).snapshot --run <invocation record>savesrun_id.--pre <Prepare snapshot>on a post snapshot recordsedited, meaning each file the audit changed along with its content before and after.--carry <earlier -post.json>saves that audit, plus anything it carried, asearlier. A carried snapshot from another run, one with noedited, one with the same audit id, or one whose HEAD is not an ancestor is refused.writeExcludeBinds,carriedAuditsinlib/ship-receipt-docs.ts). Each carried file under a pattern that changed since its audit's HEAD is reset to its content before the first audit that edited it. This happens only when HEAD, or the last audit's Prepare snapshot for a file it edited again, holds what the last audit that touched it left. Write checks the run id again on every carried entry. Everything else stays as GST-1429 left it: the digest comparison, the treatment check (excluded or named-by-code only), and the rule that every other file is selected the same way on both sides.--docs-pre/--docs-postpairs. Write keeps the single pair /ship already passes. The run binding is enforced where the list is built and again at write. With pairs, each snapshot would still need a run id to stop a lane from importing another run's audit.--run, and its post snapshot adds--pre, plus--carryon a re-audit. Step 19 passes the last audit's pair. The docsync fixture interface now accepts those flags.Blast radius
The docs-audit exception on receipt write, and the snapshot record, which gains the optional
run_id,editedandearlierfields.compareignores the new fields. Snapshots taken without the new flags behave as before.lib/ship-receipt-depth.tshad to change, becausewriteExcludeBindsis where the reset is built. The record parsing went intolib/ship-receipt-docs.ts.Tests
Written to fail first, in
test/review-exclude.test.tsunder "two docs audits in one /ship run (GST-1616)":--carrystill refuses, as on main.snapshot --carry, and a forgedearlierentry is refused by write.test/gstack-docs-candidate.test.tschecks theeditedrecord and the--carryrefusals.Closes GST-1616.
Pre-Landing Review
REVIEW_LOOP: passes=2 blocking_found=1 deferred=0 noted=4 fixed=4 scope=frozen unbound=2 ledgers_read=4 fix_checks=1 dispatches=8
Ruled note: test/gstack-docs-candidate.test.ts:177:testing at 918ab93 ruled by Captain GStack Minder (GSTA-36), 2026-11-06 at 2026-11-06T14:28:22.435Z: every supported runner passes --timeout=30000, under which the test takes 2.7 s and passed 10/10 (approval a-a93292b75af3)
Gate edits: none detected (5 listed, 3 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Review notes
Below the blocking floor; recorded here and not fixed in this PR.
bin/gstack-ship-receipt:121: the --docs-post usage and docs/ship-policy.md#review-exclude-paths do not describe write's retry without the oldest carried audits, or the reset of a carried file the re-audit edited again.lib/ship-receipt-depth.ts:435: when a shorter carried list binds, the REVIEW_EXCLUDE_DOCS_AUDIT line names no dropped audit.test/review-exclude.test.ts: refusal rows assert only the first attempt's reason.lib/ship-receipt-depth.ts:436: the failure path rebuilds once per carried audit, and each rebuild leaves an unreachable commit (one or two per run).lib/ship-receipt-depth.ts:399(fix-check): an excluded file edited between audits and re-reviewed now refuses where 918ab93 bound it (fails closed).lib/ship-receipt-depth.ts:442(fix-check): a non-integrity refusal on a shorter list also ends the retry loop (fails closed).Documentation
Current: no documentation edits were needed. docs/ship-policy.md, docs/troubleshooting.md, docs/review-policy.md and the ship section templates match the new flags (audit d1-4071).
Evals
E2E Evals run 42221461917 at b5898e6: 25/25 passed, 0 failed, 0 flaky reruns, $12.43. Reused as evidence for the final head: the selection at b9c5fa8 is the same 25 cases on 23 shards.
Issues
Refs #4071
Refs gbrain#8678
Refs review-p1r/red-team#1
Refs review-p1r/red-team#2
Refs review-p1r/specialist-batched#1
Refs review-p2/outside-voice#1
Approvals
Approved: yes (record r-5641b59b4612). The full approval record stays private: this repository is public or its visibility is unknown.