Skip to content

v1.91.296.0 fix(flaky): ship-docsync gates accept the docs helper's --help and git tag listings in a line of reads (GSTA-139 S1) - #3542

Merged
capy-ai[bot] merged 3 commits into
mainfrom
flaky-2026-10-28-docsync
Oct 28, 2026
Merged

capy-ai[bot] merged 3 commits into
mainfrom
flaky-2026-10-28-docsync

Conversation

@garrytan

@garrytan garrytan commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3542,
  "head": "d191629cfe1beafba6cdc77a651e9af98e7329bf",
  "version": "1.91.294.0",
  "base": "main",
  "gate": {
    "remote-free-tier": {
      "pass": 10016,
      "fail": 0,
      "skip": 0
    },
    "docsync-focused": {
      "pass": 766,
      "fail": 0,
      "skip": 0
    }
  },
  "spend_usd": 1.73,
  "session_kind": "unattended",
  "pregate": "requires-remote cleared @310b49a81983 (7 checks, current for d191629cfe1b)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/40699919223",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/40699919278",
    "pregate.json/remote_gate: remote-gate tree=310b49a81983 tests=10016"
  ],
  "issues": {
    "fixes": [],
    "refs": [
      3516
    ],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md against 4b8c03b..d191629"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 1,
    "fixed": 0,
    "scope": "frozen",
    "dispatches": {
      "specialist": 1
    }
  }
}

What changed

Replaying all 10 captured ship-docsync parents through the docs detector: on main each red has exactly one refused line; with this change none does

Replaying all 10 captured ship-docsync parents (5 red, 5 rerun) through the docs detector. On main, each red has exactly one refused line. With this change, none does.

Text before/after

Before (origin/main 4b8c03b):

  • 40558235014 slice 5, ship-docsync-current: REFUSED git diff main HEAD; cat personal-note.txt; ls -la; find handbook; {home}/.claude/skills/gstack/bin/gstack-docs-candidate --help
  • 40600731931 slice 4, ship-docsync-store: REFUSED … echo ---; find handbook; {home}/.claude/skills/gstack/bin/gstack-docs-candidate --help
  • 40627127462 rerun 1, ship-docsync-current: REFUSED git diff main HEAD; git rev-parse origin/main; {home}/…/gstack-docs-candidate --help 2>&1
  • 40627127462 slice 5, ship-docsync-current: REFUSED git diff main...HEAD; …; cat personal-note.txt | head -3; {home}/…/gstack-docs-candidate --help
  • 40643690306 slice 4, ship-docsync-store: REFUSED git rev-parse HEAD origin/main; git merge-base main HEAD; git tag; cat {home}/fixture-interface.md | head -5; ls {home}

After (this branch): all 10 captures report [] (no tool failures).

Why

The daily flaky pass (Garry, 2026-10-19: "we should have a flaky test fix pass every day that tries to fix flaky tests") found ship-docsync-store red twice after #3516 and ship-docsync-current red three times in 24 hours, each on "command outside declared docs observation interface". In every red trial the detector refused exactly one harmless line. The agent had asked the docs helper for its usage at the end of a line of reads, or had listed tags. v1.91.185.0 tried to stop the first slip with clearer prompt text and it came back four times, so the detector now accepts what is provably read-only instead.

Blast radius

The change touches only the free docsync detector and fixture interface under test/helpers/, which judge the paid ship-docsync-* cases. It ships no product code. The widened forms are safe because bin/gstack-docs-candidate main() prints USAGE and returns before any Git or file call for exactly --help, snapshot --help and compare --help (lines 98–104 read), and an adversarial reviewer ran about 110 probes, a cross-family reviewer 199, with no accepted string that writes, runs anything else, reads a denied path or reaches git tag with an operand (script ran).

Approvals

Date Asked Exact words Outcome Covers Still pending
2026-10-19 Daily flaky-test fix pass “you can just run the failed test again and note that it is flaky and we should have a flaky test fix pass every day that tries to fix flaky tests” (Garry (crew rule 16, via GStack Minder)) standing approval daily flaky pass repairs, one rerun of a failed case at the same tree none
2026-10-15 Paid spend for gates and focused case runs “it's fine run as many $93 paid gates as you want who cares” (Garry (crew rule 5, via GStack Minder)) standing approval train gates, screens, focused paid case runs; lane cap $10 per PR none

Source: gstack-approvals record for flaky-2026-10-28-docsync (display only; not an approval citation).

Summary

ship-docsync-current and ship-docsync-store kept going red on one refused line each. In four trials the agent ended a line of reads with the installed gstack-docs-candidate --help. In one, it listed tags with git tag. The detector now treats the candidate's help forms as a neutral read inside a line of reads, the same way it already treats Git reads, and it admits operand-free git tag, git tag -l and git tag --list beside #3516's branch listings. The fixture interface declares both. The 2026-10-27 backstop red (40515158924, toContain on documentation_section) ran on a tree from before #3516, which had already fixed it: its parent reported attempt 2's section and that test read attempt 1's.

