Skip to content

Stop /ship's docs audit halting when the child writes prose after its result (GST-2349) - #4285

Merged
capy-ai[bot] merged 4 commits into
mainfrom
docs-audit-ignores-prose-after-result-gst-2349
Nov 17, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
docs-audit-ignores-prose-after-result-gst-2349

Conversation

@garrytan

@garrytan garrytan commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

/ship's documentation audit no longer spends an attempt, or stops for an owner sign-off, when the audit writes text after its JSON result. It gets one free re-ask instead, and a "blocked" verdict can never turn into "current" along the way.

What changed
  • Text after the result line gets one free re-ask instead of a spent attempt. When an audit's output has text after a JSON line carrying its audit id, gstack-docs-candidate result doesn't accept it. It prints FORMAT_REPAIR: and re-asks once for the whole result line without using one of the two attempts.
  • The re-ask only works one way. If any JSON line with the audit id said "blocked" or listed a blocker, the reply must stay blocked and keep every one of those blockers (it may add more), and the re-ask prompt says so. A later correction or a fenced "current" example can't turn a blocked audit into a passing one.
  • Content problems still count. If any of those lines has a missing status, a wrong audit id, or "current" with files listed as edited, the output spends an attempt as before. Output with no JSON line carrying the audit id does too.
  • The audit is told the format plainly. The re-ask and the retry note both say to put the documentation section inside the JSON as a string and write nothing after the line.
Why

In founderstar #837 and harness-evals #393 the audit concluded "current, no edits" and then restated its section in prose after the JSON. Because the last line was prose, gstack treated the result as unreadable and skipped its free format re-ask. Each rejection spent an attempt, and after both, /ship stopped for an owner sign-off though nothing was wrong. A second-model review of an earlier version showed that ignoring trailing text let a "blocked" verdict flip to "current", and a later review found that a re-ask judged with nothing carried over could do the same. This version keeps the blocked verdict through the re-ask.

Blast radius

Only the documentation audit's result parser (lib/ship-docs-result.ts), its re-ask and retry texts, the help comment and one output line in bin/gstack-docs-candidate, one sentence in ship/sections/documentation.md and the troubleshooting entry. No other check, receipt or review behavior changes.

Agent notes

Approvals

Approved: yes (record r-7919fc5311da). The full approval record stays private.
Plan: exempt: bug fix (R65)
Plan check: exempt bug fix

Review history

  • Round 1 at 61c6e17 and round 2 at fe4ec24 (full reviews).
  • One fix round was then granted on 813ba7a (approval a-4fc8c85c3ae8, review_loop_grant 813ba7a72c7165a9a4187ec2d94ffab51360f95a): keep a blocked status and its blockers through the re-ask, keep content failures on the counted path, with the round-2 critical written as a failing-first test.
  • That fix is 67375f4. This /ship ran one full review of 67375f4 against main with no further fix round.

