Skip to content

v1.91.353.0 fix(ship): Step 12 keeps VERSION on --keep-current, adds bump never, and waits for the owner's answer before an unattended bump (GST-380) - #3666

Merged
capy-ai[bot] merged 8 commits into
mainfrom
gsta-191/ship-keep-current
Oct 31, 2026

Conversation

@garrytan

@garrytan garrytan commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3666,
  "head": "1b83c502e1fe3df66fe6387a36a5cbf25f2b761c",
  "version": "1.91.346.0",
  "base": "main",
  "gate": {
    "tests": {
      "pass": 103,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "91a4cf47cfc709f39ec8685e15661d64f7c3722b",
  "product_patch_id": "b7ffd459853580855b9773d1ef216ea3df739118",
  "gstack_version": "1.91.346.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 90,
    "rules": "55726fab80631072",
    "base": "4eae3ef27d0e7a3f6a10366f16cd985508df9133",
    "registry": "4eae3ef27d0e7a3f6a10366f16cd985508df9133",
    "gate_scan": {
      "tagged": 0,
      "head": "1b83c502e1fe3df66fe6387a36a5cbf25f2b761c"
    },
    "reasons": [
      "gate-class",
      "runtime=90>50"
    ]
  },
  "pregate": "requires-remote cleared @91a4cf47cfc7 (1 checks, current for 1b83c502e1fe)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41167799655",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/41167803152",
    "pregate.json/remote_gate: remote-gate tree=91a4cf47cfc7 tests=20013"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/ and README.md, plus ship/ templates and changelog.d fragment"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 3,
    "deferred": 0,
    "noted": 3,
    "fixed": 14,
    "scope": "frozen",
    "fix_checks": 1,
    "dispatches": {
      "specialist": 12,
      "red-team": 1
    }
  }
}

What changed

Step 12 on a repo that never versions unit PRs: --keep-current now keeps VERSION, and an unattended bump waits for the owner's answer instead of writing

Step 12 on a repo that never versions unit PRs: --keep-current now keeps VERSION, and an unattended bump waits for the owner's answer instead of writing. (The capture uses a fixture repo at 1.300.0.0 because the secret scanner reads 1.0.0.0 as an IP address.)

Before/after as text: Step 12 on a repo that never versions unit PRs: --keep-current now keeps VERSION, and an unattended bump waits for the owner's answer instead of writing
--- Before · before.txt · captured output
+++ After · after.txt · captured output
 $ gstack-ship-release version --base main --keep-current   # repo never versions unit PRs
