Skip to content

Add a test that stops /ship from gaining refusals without a stated reason (GST-3562) - #4740

Merged
capy-ai[bot] merged 2 commits into
mainfrom
ship-refusal-ratchet
Nov 23, 2026
Merged

capy-ai[bot] merged 2 commits into
mainfrom
ship-refusal-ratchet

Conversation

@garrytan

@garrytan garrytan commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

A new test lists the 131 ways /ship can refuse to continue today and fails when a new one appears without a written reason.
Why: about a third of gstack's recent PRs were gstack repairing its own gates, and new refusals are how that work grows.
Nothing for readers to do; it changes no /ship behavior.

What changed

test/ship-refusal-code-ratchet.test.ts scans /ship's review, release-check and merge-queue code for refusal codes (code: 'X' and refused('X')-style calls) and compares them with test/fixtures/ship-refusal-codes.json. The 131 codes raised today form a baseline that may only shrink. A new code needs an entry under codes whose reason starts with "R56:" and names its evidence or measurement plan, and a code that leaves the source must leave the list.

Why

"25 of 67 merged gstack PRs on 2026-11-22 were gstack repairing its own gates." Each new refusal is a new way for /ship to stop someone's work, so this test makes every new one state why it earns its place.

Blast radius

It touches only a test and its fixture, with no product code, skill prose or reviewer prompt changes, so no /ship run behaves differently. The test reads source files and runs nothing (file read: test/ship-refusal-code-ratchet.test.ts; it passed on main and in CI at e17fb72).

Documentation

Scope: I reviewed tree 2a583355f7e31ae0532b03beb9a810ee75c4d7af. The change is 4 committed files (e17fb72 over base 8143a91), and nothing is staged, unstaged or untracked. It's all test infrastructure plus one changelog fragment.

Result: The docs are current, so I made no edits. The fragment's "131 ways" matches the fixture: the baseline has 131 codes and BASELINE_MAX is 131. docs/TESTING_INTERNALS.md describes FREE_FIXTURES in general terms, and the new entry fits that description. No doc lists refusal codes or per-test ratchets, and the banned-terms check found nothing.

Debt: The refusal-code ratchet has no prose docs. It's explained only in the fixture's _comment and in the test's own failure messages. Filling that gap means writing new content, so I'm reporting it as debt instead of writing it.

Agent notes
  • Known limits, from review. It does not see refusals emitted only through resultLine(...) (for example STOP_UNBOUND, GRANT_SPENT), its baseline check is by length (a retired baseline name could be swapped for a new one), and it has no planted positive or negative control. These are follow-ups, not regressions: nothing checked this before.
  • Origin. GST-3562 letter Q, split out of /ship reviews fixes with full rounds instead of narrow re-checks (GST-3562) #4737 by the Captain's ruling (GSTA-36, 2026-11-23): "A: split. Ship Q alone as a new PR from main with one review round." Letter A is being rebuilt as its own PR.

Approvals

Plan: approved (record r-e4cfb8408c4d)
Plan check: approved (record r-e4cfb8408c4d)

{
  "schema_version": 1,
  "pr": 4740,
  "head": "e17fb72830237d55d1a291b2157a55aea485db79",
  "version": "1.103.0.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 39233,
      "fail": 0,
      "skip": 67
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 45165315540,
      "attempt": 1,
      "tree": "2a583355f7e31ae0532b03beb9a810ee75c4d7af"
    }
  ],
  "calls": 24,
  "session_kind": "unattended",
  "run": "qship",
  "head_tree": "2a583355f7e31ae0532b03beb9a810ee75c4d7af",
  "product_patch_id": "none",
  "gstack_version": "1.102.2.0",
  "review_depth": {
    "depth": "light",
    "class": "tests",
    "runtime_lines": 0,
    "rules": "33831f8248a814fd",
    "base": "8143a91809b2305da6ffa7486923008b72d337e6",
    "registry": "8143a91809b2305da6ffa7486923008b72d337e6",
    "gate_scan": {
      "tagged": 0,
      "head": "e17fb72830237d55d1a291b2157a55aea485db79"
    },
    "reasons": [
      "runtime=0"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @2a583355f7e3 (8 checks, current for e17fb7283023)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/45165315540/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=2a583355f7e3 tests=39233 skipped=67 runs=45165315540/1 profiles=ci-reuse/free-tests heads=e17fb7283023 verified=2026-11-23T12:06:11.604Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "README.md and docs/ (156 files) against the 4 changed test and changelog files"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 2,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "dispatches": {
      "specialist": 1
    }
  },
  "gate_dispositions": []
}

…ason

The test lists the 131 refusal codes /ship raises today; a new code needs an R56 reason in test/fixtures/ship-refusal-codes.json and a removed one must leave the list (GST-3562 Q).

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

trunk-io Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 45b48f1 into main Nov 23, 2026
53 checks passed
@garrytan garrytan mentioned this pull request Nov 24, 2026
capy-ai Bot added a commit that referenced this pull request Nov 24, 2026
- `/ship` now tells you what to change when GitHub refuses a push for email privacy. (#4748)
- The release gate's /cso check accepts the low-confidence hypotheses /cso now reports. (#4753)
- /cso reports every security finding the code supports instead of dropping most of them. (#4739)
- /cso can search the whole repository in one call, and a daily report now lists its low-confidence hypotheses. (#4742)
- A first version's plan and try-it message now open with the owner's own words, and the build is tried the same way he will try it before he is asked. (#4759)
- A first version's public export now keeps out the owner's short quotes and his reasons to leave something out, and a phone first-use check installs a build the cloud phone can actually run. (#4772)
- Three intermittent test failures are fixed. (#4745)
- Free Tests runs its shards on 8-core runners again. (#4749)
- A land that waits on an earlier CI run now decides on what that run actually did. (#4763)
- Landing a PR no longer starts a new CI run when one for the same merged code is already running or has passed. (#4760)
- /ship no longer misses a file-mode change from main on files whose names start with `:`. (#4774)
- make-pdf keeps quotes in alt text, link titles and raw HTML attributes inside the attribute, so a Markdown file can no longer add an `onerror`, `onload` or `javascript:` link that runs in the print browser. (#4761)
- Posting a PR body that lists earlier /ship runs no longer stops for a phone number that isn't there. (#4747)
- A first version's public export now catches a short owner quote whose padding or quote marks are encoded. (#4778)
- A first version's public export now also keeps out a short owner quote written with spaces just inside its quote marks. (#4776)
- Posting a PR body that lists earlier /ship runs no longer stops for a card number that isn't there. (#4751)
- /ship no longer asks for an extra reader when you merge the base branch next to code that was already reviewed. (#4754)
- /ship no longer plans narrow re-checks after a fix. (#4741)
- /ship can't quietly gain new refusals. (#4740)
- `gstack-upgrade` no longer refuses to run after you disable skills. (#4743)
- The free test suite splits its shards from this week's recorded test times. (#4744)
- gstack now writes up a failed or shelved attempt before closing it. (#4735)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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