Skip to content

Fix six test and eval checks that misread correct work or raced their own fixtures (GST-2338) - #4284

Merged
capy-ai[bot] merged 3 commits into
mainfrom
fix-flaky-checks-2026-11-10
Nov 10, 2026
Merged

capy-ai[bot] merged 3 commits into
mainfrom
fix-flaky-checks-2026-11-10

Conversation

@garrytan

@garrytan garrytan commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

This fixes six test and eval checks that failed on correct work or raced their own fixtures, found by the 2026-11-10 daily flaky-test pass (harvest window 2026-11-09T14:00Z to 2026-11-10T14:00Z). It serves the goal of keeping CI red only for real defects, so crews stop rerunning flaky checks. Only tests, fixtures and detectors change; no product code, threshold, trial count, case kind or retry.

Paid eval checks

  • ship-docsync-store (census 42748129558, main b1702ee): /ship's documentation step has asked models to count each audit launch with gstack-docs-candidate attempt <child output> --state <file> since Fix five small browse and question-hook bugs #4192, but the docsync fixture's command interface never listed that call. The model followed the interface, refused to run the undeclared command and stopped before launching any audit. The interface now declares attempt <a saved private child output> --state <a private .json under home> and attempt --help, and the observer admits exactly that shape. Negative controls stay refused: a state file in the repo, a non-JSON state, a state under the installed skills, a child output inside the repo, a missing or misplaced --state, extra flags and the tilde path.
  • tpa-absent-darwin (same census): the model offered "I drive it in gstack's own visible browser (recommended, since Aside isn't available)", and the Aside-drive detector counted it because the option contains the word Aside and a drive verb. A mention that says Aside is missing ("isn't available", "was not detected", "is unavailable", "with no Aside installed") no longer makes an option an Aside drive. The captured render now replays to zero Aside drives; options that also name Aside as the browser they use still count.
  • tpa-present defer check (open note from Fix seven test and eval checks that misread correct work or raced their neighbours (GST-2131) #4223's /ship): "Until then the step stays blocked on you" and "The step is waiting on you" after another instruction counted as a defer offer. A status line (stays, remains, is blocked or waiting on you) now counts only when an earlier part of the same option puts the step off ("later", "not yet", "not now"; not "not later"). The "I'll mark this step as ..." form, which is what choosing the option does, is unchanged, and every earlier negative control stays false.
  • scrape-prototype-path (outside-voice#1 on Fix seven test and eval checks that misread correct work or raced their neighbours (GST-2131) #4223): the navigation check credited only browse's "Navigated to (2xx)" line, so $B goto "<fixture>" >/dev/null && $B html would fail a correct run. It now also credits a goto whose stdout goes to /dev/null when the call proves it exited 0: no Exit code N, tool error, Error or net::ERR_ line, and every command after the goto is joined by &&. The target must be the fixture URL itself or $PWD under the case's working directory (followed through literal cd). ;, ||, &, a trailing ; echo, single-quoted $PWD, cd elsewhere and a goto quoted inside echo stay uncredited.

Free tests

  • test/cso-snapshot-state.test.ts "equal ticket decisions use token order..." (Free Tests 42779334663 shard 10, Stop gstack-uninstall deleting unpushed or kept work under any folder it removes (GST-2303) #4282): the contender child wrote its result file with a plain writeFileSync, and the parent read it as soon as it existed, so it could read it empty (Expected "INSUFFICIENT_CAPACITY", Received ""). The child now writes a temp file and renames it into place. A standalone writer/reader loop read an empty file 2,315 and 2,210 times out of 3,000 with the plain write and 0 of 3,000 with the rename.
  • test/cso-registry-socket.test.ts "deadline cleanup removes the whole per-call socket root..." (Free Tests 42772387147 shard 3, Stop gstack-uninstall deleting nested worktrees, locked worktrees and a .gstack repo (GST-2268) #4267): the test gave the watchdog a deadline 150 ms out. The watchdog takes whole seconds and cleans up as soon as the deadline passes, so on a slow start the deadline passed inside the ~1 s startup handshake and the product correctly failed closed ("Registry socket watchdog failed its startup handshake" after 1,024 ms). The deadline is now 2 s out. With the watchdog start delayed 400 ms, 6 of 30 handshakes failed with the 150 ms deadline and 0 of 30 with 2 s.

The harness pin for test/helpers/session-runner.ts is re-recorded as non-behavioral: browseNavigatedTo's only caller is the changed scrape-prototype-path case file.

Agent notes

Plan: exempt: daily flaky pass repairs

Pre-Landing Review

REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=1 fixed=4 scope=frozen unrecorded=1 unbound=1 ledgers_read=4 dispatches=8
Pass 1 found 4 issues: 3 fixed (the /dev/null goto credit is limited to file:// targets, a one-sentence defer offer is credited again, a || directly before the goto refuses the credit) and 1 skipped (red-team#2 below). Pass 2 found 2: 1 fixed (only a || directly before the goto's pipeline refuses) and 1 noted. The targeted reader for the harness pin found nothing.

Gate edits: none detected (15 listed, 10 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

Review notes

Ruled note: test/helpers/third-party-actions.ts:85:adversarial at bc4d54e ruled by Captain GStack Minder (GSTA-36) at 2026-11-10T15:49:48.878Z: false credit only; main 6b32714 gives the same answer; below the blocking floor (approval a-3075294a5334)

These are below the blocking floor and are not fixed in this PR.

  • Ruled (Captain record a-3075294a5334, head bc4d54e): test/helpers/third-party-actions.ts:85. offersDefer credits a status line after an unrelated "later", e.g. "D) Approve the token now for use later, this step is waiting on you." It's a false credit only, and main 6b32714 gives the same answer.
  • test/helpers/docsync-observer.ts (p1/red-team#2): the docsync fixture doesn't admit Step 14.5's FORMAT_REPAIR path (repair-prompt, result --repair-of). That predates this PR (Let the docs audit repair a badly shaped final line without using an attempt #4205), and changing it would change the prompt for every docsync case.
  • test/helpers/session-runner.ts (p1/red-team#3, empty-output half): a goto call with an empty result is still credited, because the parser can't tell an empty result from a missing one.
  • INFORMATIONAL test/helpers/session-runner.ts:121 The cd tracker updates PWD even for a cd that a preceding || skips, so 'true || cd /tmp/w && $B goto file://$PWD/f.html >/dev/null && $B html' is credited for /tmp/w; the cd tracking predates this range.
  • INFORMATIONAL test/helpers/third-party-actions.ts:82 'Not yet, the step stays blocked on you.' is not credited while 'Not yet. The step stays blocked on you.' is: the clause negation lookahead rejects 'not'. main behaves the same.
  • INFORMATIONAL test/helpers/third-party-actions.ts:84 'Sign in later and the step stays blocked on you.' now counts as a defer offer; whether that wording is a defer or a manual path is a contract call. main behaves the same.

Status: current. The diff is test-only, and no documentation needed changes.

Scope: base 6b32714 to bc4d54e (3 commits, 12 files: test helpers, test files, one harness pin and one changelog.d fragment). There were no staged, unstaged or new files.

Documentation health:

  • docs/evals/detector-inventory.md: current. Its line references for the changed cases still resolve.
  • docs/flaky.md: current. It doesn't mention the changed detectors.
  • docs/TESTING_INTERNALS.md: current. It doesn't mention the changed detectors.
  • changelog.d/fix-flaky-checks-2026-11-10.md: accurate. The /dev/null goto credit sentence could also name its file:// URL limit.

Coverage debt: none. No public surface changed.

Diagram drift: none.

  • Lane GSTA-509, issue GST-2338. Flake ledger: GStack Minder drive handoffs/flaky-ledger.md (2026-11-10 harvest).
  • Each new unit test fails on main's helpers and passes with these (third-party-actions 1 red each for the defer and Aside cases, session-runner 1 red, docsync-command-grammar 1 red).
  • Separately, the Fix seven test and eval checks that misread correct work or raced their neighbours (GST-2131) #4223 carry-over codex-review paid proof passed 1/1 at main 6b32714 on a fresh Ubicloud VM with kernel.apparmor_restrict_unprivileged_userns=0 and no gstack install ($0.22, VM destroyed).
  • Left open as product defects (freeze): the cso-snapshot-state UNSAFE_PATH race in lib/cso/state.ts, planning-wave-closing-signals, review-design-lite, plan-eng-review-artifact runner change.

Open in Capy

Agent notes
{
  "schema_version": 1,
  "pr": 4284,
  "head": "bc4d54ee40902084c62d0d583d3e8e7afc66f635",
  "version": "1.99.0.0",
  "base": "main",
  "gate": {
    "tests": {
      "pass": 36989,
      "fail": 0,
      "skip": 105
    }
  },
  "ci_carried": [
    {
      "lane": "tests",
      "run": 42845836216,
      "attempt": 1,
      "tree": "c539ba75cf3dd82eb5a10b4c7d9a5b34b9d2216e"
    }
  ],
  "session_kind": "unattended",
  "head_tree": "c539ba75cf3dd82eb5a10b4c7d9a5b34b9d2216e",
  "product_patch_id": "c1498e50cab8e4494dbf36e26be16bd94ad9b112",
  "gstack_version": "1.99.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 2,
    "rules": "66e5174161eecc2c",
    "base": "6b327148e37134e2628d2d20cd98f33dcbeef51c",
    "registry": "6b327148e37134e2628d2d20cd98f33dcbeef51c",
    "gate_scan": {
      "tagged": 0,
      "head": "bc4d54ee40902084c62d0d583d3e8e7afc66f635"
    },
    "reasons": [
      "gate-class",
      "risk:auth",
      "runtime=2"
    ],
    "risk": [
      "auth"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @c539ba75cf3d (8 checks, current for bc4d54ee4090)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/42845836216/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/42845836216/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=c539ba75cf3d tests=37094 skipped=89 runs=42845836216/1 profiles=ci-reuse/free-tests heads=bc4d54ee4090 verified=2026-11-10T15:48:51.959Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CONTRIBUTING.md, AGENTS.md, CLAUDE.md, changelog.d (base 6b327148e to bc4d54ee4)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 2,
    "deferred": 0,
    "noted": 1,
    "fixed": 4,
    "scope": "frozen",
    "rounds": 2,
    "unrecorded": 1,
    "ledgers_read": 4,
    "unbound": 1,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  },
  "ruled_notes": [
    {
      "finding": "test/helpers/third-party-actions.ts:85:adversarial",
      "head": "bc4d54ee40902084c62d0d583d3e8e7afc66f635",
      "by": "Captain GStack Minder (GSTA-36)",
      "reason": "false credit only; main 6b327148 gives the same answer; below the blocking floor",
      "at": "2026-11-10T15:49:48.878Z",
      "approval": "a-3075294a5334"
    }
  ],
  "review_targeted": {
    "classes": [
      "auth"
    ],
    "rules": "8811fd300bf305f0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "c1498e50cab8e4494dbf36e26be16bd94ad9b112",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}

… own fixtures (GST-2338)

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 2 commits November 10, 2026 15:19
…credit to file:// targets with no || before it

Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/specialist-batched#1 reader=specialist-batched
Review-Finding: p1/red-team#3 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…e goto's pipeline

Review-Finding: p2/red-team#3 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit dbb4b50 into main Nov 10, 2026
66 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