Pre-Landing Review

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=1 fixed=0 scope=frozen ledgers_read=2 dispatches=1
Pre-Landing Review: 1 issues — 0 auto-fixed, 0 asked (0 fixed, 0 skipped), 0 deferred, 1 noted
Adversarial review (native, completed): 4 notes, none blocking ("Ship as-is").
Gate edits: none detected (3 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Readers: batched specialist (testing, security, state-machines, red-team) and the native adversarial reader; no targeted reader (classes=none); outside voice skipped by the plan. Reviewed tree 399305997d79. Nothing met the blocking floor.

Open notes (below the floor, not fixed under the grant)

  1. lib/ship-docs-result.ts:38 (INFORMATIONAL, red-team): a blocked audit-id line followed by an unfenced "current" JSON line as the last line is still accepted as current. The last-line path behaves the same on main, so it is not a regression, but the header comment and the changelog promise more than the code holds. Probe reproduced it.
  2. Adversarial docs: add README and CLAUDE.md #1 (Medium, blocks: no): the same gap, plus a last "current" line with only a format slip, which the repair can bring back as current.
  3. Adversarial refactor: reorganize codebase into modular structure #2 (Low): the whole-line re-ask can rewrite files_reviewed and the section from scratch; compare still pins files_updated to the actual edits.
  4. Adversarial Project-local .claude/skills/gstack install breaks /browse and setup can report false success #3 (Low): the dropped-blocker check matches exact strings and the re-ask prompt does not say to copy blockers word for word, so a reworded blocker costs an attempt.
  5. Adversarial Fix project-local /browse installs and harden setup #4 (Low): ship/sections/documentation.md.tmpl Step 2 still says "It parses only the LAST nonempty line".

Tests

  • free: carried from CI run 44048271200 at tree 399305997d79, tests_ran=1672 (files), EVIDENCE: FRESH.
  • Requires-remote lanes cleared at this tree: free-tests.yml/macos-named-regressions (run 44048271200), windows-smoke.yml/windows-smoke (run 44048271113), pregate.json/remote_gate (CI carry).
  • Coverage audit: 13 of 13 changed paths covered; every test in test/docs-audit-result.test.ts passes (72 cases).

Documentation

Documentation: current
Status: current. The docs already match the change, so no edits were needed.

Scope: 8 committed files from be73938 to 67375f4 (branch docs-audit-ignores-prose-after-result-gst-2349). Nothing was staged, unstaged or untracked. The audit covered the docs-audit result checker (lib/ship-docs-result.ts), the gstack-docs-candidate CLI, /ship Step 14.5 prose and the DOCS_RESULT_INVALID troubleshooting entry.

Documentation health:

  • docs/troubleshooting.md: current. The DOCS_RESULT_INVALID fix explains the free re-ask when text follows the result line, the content-clean condition and how a blocked verdict carries over.
  • ship/sections/documentation.md.tmpl and ship/sections/documentation.md: current. Both say FORMAT_REPAIR covers trailing text and that a blocked verdict carries over.
  • changelog.d/docs-audit-ignores-prose-after-result-gst-2349.md: current. It matches the code.
  • bin/gstack-docs-candidate usage comment: current.

Coverage debt: None new. The changed behavior has a reference entry (troubleshooting) and a how-to (/ship Step 14.5). No diagram drift: no diagrams mention these modules.

Issues

Issue links: none. gstack-issue-links read "founderstar #837, harness-evals #393" in the commit message as this repo's #837 and #393; those numbers belong to other repositories, so no Refs line is posted.

{
  "schema_version": 1,
  "pr": 4285,
  "head": "67375f4a7096cf7923b7091c814a1c295d0d303f",
  "version": "1.99.5.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 1672,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 44048271200,
      "attempt": 1,
      "tree": "399305997d7911212559bc3930589d753ea13e24"
    }
  ],
  "session_kind": "unattended",
  "head_tree": "399305997d7911212559bc3930589d753ea13e24",
  "product_patch_id": "acd1ffe37f5d844c028f9d46e737efdc66d1bd08",
  "gstack_version": "1.99.5.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 65,
    "rules": "66e5174161eecc2c",
    "base": "e9f38d6fe14a4ec5138238a5e6c52de204e163bf",
    "registry": "e9f38d6fe14a4ec5138238a5e6c52de204e163bf",
    "gate_scan": {
      "tagged": 0,
      "head": "67375f4a7096cf7923b7091c814a1c295d0d303f"
    },
    "reasons": [
      "runtime=65"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @399305997d79 (8 checks, current for 67375f4a7096)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44048271200/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44048271113/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=399305997d79 tests=37360 skipped=105 runs=44048271200/1 profiles=ci-reuse/free-tests heads=67375f4a7096 verified=2026-11-17T09:27:46.586Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CONTRIBUTING.md, CLAUDE.md, AGENTS.md and ship/sections/documentation.md.tmpl against the 8 changed files"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 1,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "ledgers_read": 2,
    "dispatches": {
      "specialist": 1
    }
  },
  "gate_dispositions": []
}

… result (GST-2349)