+VERSION: 1.300.0.0 kept (FRESH, --keep-current; no write)
+NEXT: Step 13: no version heading (the entry stays under ## [Unreleased], or is left to the repo's release process); an unprefixed Step 18 title an...
+exit=0  VERSION on disk: 1.300.0.0 (unchanged)
-STOP: BUMP_LEVEL needed (FRESH, 1 file changed, 1 insertion(+)): MICRO under 50 lines, PATCH 50+ with no feature signal, MINOR/MAJOR ask first (Ste...
-exit=3  VERSION on disk: 1.300.0.0 (unchanged)
 
 $ GSTACK_SESSION_KIND=unattended gstack-ship-release version --base main --bump micro
+STOP: BUMP_ANSWER_REQUIRED (unattended session, bump ask): a version Step 12 writes is the owner's approval, and a brief's "take the recommended op...
+exit=3  VERSION on disk: 1.300.0.0 (unchanged)
-VERSION: 1.300.0.0 -> 1.300.0.1 level=micro state=FRESH queue=unverified (offline without the git fallback, or no valid version) wrote=1.300.0.1
-NEXT: Step 13: CHANGELOG entry under 1.300.0.1
-exit=0  VERSION on disk: 1.300.0.1 (written before anyone answered)
 
 

Why

On gstack-evals, which has no ship policy and so runs bump: ask, every Step 12 flag stopped with BUMP_LEVEL needed, so there was no way to ship a PR that leaves VERSION alone (gstack-evals#85). On gstack-evals#89 an unattended run took the recommended level and wrote 0.0.2 before anyone was asked. Now --keep-current and --version <current> keep VERSION, a repo can declare "bump": "never", and an unattended session can't write a bump until the owner's words come back through --answer.

Blast radius

The change sits in gstack-ship-release version, the ship policy reader, gstack-restamp --next and the Version Gate (lib/version-gate-train.ts, scripts/compare-pr-version.ts). Every new branch is gated on either a keep flag or bump: never, and the answer gate only fires for a non-interactive session under bump: ask, so interactive runs and bump: patch repos (gstack itself runs changelog fragments) take the old path; the remote pregate ran the whole free tier on the final tree with 0 failures (script ran).

Approvals

Date Asked Exact words Outcome Covers Still pending
2026-10-31 Approve the plan "GST-380: /ship Step 12 keep-current path and "never version unit PRs" policy" (autoplan run autoplan-20261031024826, 2 decisions) “Answer for run autoplan-20261031024826 gate_rev 1: rec (A1 + B1). I'm approving it myself because it's an S2 bug fix under the GST-191 fix-lane exemption, so it doesn't go to Garry. Fold in all three Highs and the Mediums as you listed. $13 reservation approved within your $40 c…” (GStack Minder (Captain; GST-191 fix-lane exemption), relayed by agent:jam_01M67XFC0YPDA7Q0F02GXV0C1F) approved the reviewed plan (sha256 9690d3216a8a), every recommendation taken none
2026-10-30 Fold the review Highs and Mediums into the GST-380 plan “Fold in all three Highs and the Mediums as you listed” (GStack Minder (Captain)) approved the floor constant, the fixture clearing session vars, canonical session detection none
2026-10-30 Spend reservation for GST-380 paid checks “$13 reservation approved within your $40 cap.” (GStack Minder (Captain)) approved paid evals and remote pregate up to $40 none

Source: gstack-approvals record for gsta-191/ship-keep-current (display only; not an approval citation).

Summary

A repo whose unit PRs never change VERSION had no way through Step 12, and an unattended /ship could write a bump the owner never approved. This PR fixes both:

  • Keep VERSION on a fresh branch. --keep-current and --version <current> print VERSION: <v> kept, write nothing and read no queue. A keep flag combined with --bump or a different --version stops and names the conflict, and the BUMP_LEVEL needed stop now mentions --keep-current.
  • "bump": "never" policy key. Step 12 keeps VERSION and asks nothing, refuses --bump, and stops on a branch that already moved VERSION. It needs min_gstack_version (floor BUMP_NEVER_KEY_VERSION), and validation rejects it beside stamp-at-merge, train or changelog_fragments. gstack-restamp --next needs an explicit --bump/--version under it, and the Version Gate passes a kept VERSION.
  • No write before the answer. In an unattended, spawned, OpenClaw, headless or CI session under bump: ask, a Step 12 call that would write stops with BUMP_ANSWER_REQUIRED until it's rerun with --answer "<owner's words>". ship/DRIVER.md lists it as an approval.
  • Tests first. Commit c98560e added the refusal and early-write tests and was red before the fix (492615e).

Test Coverage

All new code paths have test coverage (Step 7 audit: 100%).
Tests ran: tests 103
Tests ran: typecheck count unavailable

Pre-Landing Review

Pass 1 (six specialists plus red team) found 2 blocking defects: the answer gate missed --version writes on an ALREADY_BUMPED branch, and a test asserted the wrong thing. Both are fixed. Pass 2 (specialists, adversarial, outside voice on openai/gpt-6.1-sol) found 1 blocking defect: the answer gate didn't name every flag that decides the write. It's fixed. A fix-check on the touched hunks found nothing blocking, and its Version Gate note was fixed in 83bd272.
REVIEW_LOOP: passes=2 blocking_found=3 deferred=0 noted=3 fixed=14 scope=frozen fix_checks=1 dispatches=13
Gate edits: 17 listed, 8 read, 0 findings — 0 kept, 0 restored, 0 open
Outside review: completed (openai/gpt-6.1-sol); its two findings were fixed.

Review notes

  • Session detection fails open. An agent that sets GSTACK_SESSION_KIND=interactive itself skips the answer gate, and writes made outside gstack-ship-release aren't covered. The gate stops honest unattended runs from writing early; it doesn't prove the owner's words are real.
  • BUMP_NEVER_KEY_VERSION is set to a placeholder floor, the next minor release (1.92). The merge stamp should move it to the real introducing release through stamp_paths. Until then, the reader-version check asks for that floor.
  • bump: never doesn't work with the coordinator queue: gate-ahead and stamp refuse with RESTAMP_VERSION_SOURCE unless they get an explicit version.
  • Already on main: gstack-decision-log rejects x.y.z.w versions as MEDIUM PII, so Step 12's Ship <v> rows, including the --answer words, are never saved.
  • Fix-check left one older note open at lib/ship-release.ts:92.

Exploratory QA

CLI only. The before/after above came from running the base and branch gstack-ship-release against a temporary fixture repo outside the checkout.

Eval Results

ship/SKILL.md workflow judge: PASS (c:3 c:4 a:4), $0.06, at 27e781b. No ship/ prose changed after that commit, so the result still applies.

Plan Completion

Approved plan autoplan-20261031024826 gate_rev 1 (A1 + B1, plus the three Highs and the Mediums): every item shipped. The CEO phase was closed and deferred under the eng-only fix-lane plan.

Verification Results

Every plan obligation passed: keep-current and --version <current> with no write, the refusal tests, the early-write tests across four session kinds, bump-never validation, restamp, and the Version Gate cases. None failed, were blocked or were left unrun.

TODOS

No TODO items completed in this PR.

Documentation

Status: current. The docs already describe this branch's Step 12 changes, so I made no edits.

Scope: base 514daeb..83bd272 (6 commits, 23 files) plus the new file changelog.d/gsta-191-ship-keep-current.md. Nothing is staged or unstaged. I searched the docs and authored templates for bump policy, --keep-current and restamp --next mentions.

Documentation health:

  • docs/ship-policy.md: Current. The bump row covers patch, ask and never, and the ship: lines cover bump never and bump ask.
  • ship/SKILL.md.tmpl (and the generated ship/SKILL.md): Current. The Step 12 rerun flags include --answer.
  • ship/DRIVER.md.tmpl (and the generated ship/DRIVER.md): Current. BUMP_ANSWER_REQUIRED is listed as an approval and kept means no write.
  • ship/sections/changelog.md.tmpl: Current. The kept-VERSION entry rule is there.
  • changelog.d/gsta-191-ship-keep-current.md: Reviewed only; changelog entries are outside this audit's edit scope.

Coverage debt: bump never and --keep-current/--answer have reference coverage (docs/ship-policy.md, gstack-ship-policy init --explain, gstack-ship-release help) and how-to coverage through the STOP messages. There is no explanation section on when a repo should choose bump never over bump patch, which is a common gap. A future /document-generate run could fill it.

Diagram drift: none; no diagrams reference the changed modules.

Test plan

  • bun test --timeout 120000 test/ship-release.test.ts test/version-gate-fragments.test.ts test/gstack-ship-policy.test.ts test/compare-pr-version.test.ts test/gstack-restamp-queue.test.ts test/ship-policy-compat.test.ts test/skill-md-size-guard.test.ts: 103 pass, 0 fail
  • bun run typecheck: clean
  • Remote pregate (whole free tier on Ubicloud, tree 91a4cf47cfc7): 20013 tests, 0 failed, $0.08

🤖 Generated with Claude Code

garrytan and others added 8 commits October 31, 2026 03:00
… early bump write (GST-380)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…and waits for the owner's answer before an unattended bump (GST-380)

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>
…rsion writes; typed session rows; never drift and --answer rejection cases)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…decides the write; Version Gate and validate understand bump never)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…on Gate's ordinary rules

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

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

trunk-io Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions github-actions Bot changed the title fix(ship): Step 12 keeps VERSION on --keep-current, adds bump never, and waits for the owner's answer before an unattended bump (GST-380) v1.91.353.0 fix(ship): Step 12 keeps VERSION on --keep-current, adds bump never, and waits for the owner's answer before an unattended bump (GST-380) Oct 31, 2026
@capy-ai
capy-ai Bot merged commit e744bfe into main Oct 31, 2026
63 checks passed
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