This is a gate edit. The docs detector now accepts more lines, and the test that pinned the joined --help as refused now expects it to be accepted.

Test Coverage

  • test/docsync-command-grammar.test.ts replays the five captured refused lines (one test.each row per red trial, labelled with run, tree and capture sha256 prefix). Each line is accepted, and the same line followed by ; git add app.ts is still refused. With the two helper changes stashed, seven of the file's tests go red; with them, the whole file is green.
  • Negative controls that stay refused: pipe-fed, | sh, > redirect and cd forms of --help; snapshot and compare joined to reads; -h, --version and --help snapshot; the ~ and foreign helper paths; the lifecycle helpers' --help joined to reads; and 13 tag writes or filtered listings.
  • A local replay of every Bash call in all 10 captures (5 red, 5 rerun) shows each red with exactly one refused line on main and none on this branch.

Pre-Landing Review

No blocking findings. REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=1 fixed=0 scope=frozen dispatches=1
Gate edits: 5 listed, 4 read, 0 findings. The relaxed assertion in test/docsync-command-grammar.test.ts (the joined --help was expected refused, now accepted) is the intended gate edit, justified by the five replayed captures and the helper's --help path.
Adversarial pass (claude-opus-5-5, detector code): no blocking findings, about 110 probes. Outside voice (openai/gpt-6.1-sol): NO FINDINGS, 199 probes, 0 mismatches.

Review notes

  • test/helpers/docsync-interface.ts: the new sentence does not mention that --help may carry 2>&1 or 2>/dev/null, which the detector accepts, and it only implies that the cd ban carries over from Git reads. Informational.
  • test/helpers/docsync-observer.ts (docsComposedReadAllowed, unchanged behaviour): a trailing || true is stripped only on a standalone read, so git status; <candidate> --help || true is still refused. None of the captured lines uses it. It may be the next false red of the same kind. Informational.
  • docsReadOnlyScope (unchanged): ls <CLAUDE_CONFIG_DIR> lists file names, though never their contents. This predates the branch. Informational.
  • The observer comment calls run 40627127462 a gate, but it was a screen. Informational.

Eval Results

Focused paid rule trials at e967634 (one each, kind rule, Claude Code 2.1.292 and Bun 1.4.2 as pinned in .github/docker/Dockerfile.ci): ship-docsync-current PASS ($0.84; its parent did join --help onto git ls-files; git diff main HEAD; and the detector accepted it), ship-docsync-store PASS ($0.84). Total $1.68. An earlier launch aborted before any model call because EVALS_RUN_ID was unset ($0.00, 0 executed).

Issues

Refs #3516

Documentation

Status: current. The audit made no documentation edits and found no blockers.

Scope: release diff 4b8c03b..d191629 on flaky-2026-10-28-docsync (2 commits, 4 files: CHANGELOG.md, test/docsync-command-grammar.test.ts, test/helpers/docsync-interface.ts, test/helpers/docsync-observer.ts). No staged, unstaged or new files. The change is to the docsync test fixture's command detector and interface text only; no shipped command, flag or skill prose changed. Docs referencing docsync (docs/evals/detector-inventory.md, docs/evals/headroom-diagnosis-2026-10.md, docs/TEST_PORTFOLIO.md, ship/sections/documentation.md.tmpl) were read against the diff; entry-point docs were searched and hold no reference.

Documentation health:

  • README.md, CLAUDE.md, CONTRIBUTING.md, AGENTS.md, ARCHITECTURE.md: Current (no reference to the changed surfaces)
  • docs/evals/detector-inventory.md: Current
  • docs/evals/headroom-diagnosis-2026-10.md: Current
  • docs/TEST_PORTFOLIO.md: Current
  • ship/sections/documentation.md.tmpl: Current
  • CHANGELOG.md: Current (not modified by the audit)
  • TODOS.md: Current (no item completed by this diff)

Documentation debt: none introduced. Coverage: no new public surface, so no critical or common gaps. Diagram drift: none. A pre-existing reference gap remains: docs/TEST_PORTFOLIO.md's documentation contract row does not name docsync-command-grammar as a deterministic owner.

Test plan

  • bun test test/docsync-command-grammar.test.ts: green (seven tests go red with the helper changes stashed)
  • bun test test/docsync-*.test.ts test/read-only-command-grammar.test.ts test/detector-corpus-ship-docsync-*.test.ts test/module-size-ratchet.test.ts test/ship-document-release-dispatch.test.ts test/touchfiles*.test.ts: 766 pass, 0 fail
  • bun run typecheck: 0 errors; bun run typecheck:test: 819 known diagnostics, none new
  • Remote pregate (gstack-pregate --remote --spend-cap 2 --timeout 2700 --allow-repo-commands): 10016 tests, 0 failed on tree 310b49a81983 ($0.05); macOS and Windows lanes cleared from this PR's CI
  • Focused paid trials: ship-docsync-current PASS ($0.84), ship-docsync-store PASS ($0.84)

garrytan and others added 2 commits October 28, 2026 13:30
…g listings in a line of reads (GSTA-139 S1)

Gate edit. Five red ship-docsync-current/store parents (screen 40558235014,
gates 40600731931 and 40643690306, screen 40627127462 and its rerun) each had
exactly one refused Bash line: four joined gstack-docs-candidate --help onto a
line of reads, one put git tag in one. v1.91.185.0 tried prompt clarity for the
--help join and the slip recurred four times. The --help path prints usage and
returns before touching Git or a file, so it now stands in a line of reads like
a Git read (never pipe-fed, never after cd); operand-free git tag listings join
the branch listings #3516 admitted. The fixture interface states both.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…tag listings in a line of reads

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

trunk-io Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions

Copy link
Copy Markdown
Contributor

E2E Evals: ✅ PASS

[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 13/13 · behavior 0/0 · judge 0/0 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 3m51s · cost $6.28

13 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $6.28 rule/judge cost | reconcile exit: 0

Profile: pr / mode pr; selected behaviors: 13, judges: 0. Deferred to scheduled/release coverage: 0 behaviors and 0 changed prompt files. Deferred checks did not run and receive no PR-pass credit.

Rule and judge shards
Shard Automated result Manual/unscored Executed Reused Status Cost
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-current 1/1 0 1 0 ✅ $0.97
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-before 1/1 0 1 0 ✅ $0.39
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-failure 1/1 0 1 0 ✅ $0.58
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-launch-failure 1/1 0 1 0 ✅ $0.16
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-store 1/1 0 1 0 ✅ $0.86
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-completion 1/1 0 1 0 ✅ $1.09
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-timeout-unsettled 1/1 0 1 0 ✅ $0.18
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-late-result 1/1 0 1 0 ✅ $0.35
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-recovery 1/1 0 1 0 ✅ $0.4
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-asset 1/1 0 1 0 ✅ $0.24
e2e-docsync-spawned/skill-e2e-docsync-spawned 1/1 0 1 0 ✅ $0.44
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-after 1/1 0 1 0 ✅ $0.42
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-marker 1/1 0 1 0 ✅ $0.2
Fail-closed reconciliation
[test:paid] report: 4/4 slices, 13 planned shards, tier=gate, attempt 1
[test:paid] coverage: profile=pr mode=pr; selected E2E=13, judges=0
[test:paid] deferred: 0 broad behaviors, 0 changed prompts without quick live coverage; these are not PR passes
  slice 1  passed            166s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-completion
  slice 1  passed            131s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-store
  slice 2  passed            147s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-current
  slice 2  passed            124s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-failure
  slice 2  passed             73s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-stale-before
  slice 3  passed             83s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-stale-after
  slice 3  passed             90s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-recovery
  slice 3  passed             65s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-late-result
  slice 3  passed             65s  test/skill-e2e-docsync-spawned.test.ts
  slice 3  passed             53s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-missing-asset
  slice 3  passed             35s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-timeout-unsettled
  slice 3  passed             29s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-missing-marker
  slice 4  passed             25s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-launch-failure
[test:paid] collector final outcomes: 13 executed, 0 reused; 13 passed, 0 failed, 0 manual accepted (unscored; no score-cache credit) (13 attempt records from 13 collectors; every record counts)
[test:paid] deselected testcases, zero credit (132):
[test:paid]    132  sibling case of a case shard (its own shard runs it)
[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 13/13 · behavior 0/0 · judge 0/0 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 3m51s · cost $6.28
[test:paid] exercised-path map (shadow, non-blocking): 0 MAP_GAP line(s) over 13 executed case(s) with recorded commands
[test:paid] report: every planned shard accounted and passed

Sliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry.

Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit ca8ce7ccf2e1b1ef538bd2942790a0d5d66f7b29.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@github-actions github-actions Bot changed the title fix(flaky): ship-docsync gates accept the docs helper's --help and git tag listings in a line of reads (GSTA-139 S1) v1.91.296.0 fix(flaky): ship-docsync gates accept the docs helper's --help and git tag listings in a line of reads (GSTA-139 S1) Oct 28, 2026
@capy-ai
capy-ai Bot merged commit 98dd72f into main Oct 28, 2026
62 of 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