Skip to content

Count a fix-check whose range starts after a docs-only commit (GST-2294) - #4277

Closed
garrytan wants to merge 1 commit into
mainfrom
count-fix-check-after-docs-only-commit
Closed

garrytan wants to merge 1 commit into
mainfrom
count-fix-check-after-docs-only-commit

Conversation

@garrytan

Copy link
Copy Markdown
Owner

When a docs-only commit sits between the reviewed commit and a granted fix-check, gstack-ship-release finish now counts that fix-check instead of refusing it. This unblocks crew PRs whose Step 14.5 docs commit landed before the owner granted the fix-check, so the fix-check's range started at the docs commit (harness-evals#361 is the live case). It serves the shipping goal: a reviewed, granted fix should reach a receipt without a third review round.

What changed

  • finish bridges a docs-only gap. Before, fixChecked in lib/ship-release.ts required the oldest fix-check's range_base to hold the reviewed tree, or to be an earlier fix-check's commit. Anything else printed FIX_CHECK: not counted (range_base <sha> does not hold the reviewed tree) and the fixed code routed as unreviewed behavior. Now, at exactly that gap, finish walks range_base's first parents (off the base) back to the nearest commit holding the reviewed tree. It accepts the range only when every commit after that one, range_base included, has a single parent and touches only paths finish already routes as release metadata or authored docs (not test code, not bookkeeping). It prints FIX_CHECK_DOCS_BRIDGE: range_base <sha12> follows the reviewed commit <sha12> by docs or release metadata only (<commits>). Those docs paths still take the docs route and its recheck, because they sit outside the fix-check's read.
  • Still refused: a code or test commit in between (alone or after a docs commit), a merge commit in between, a range_base that the reviewed commit descends from (so range_base comes before it), and a range_base on another branch. The equal-tree case is unchanged. No other part of fixChecked changed: grants, freshness, ruled notes, the chain walk through earlier rows and the per-path read test are as before.
  • Docs. docs/ship-policy.md#fix-check-docs-bridge describes the rule and says to pass --reviewed-tree as the tree the bound review read, never the fix-check's own tree. docs/review-policy.md links it.

Why

Three parked PRs printed the same refusal. Only one of them needs this change. The diagnosis for each:

Case Reviewed tree's commit range_base Commits between How finish routes them Covered
harness-evals#361 e5584cb6 (tree 0009a8ff) 5e1c1555 5e1c1555 only (docs/README.md, docs/canary.md; parent e5584cb6) docs (ROUTE: … docs=2) Yes, by this change
gstack #4267 1baf586 (tree f3f3352d, the tree finish 1 to 3 used) d19cf6f d19cf6f only (docs/uninstall.md, changelog.d fragment) docs plus release metadata (ROUTE: … docs=1 metadata=1) Yes, once finish gets the reviewed tree
gstack #4270 5afaeb3 (tree 9adf2a8d) 5afaeb3 none n/a (equal tree) Already counted on main, once finish gets the reviewed tree

The #4267 and #4270 refusals came from the arguments, not the rule. Their last finish runs passed --reviewed-tree as the fix-check's own tree (7c0a53dd at 94ecf9c, and 08c09c25 at ddf1918; both print ROUTE: reviewed=<x> current=<x>). With that argument, range_base is an ancestor of the "reviewed" commit, and this change correctly keeps refusing. Rerun with the bound review's tree (f3f3352d40fad4d06919a63bda078f868a1b2bcd for #4267, 9adf2a8d4f83c63eac02a1069cbfa03104063a0e for #4270). Nothing wider is needed for #4270: range_base holds the reviewed tree exactly.

Blast radius

Only the range_base gap clause of finish's fix-check walk. A chain that counted before still counts with the same line. A chain that refused before now counts only in the docs-only shape. GST-2274 (a null range_base on round-1 fix-checks) is unaffected: a null or off-branch range_base exits the walk before the bridge runs, so those rows still refuse with the row names no range_base commit on this branch.

Agent notes

Open in Capy

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 10, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@capy-ai
capy-ai Bot deleted the count-fix-check-after-docs-only-commit branch November 10, 2026 04:30
@capy-ai capy-ai Bot closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant