Skip to content

v1.93.19.0 fix(receipt): --check-prose skips the Documentation exception line and closed code fences (GST-983, GST-984) - #3884

Merged
capy-ai[bot] merged 3 commits into
mainfrom
gst-983-984-prose-exception-fences
Nov 2, 2026
Merged

capy-ai[bot] merged 3 commits into
mainfrom
gst-983-984-prose-exception-fences

Conversation

@garrytan

@garrytan garrytan commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3884,
  "head": "523de7d435b184a2ca9c2e627b8ed2a6baf35874",
  "version": "1.93.9.0",
  "base": "main",
  "session_kind": "unattended",
  "thread": "GSTA-234",
  "head_tree": "4feeaebf198cbdd656b1d25116f77c2afb9f8fba",
  "product_patch_id": "88c5674013ec58aca39ffe94535a255d65d432cf",
  "gstack_version": "1.93.10.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 76,
    "rules": "b2272efd321ce7cb",
    "base": "daf661374fb9ab73f8a4ac891de228c13a714339",
    "registry": "daf661374fb9ab73f8a4ac891de228c13a714339",
    "gate_scan": {
      "tagged": 0,
      "head": "523de7d435b184a2ca9c2e627b8ed2a6baf35874"
    },
    "reasons": [
      "gate-class",
      "runtime=76"
    ],
    "risk": []
  },
  "pregate": "requires-remote cleared @4feeaebf198c (1 checks, current for 523de7d435b1)",
  "requires_remote": [
    "pregate.json/remote_gate: remote-gate tree=4feeaebf198c tests=1057"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/ and README.md (ship-policy, troubleshooting, review-policy, pr-body template, changelog fragment)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 5,
    "deferred": 0,
    "noted": 0,
    "fixed": 0,
    "scope": "frozen",
    "fix_checks": 1,
    "rounds": 2,
    "unrecorded": 5,
    "ledgers_read": 2,
    "dispatches": {
      "specialist": 2,
      "red-team": 1
    }
  },
  "review_targeted": {
    "classes": [
      "gate"
    ],
    "rules": "c82addff6fb60fa0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "88c5674013ec58aca39ffe94535a255d65d432cf",
    "status": "failed",
    "findings": 0,
    "raised_by": "targeted"
  }
}

What changed

gstack-ship-receipt read --check-prose no longer reads two kinds of text as counter claims:

  • The Documentation exception line (GST-983). The exact Documentation exception: … line that write --docs makes a PR body carry is skipped, the same way GST-977 skips the Review-loop exception line. The same words inside a longer line, or a line for a different exception, are still checked.
  • Closed code fences (GST-984). Pasted test output and quoted code inside a closed fence are evidence, not this PR's counts. A line that starts with inline code like ```npm test``` ran opens no fence. A fence that never closes stays prose, and so does the rest of the body, so an unclosed fence can't hide the claims after it.

A marker line replaces each skipped fence, so the text on either side never joins into one claim.

Why

With an owner's docs exception, write --docs requires the exception line word for word, but the prose check read the owner's reason as counts (for example "sections 1 and 2 skip the audit" became a "2 skip" claim), so no body could pass both checks. On gstack-evals #142 (a different repository), fenced test output and a quoted code comment were read as receipt counts and refused.

Blast radius

The change is in lib/ship-receipt-prose.ts only: withoutExceptionLines and a new withoutFences. withoutApprovalsBlocks and its shared fence opener are unchanged. Docs: docs/ship-policy.md, docs/troubleshooting.md (receipt-prose-mismatch) and a changelog.d fragment. There are no network calls, environment reads, workflow or install edits, or new dependencies.

Failing-first proof

On main d45c3501e, test/ship-receipt-prose.test.ts: 12 pass, 3 fail (three of the four new tests)
After b02b4f34c: 15 pass, 0 fail
Review fix 523de7d43, new row on b02b4f34c's lib: 15 pass, 1 fail; after the fix: 16 pass, 0 fail
Lane prose (ship-receipt-prose, exercised-map, ship-receipt-depth, module-size-ratchet): tests_ran=51 exit 0
Remote pregate (Ubicloud us-east-a2, owner gsta234): PREGATE_REMOTE: tree=4feeaebf198c tests=1057 failed=0 spent=0.04

Pre-Landing Review

Round 1 ran the full panel on b02b4f3: a batched specialist, red-team, the targeted gate reader (rendered by hand, since the plan prints TARGETED classes=none), the Step 7 coverage audit, the native adversarial voice and an outside voice on openai/gpt-6.1-sol. Two voices reproduced a real hole: an inline triple-backtick line, or a shorter fence inside an unclosed one, hid a wrong count. That was fixed in one batch at 523de7d with two new test rows.

Round 2 ran one scoped fix-check instead of REVIEW_PLAN pass=2 next=full dispatches=2. The parent's brief, R51 and crew rule 30a allow one scoped fix-check after a round-1 floor batch, under a raised cap. The fix-check found nothing at the floor, and gstack-review-plan --last fix-check printed NEXT: done.

REVIEW_LOOP: passes=1 blocking_found=5 deferred=0 noted=0 fixed=0 scope=frozen unrecorded=5 ledgers_read=2 fix_checks=1 dispatches=3
TARGETED_RECORD: classes=gate status=failed findings=0 brief=7f92a0d0a831 rules=c82addff6fb60fa0

The targeted record says failed because its brief was rendered on b02b4f3's diff, and the review fix moved the patch id. It was not re-dispatched, since that would be a third round.

Gate edits: none tagged (GATE_SCAN tagged=0).

Open notes (below the floor, not fixed)

  • P03: a fence inside a list item still pairs with a later indented line, so an unindented line that ends the list item, which GitHub shows as prose, is skipped.
  • P05 and P06: a fence inside a blockquote, or under a nested list with a four-space indent, isn't recognized, so pasted evidence there is still checked and can be refused. That fails closed.
  • Fix-check item: withoutApprovalsBlocks still treats an inline-backtick line as a fence opener, so a rendered Approvals block after one is read as prose. That fails closed.
  • targeted#1 and adversarial-native refactor: reorganize codebase into modular structure #2: skipping every closed fence means a stale count pasted in a fence goes unchecked. That is the GST-984 design; narrowing it to evidence-style fences is a possible follow-up.

Documentation

Status: current. No documentation edits were needed.

Scope: merge base d45c350 to head 523de7d on gst-983-984-prose-exception-fences, plus staged, unstaged and untracked content (all empty). Changed files: changelog.d fragment, docs/ship-policy.md, docs/troubleshooting.md, lib/ship-receipt-prose.ts and test/ship-receipt-prose.test.ts. The audit also read docs/review-policy.md and ship/sections/pr-body.md.tmpl for cross-references.

Documentation health:

  • docs/ship-policy.md: current. It documents the Documentation exception line skip, closed-fence skip, inline triple backticks and unclosed-fence behavior.
  • docs/troubleshooting.md: current. It lists the new never-read-as-claims cases.
  • docs/review-policy.md: current. Its pointer to the prose check is still accurate.
  • ship/sections/pr-body.md.tmpl: current. It describes the review-loop exception line and has no fence rules to update.
  • changelog.d/gst-983-984-prose-exception-fences.md: current. It matches the code and tests.

Coverage debt: none. No new commands, flags or environment variables. No architecture diagrams to check for drift. No new doc files, so discoverability is unchanged. Banned terms: none.

Approvals

None needed: this is a fix to an already-diagnosed problem (fix-lane exemption).

garrytan and others added 2 commits November 2, 2026 17:37
…d closed code fences (GST-983, GST-984)

write --docs with an owner exception requires the PR body to carry the Documentation exception line word for word, and read --check-prose read the owner reason in it as counter claims, the deadlock GST-977 fixed for the Review-loop exception line. Pasted test output and quoted code in fenced blocks were read as receipt counts too (gstack-evals #142). The prose check now skips the exact docs exception line and every closed code fence; a fence that never closes stays prose. Failing-first: the three new cases fail on main d45c350.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…r an unclosed fence is skipped (GST-984 review)

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

trunk-io Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions github-actions Bot changed the title fix(receipt): --check-prose skips the Documentation exception line and closed code fences (GST-983, GST-984) v1.93.19.0 fix(receipt): --check-prose skips the Documentation exception line and closed code fences (GST-983, GST-984) Nov 2, 2026
@capy-ai
capy-ai Bot merged commit cb72cc1 into main Nov 2, 2026
45 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