The Step 14.5 documentation audit read only the child's last nonempty line.
Children that ended with their JSON result and then restated the documentation
section in prose had a valid "current, no edits" audit rejected with no format
repair, which spent an attempt each time and, after two, stopped /ship for an
owner risk grant (founderstar #837, harness-evals #393).

gstack-docs-candidate result now reads the last line that opens a JSON object,
ignores prose after it and says so with TRAILING_PROSE:. A result missing only
documentation_section keeps the existing free re-ask, whose prompt now tells the
child to put the section inside the JSON and write nothing after the line; the
re-audit retry note says the same. Content failures still count.

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

😎 This pull request was merged.

garrytan and others added 3 commits November 10, 2026 17:00
…k (GST-2349)

A cross-family audit of the previous commit showed that ignoring prose after
the result line let a contradicting verdict through: a blocked result followed
by a fenced "current" example was accepted as current, and a "Correction: the
audit is BLOCKED" after a current line became a repair that had to stay current.

Text after a JSON line carrying the audit id is no longer ignored and never
searched for another result. It is a format slip: FORMAT_REPAIR re-asks once
for the whole result line without spending an attempt, the re-ask counts
everything the audit wrote after its JSON line, and the reply is judged on its
own with nothing kept from the first line. A reply that itself has text after
its line counts as an attempt.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ose-after-result-gst-2349

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

# Conflicts:
#	lib/ship-docs-result.ts
Review of the previous change found that the free whole-line re-ask could
turn a blocked audit into a passing one: a blocked result line, then a fenced
"current" example, then a "current" reply was accepted as current.

The re-ask now works one way. It is offered only when every JSON line that
carries the audit id is free of content problems; a content problem such as a
missing status or "current" with edits still spends an attempt. If any of those
lines said blocked or listed a blocker, the reply must stay blocked and keep
every blocker (it may add more), and the re-ask prompt says so.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 2af3822 into main Nov 17, 2026
57 checks passed
capy-ai Bot added a commit that referenced this pull request Nov 17, 2026
- /autoplan's approval page no longer hides a reviewer's product objection behind "keep your direction". (#4431)
- Every skill that loads the shared preamble, on every host, now says to ask a question once and to check a file before handing it over. (#4383)
- The Captain manuals now name the `Failed or skipped:` and `Also changed:` lines that READY and lane reports carry. (#4432)
- gstack's shell locks hold again on Ubuntu 26.04, where `mkdir` reports success when another process won the race (GST-2247). (#4262)
- `test/gstack-lock-race.test.ts` runs the old pattern and the helper against a PATH shim that behaves like uutils 0.8.0 `mkdir`, so it runs on any runner image: the old pattern lets two of four racers win, the helper admits exactly one in each of 60 races and never overlaps across take, hold and release loops, and parallel `gstack-config` writers keep every key. (#4262)
- Windows Setup E2E now runs when `bin/gstack-lock.sh` changes. (#4433)
- Claude Code's skill list now says when to use each gstack skill, so Opus loads /review and /plan-eng-review when a request fits. (#4387)
- A pull request's merge head can no longer keep its `/ship` receipt without a full review. (#4365)
- `/ship` now counts review rounds per pull request, and the head that merges always gets a full review. (#4360)
- /ship's documentation audit no longer accepts a passing result when an earlier line from the same audit said "blocked". (#4434)
- /ship's documentation audit no longer spends an attempt when the audit child writes text after its result. (#4285)
- The README lists the two new guides, and the install doc counts its hooks right. (#4403)
- docs/releases.md now says the stable release cut treats a failed commit status as red and a pending one as still going, as it has since #4257. (#4436)
- /ship's `finish --docs-requested` now accepts a docs fix when the audit named the file with a line number. (#4437)
- Document the `.gstack/approval-classes.json` schema, `gstack-approval-classes` CLI commands, and owner approval citation format in `docs/ship-policy.md#approval-classes`. (#4355)
- `/eval-plan` now runs four result checks instead of leaving them to judgment. (#4384)
- The /review coverage-audit eval no longer fails a run that really read the source file when zsh stops a command line at an `echo ====` separator. (#4364)
- Sixteen in-repo documentation links reach their section again. (#4394)
- gstack agents now open every status report with what failed, what they didn't verify and what else they changed. (#4273)
- Two new short guides. (#4380)
- A skill you wrote whose contract still lists `check_after_last_edit` keeps the rest of its contract. (#4439)
- The ship policy guide now explains how to merge any pull request with `gstack-ship-queue land`, even in a repository with one maintainer. (#4377)
- /ship's test step runs a large unit suite on Linux. (#4426)
- Every skill that loads the shared preamble, on every host, now says never to print a whole environment, git config or process table. (#4382)
- Pull requests from /ship now open with at most three plain lines, and every merge lands as one commit titled with the PR title. (#4438)
- `gstack-pr-wait`, `gstack-ci-gate` and the release cut no longer call a commit green while a check on it failed. (#4257)
- `gstack-runaway` now says what a thread's cold and empty wakes cost, not just how many there were (GST-2770). (#4385)
- The optional Stop hook no longer checks for a test run after the last edit, and /verify asks for it in plain words instead. (#4428)
- /ship's test step says when it ran out of time, and you can set its budget. (#4429)
- The remote test command no longer puts every file on one command line. (#4429)
- The stable release no longer waits on the nightly Windows tests (GST-2815). (#4400)
- Ubicloud fan-outs can no longer overshoot the vCPU limit, and owners no longer delete each other's VMs. (#4430)
- hono is pinned to 4.13.16, which fixes five advisories the weekly OSV scan found in 4.13.13 (gstack#4406). (#4408)
- `package.json` overrides (#4408)
- `test/dependency-security.test.ts`: the lockfile floor check now covers `hono >= 4.13.16`. (#4408)
- The nightly Windows test run finishes again. (#4409)
- A short write-up checklist in ETHOS.md. (#4381)

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