Repository navigation
Pull requests that merged a release reuse their earlier test run when the release only regenerated a declared file (GST-3067) - #4483
Merged
capy-ai[bot] merged 2 commits intoNov 19, 2026
Conversation
… the release only regenerated a declared file (GST-3067) A file the repo lists under release_outputs is judged by the release-output rule, and the clear command reruns the release tool under --allow-repo-commands through the same helper as the tree comparison. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…GST-3067) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
capy-ai Bot
added a commit
that referenced
this pull request
Nov 19, 2026
- `gstack-artifact validate` no longer passes a run.json that gstack-autoplan never wrote. (#4494) - /ship's changed-number check no longer stops on tests that only share a word with the change (#4478). (#4496) - On Capy, /ship no longer edits or comments on pull requests as you. (#4518) - The destructive-command check stops asking about scratch deletes and catches the real damage it used to miss. (#4513) - The destructive-command check reads commands more carefully, closing gaps found after the last release. (#4525) - The Codex readiness check and the second-model review now pick the same model for a custom Codex provider (GST-3089). (#4491) - gstack's Codex hooks work when your Codex folder's path has a `(`, `&` or other shell character in it. (#4528) - Uninstalling gstack keeps your own Codex hooks trusted. (#4528) - Codex hook setup matches Codex more closely. (#4528) - On Windows, setup copies the Claude Code hook code that gstack's Codex hooks import (#4528) - /review's checklist on Codex reads shell commands more carefully. (#4528) - On Codex, gstack now suggests the right skill for a prompt and stops destructive commands before they run. (#4512) - On Codex, /review is now held once when it tries to finish without its adversarial pass or its report, as it already is on Claude Code. (#4522) - On Codex, gstack's skill suggestion now names the skill the way Codex lists it. (#4523) - On Codex, gstack's suggested prompts and docs now name skills the way Codex lists them. (#4524) - /review on Codex with gpt-6.1-sol is no longer held back for a second-model pass it already ran. (#4526) - On Codex, office-hours, plan-design-review and gstack-upgrade work again when you name them. (#4510) - gstack knows when Codex is running unattended. (#4510) - Codex reviewers start with a clean context. (#4510) - Docs no longer say Codex has no hook support. (#4510) - A command whose output was cut off no longer counts as a finished read. (#4492) - A folder marked as published data can no longer hide source code or agent files from /ship's review. (#4516) - Correction to the on-by-default helper hooks entry: the hook still routes only to /review, /qa and /verify, so skills you've installed yourself aren't suggested yet. With gstack's skills it routes 14 of 60 real bug reports (was 17), and long prompts are no longer skipped. (#4505) - /sync-gbrain's read check now works when the first page in your code source is over 64 KB. (#4497) - Free-suite CI no longer fails before any test runs when Ubuntu's package mirror is slow. (#4530) - Syncing a second repo no longer makes the first one ask for /sync-gbrain again. (#4532) - gstack's helper hooks are now on by default in Claude Code, OpenClaw and Hermes, and the prompt-routing hook fires on real bug reports. (#4503) - `gstack-pregate clear --receipt` accepts a remote gate run from before a merged release when the release only regenerated a declared release output. (#4483) - The second-model review now keeps the reviewer's own result, and reports a used-up budget as a budget stop. (#4515) - When the reviewer wrote its review to the result file it was asked for, Codex then replaced that file with its short closing message ("Done, I wrote the review"), so the review was thrown away and reported as missing its markers. (#4515) - When the provider refuses the call with HTTP 402 Payment Required (usually a metering proxy that hit its allowance, or an account out of credits or quota), gstack used to record only "exit 1". (#4515) - The pre-commit /verify check now fails a check that times out, and its checks share one time budget (GST-3201). (#4527) - /ship's review collector no longer reads a reviewer's own scope list or list of passed checks as findings (GST-3201). (#4527) - Merge-queue stack tests fail when git cannot list a PR's added test files (GST-3201). (#4527) - /ship can now review results PRs that publish raw session data. (#4511) - /ship's review pass works when the checkout you ship isn't the project's default checkout. (#4507) - A second review round no longer reports done when nothing was reviewed. (#4520) - The prompt-routing hook now suggests skills you install yourself, and no longer sends ordinary bug reports to /qa (GST-3123). (#4506) - gstack's script runner and merge-queue checks now also refuse cut-off output. (#4502) - A failed second-model review reports the cause that actually stopped it, and the runner never deletes its own prompt. (#4519) - `gstack-ship-queue ready` now fills in the trial merges and the second-model trail read instead of printing lines to fill. (#4529) - Five small ship-tool fixes. (#4529) - A ruling the owner gives while a `/ship` run is open can be relayed. (#4529) - /ship no longer kills a working test run as stalled when the test command starts its workers in their own session. (#4533) - /ship no longer stops a review because the state-machine reader started its reply the way its instructions say. (#4504) - When Claude Code runs /verify right before a commit, it now gets a quick check instead of the full fix loop (GST-3150). (#4508) 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.
When a pull request merges a release whose only extra change is a generated file the repo lists under
release_outputs, its earlier remote test run now counts for it, if the clear command gets--allow-repo-commands.Why: gbrain paid one extra full CI run for each such pull request, several a day.
Without the flag nothing changes except that the refusal now says to pass it; a hand edit to the generated file, or any other changed file, is still refused.
Tests
What changed
The five new tests fail on main and pass on this branch, because clear now accepts a regenerated release output when given --allow-repo-commands. The text version of this picture is in the Agent notes.
A pull request that merged a release commit into its branch had its earlier remote test run refused, even though the only difference was a generated file the release tool rewrites. The clear command checked that file against the
stamp_fileslist before the release-output rule, and it never reran the release tool the way the two-commit comparison already does. Now arelease_outputsfile is judged by the release-output rule. With--allow-repo-commandsthe clear rerunsrelease_toolon the recorded head and accepts the file when it comes out byte for byte the same. The troubleshooting entry for the refusal now says when the tool reruns.Why
"gbrain paid one extra full CI run for each such pull request, several a day" (gbrain#9679). After this, a release merge that only regenerated a declared file reuses the test run it already has.
Blast radius
The rule lives in the shared
classifyFile, so the two-commit comparison, the merge-time recheck, the merge-batch verifier and review-depth sizing also let arelease_outputspath paststamp_files. That is safe because such a file still counts as unchanged only for exact version rewrites or a byte-for-byte rerun of the base branch's own release tool on the recorded head. gstack's own policy also keeps its tests out of any such substitution throughstamp_sensitive_gates(read in the shared classifier and in the clear command's substitution code, and walked by the four new clear tests).Test Coverage
The clear path is covered by four new fixture tests and the two-commit comparison change by one. All five fail on main and pass here, as the picture above shows.
Tests: 1814 → 1814 (+0 new files; the branch adds 5 tests in one new and one extended file)
Coverage: 73% value-weighted (73% including 0 weakly covered paths)
Test value: 0 tests written, 0 rejected by the authoring gate, 0 existing tests extended, 0 paths weakly covered (weak = ★, gate-failing or unrated).
Gaps left as proposed tests: the
--runclear and the CI reuse path passing--allow-repo-commandsthrough, the "head is not a commit at the recorded tree" refusal, and an added release output withstamp_filesset.Tests ran: tests 1696 (files, reused from CI run 44287738353)
Pre-Landing Review
No blocking issues. The full review panel read the final reviewed tree once. It had a batched specialist reader (testing, security, state machines), a red-team reader, a native adversarial reader and a second-model review (GPT-6.1 Sol), which found nothing. Seven informational notes came back, and none is fixed in this PR because none would fail a test, break production or lose data:
--runclear passing the flag through.release_outputsexemption reaches everyclassifyFilecaller, and thestamp_filesdescriptions in the ship-policy key reference and the remote-gate docs still call it the only list.stamp_sensitive_gates(gstack sets it).Paths and line numbers for each note are in the Agent notes.
Exploratory QA
Functional (CLI) smoke, one probe: the two changed test files run against throwaway fixture repos (capture 001) and pass, 10 of 10. Not probed: the head-not-at-tree refusal, the
--runclear and the CI reuse path.Eval Results
No prompt-related files changed — evals skipped.
Review bot comments
No review bot comments.
Plan Completion
No plan file. This is a bug fix (plan exempt), so plan completion was not audited.
TODOS
No TODO items completed in this PR.
Documentation
Status: updated. The documentation audit covered docs/, README.md, AGENTS.md and CONTRIBUTING.md and made one factual edit to the troubleshooting page, which now says when the clear command reruns the release tool and that it needs
--allow-repo-commands. No blockers. The audit's full section is in the Agent notes.Agent notes
classifyFile(lib/tree-receipt.ts) judges arelease_outputspath by the release-output rule instead of refusing it through thestamp_filesallowlist first. It is still a stamp only if its hunks are version rewrites orrelease_toolregenerates it byte for byte.buildReceiptinto one helper,regenerateReleaseOutputs, which the tree receipt andgstack-pregate clearboth call; the added-file case no longer requires astamp_filesmatch either.clear --receipt(and the--run/--from-runsubstitutions, which sharetreeSubstitution) rerun the tool only under--allow-repo-commands, and only on pregate.json's head when that commit's tree is the recorded tree; otherwise the residual says why.Refs GST-3067
Documentation audit (verbatim)
Status: updated. One factual edit to docs/troubleshooting.md. No blockers.
Scope: base 44170d6 to head 9092086, 9 committed files and nothing staged, unstaged or untracked. The change: gstack-pregate clear (with --receipt, --run or the CI carry) now treats a regenerated
release_outputsfile as a stamp under rulerelease_toolwhen the file is inrelease_outputsand rerunningrelease_toolwith --allow-repo-commands writes it byte for byte. The tree receipt now letsrelease_outputspaths through even when they aren't instamp_files.Documentation health:
release_toolrule name)stamp_filesexception and pregate clear)release_outputsand the --allow-repo-commands refusal)Coverage debt: none new. The behavior has reference coverage in pregate.md and ship-policy.md and a fix path in troubleshooting.md. The gate-ahead example in pregate.md doesn't show the --allow-repo-commands variant (minor how-to gap). No diagrams were affected.
Test commands
bun test test/pregate-remote-release-output.test.ts test/tree-receipt-release-tool.test.ts: 10 pass, 0 fail (head); 5 pass, 5 fail (main)Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
lib/tree-receipt.ts:148A remote gate receipt can clear a head whose regenerated release output differs from the tested tree; repos without stamp_sensitive_gates get the GST-1176 rule (gstack sets it, so unaffected).lib/tree-receipt.ts:108The release_outputs allowlist exemption reaches review-depth sizing (stampPathsSince); undocumented in changelog/docs.lib/pregate/remote-receipt.ts:110notRerun checks the missing flag before the head-commit check, so following the hint can hit a second refusal.lib/pregate/index.ts:131release_tool rerun can leave a stale git worktree under tmp if gstack-pregate is SIGKILLed mid-run.Informational notes with paths: lib/pregate/index.ts:131 (CI reuse and --run flag threading untested), lib/pregate/remote-receipt.ts:110 (head-not-at-tree refusal untested), lib/tree-receipt.ts:108 with lib/ship-policy.ts:224 and docs/pregate.md:639 (stamp_files described as the only stamp list).
Before/after as text: The five new tests fail on main and pass on this branch: clear now accepts a regenerated release output only with --allow-repo-commands
Approvals
No approvals recorded for branch reuse-test-run-after-release-regenerates-declared-file.
Plan: exempt: bug fix (bug fixes skip plan review; covered by failing-first tests in test/pregate-remote-release-output.test.ts)
Plan check: exempt bug fix
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=0 fixed=0 scope=frozen ledgers_read=3 dispatches=2 est_input_tokens=20368
Gate edits: none detected (2 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: completed (second-model review, openai/gpt-6.1-sol): VERDICT: CLEAN