Repository navigation
v1.66.0.0 feat: test/evals/CI speedup — 90s truthful free suite, diff-billed evals, required Linux lane - #2593
Conversation
Matches the local toolchain and brings native `bun test --shard=M/N` / --parallel to CI (needed by the free-test lane and shard runner work). Co-Authored-By: Claude Fable 5 <[email protected]>
Three coupled fixes, atomic because any subset is worse than none: 1. Image tag keys on hashFiles(Dockerfile.ci, bun.lock) — package.json is out: its version field changed on 60/60 recent commits, forcing a ~2min image rebuild per PR for a dependency set only bun.lock determines. 2. ci-image.yml now pushes that same content-hash tag (previously only :latest/:sha, so the weekly prebuild never warmed the tag the eval matrix actually looks up) and both eval workflows get registry layer cache (cache-to export gated to same-repo runs; fork tokens cannot write GHCR). 3. Dockerfile bakes /opt/node_modules_cache/.bun.lock and the runtime Restore-deps guard diffs bun.lock instead of package.json — otherwise every version-only bump made all 14 matrix jobs fall back to a live bun install, which is slower than today's behavior. Worst-case failure mode is self-healing: a missing tag or cache falls back to exactly the previous rebuild-and-install path. Co-Authored-By: Claude Fable 5 <[email protected]>
Both fired on unrestricted push AND pull_request, so each PR push ran them twice (12 duplicate (headSha, workflow) pairs in the last 200 runs). push is now main-only; pull_request covers PR branches. Co-Authored-By: Claude Fable 5 <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
actionlint, skill-docs, version-gate, pr-title-sync, and the evals report job never exceed one core; standard-8 was ~4x the cost for zero wall-clock. build-image and the eval matrix keep standard-8. Co-Authored-By: Claude Fable 5 <[email protected]>
head_ref is empty on workflow_dispatch, so every manual dispatch of these four workflows shared one empty-suffix group and cancelled each other. Co-Authored-By: Claude Fable 5 <[email protected]>
- actions/cache on ~/.bun/install/cache keyed on bun.lock (install was 35-45s of both 55-64s jobs, all network) and Bun pinned to 1.3.13 to match the other lanes. - windows-free-tests now runs `bun run test:windows` (the runner's --windows-only curation) instead of a hand-listed 13-file subset that had drifted from the registry it sampled. POSIX-bound tests get excluded in ONE place (the curation patterns), not two. Co-Authored-By: Claude Fable 5 <[email protected]>
Measured on the llm-judge shard: --retry 2 amplified 25 tests into 46 executions (+84%), with retried runs at 138s vs a 10-12s baseline (429 backoff), and a permanently-failing test paying 3x. One retry still absorbs one-off flakes; chronic flakes become visible fix-work instead of silent wall-clock. Co-Authored-By: Claude Fable 5 <[email protected]>
Bun runs describe blocks as concurrency barriers, so the e2e-review CI
job executed its tests serially: 741s of an 860s PR critical path for
tests whose slowest member is 224s. The per-file matrix is the repo's
parallelism unit, so the split moves:
- Retro E2E + retro-base-branch -> test/skill-e2e-retro.test.ts
- review/ship base-branch + Review Dashboard Via Attribution
-> test/skill-e2e-review-attribution.test.ts
- sql-injection / enum-completeness / design-lite stay in
test/skill-e2e-review.test.ts
One 741s job becomes three ~180-250s jobs. Locally the worst paid shard
drops from 1705s (94.7% of the 1800s kill) to under 700s. Test names,
bodies, suite strings, and eval-store collectors are unchanged, so
baselines carry over. Matrix rows added to both eval workflows
(attribution is gate-only, so no periodic row); the report job's
hardcoded runner count is gone (drift-proof).
Co-Authored-By: Claude Fable 5 <[email protected]>
The existsSync gate ran ~12s of ONNX inference (plus a HuggingFace dataset fetch) on every free-suite run on any dev box that had ever warmed the classifier, while CI (no cache) silently skipped it. Now explicit opt-in: SECURITY_BENCH=1 bun test browse/test/security-bench.test.ts. Co-Authored-By: Claude Fable 5 <[email protected]>
server.ts gains BROWSE_WATCHDOG_INTERVAL_MS (floor 50ms, default 15s unchanged). The #994 stay-alive test runs a 250ms tick and waits for the stay-alive log line instead of blind-sleeping 2s + 20s past the production interval. Co-Authored-By: Claude Fable 5 <[email protected]>
skill-coverage-floor duplicated two matrix assertions (registry completeness, gate-tier floor) with a DIFFERENT hand-rolled directory walk — matrix's skipped nothing, floor's skipped node_modules/docs/test. Two 'same' gates disagreeing on the census is the bug class test/helpers/skill-census.ts was written to kill. Registry assertions now live in matrix only (with floor's better error message), both files walk via skillCensus().authoredSkills, and floor keeps the per-skill structural checks it owns. Co-Authored-By: Claude Fable 5 <[email protected]>
EVALS_CONCURRENCY was overloaded: the legacy bun-test path used it as --max-concurrency (default 15) while the sharded runner read it as the process count — exporting the legacy value gave 15 concurrent Bun processes each spawning claude (the 429 storm). Now: EVALS_JOBS = shard processes (default 4); EVALS_CONCURRENCY = bun --max-concurrency inside a shard (default 4, explicit in shard args — omitting it made within-shard parallelism silently differ from the legacy path). Stale 49/59 header math replaced with the live-count rule. Co-Authored-By: Claude Fable 5 <[email protected]>
New free tripwire: eval:bg:gate / eval:bg:periodic --timeout must cover ceil(shards/jobs) x shard-timeout x 1.05, recomputed from the actual paid test census every run. Hand-derived numbers go stale every time a paid file lands — the review split just proved it: periodic's 28800s dropped BELOW its new 32130s worst case (raised to 32400s here). An undersized watchdog kills healthy runs and the tail reports never-started. Co-Authored-By: Claude Fable 5 <[email protected]>
The Anthropic fail-fast ping ran at module load in every paid test file importing e2e-helpers — ~30 paid claude -p calls (30s timeout each) per full sharded run for one bit of information. The parent now pings once before spawning shards and sets EVALS_PREFLIGHT_OK=1; the module-load path honors the flag. Extracted to test/helpers/anthropic-preflight.ts (injectable spawn seam) with regression pins in both directions: the flag must skip, its absence must ping exactly once, dead API must throw. Co-Authored-By: Claude Fable 5 <[email protected]>
touchfiles.ts listed ITSELF in GLOBAL_TOUCHFILES, so adding one test's dep entry forced the full ~$38 / 30-45min suite — measured on 21.9% of recent commits (42/192). The self-reference existed because data and logic shared a file: any edit COULD be a selection-logic change. Now: touchfiles-data.ts (the four maps, literals only, zero imports — the future map-diff target), test-selection.ts (matchGlob/detectBase Branch/getChangedFiles/selectTests), and touchfiles.ts as a re-export facade so all ~12 import sites are untouched. GLOBAL_TOUCHFILES drops the self-ref, adds test-selection.ts (logic stays maximally conservative), and TEMPORARILY adds touchfiles-data.ts until the map-diff change lands. New free test pins the literal-only property (comment-aware state-machine scan with a self-test) and facade export parity (===), so neither can silently rot. Co-Authored-By: Claude Fable 5 <[email protected]>
…ndices Three coupled changes to scripts/test-free-shards.ts: 1. STRICT OUTPUT: runFreeShard streams through the paid runner's BunTestOutputClassifier — exit 0 without bun's 'Ran N tests across M files' summary, with (fail) lines, or with a wrong file count is a FAILURE (anti-truncation backstop at the runner layer), plus an external wall-clock timeout that SIGKILLs the process group (timed-out distinct from failed; exit 124 vs 1). Also fixes a latent shard-bleed: file selectors now use exactTestFileSelectors (relative paths were substring filters that matched sibling roots). 2. PARALLEL: full-suite mode is one 'bun test --parallel' invocation (Bun 1.3.13). Measured semantics recorded in the header: per-file worker isolation, standard summary, and mid-suite process.exit surfaces as a crashed-worker FAIL with exit 1 — strictly safer than serial, where the same exit truncates silently. No static weight lists; --shards M --shard i keeps deterministic hash partitioning for CI matrices (native --shard rejected: round-robin renumbers when files land). Spawned shards get throwaway GSTACK_HOME/TMPDIR so parallel shards can't contend on real state. Per-shard epilogue prints files/seconds/status every run. 3. Stable indices: assignFilesToShards no longer drops empty shards, so a shard's index depends only on the file hash and requested count — an empty CI matrix slot is a fast no-op success, not a renumbering. package.json 'test' now delegates to the runner (TEST_ROOTS becomes the single source of truth for roots; slop:diff tail preserved; the runner inherits the 30s per-test timeout the old glob passed inline). Co-Authored-By: Claude Fable 5 <[email protected]>
New required, secretless free-tests job: the canonical runner's single 'bun test --parallel' invocation with strict-output classification on ubicloud-standard-8. The free suite previously ran on NO Linux CI — only a curated Windows subset ran anywhere — so every 'tests pass' claim about main rested on contributors running them locally. Secretless by design (no API keys; fork PRs finally get real test signal) and pinned by test/free-tests-workflow-wiring.test.ts: canonical runner invoked, zero secrets.* references, pull_request never pull_request_target, and matrix-count/--shards agreement if anyone switches to the sharded fallback. Co-Authored-By: Claude Fable 5 <[email protected]>
…nged Editing the eval dep-list data no longer forces the full ~$38 / 30-45min suite (measured on 21.9% of recent commits). When touchfiles-data.ts is in the diff, selection now evaluates the BASE version (git show -> mkdtemp -> spawnSync bun child printing the four maps as JSON — sync because e2e-helpers selects at module scope) and JSON-diffs per key: added entries, edited dep lists, and tier flips are selected; keys removed from all maps are reported, never silently dropped; a GLOBAL_TOUCHFILES edit still runs everything. FAIL-CLOSED with named causes: missing-base-ref, git-show-failed, import-failed, shape-mismatch each degrade to run-all and print 'selection: global — touchfiles-data changed (<cause>)' (D9 — silently expensive beats silently wrong, but never silently). eval:select prints 'selected N of M, reason: ...' + removed tests; --base scopes the map-diff too. The temporary conservative GLOBAL entry for touchfiles-data.ts is gone — its changes route through the map-diff. 23 new free tests: pure-core fixtures, selectTests wiring incl. a poison-injection guard, and a temp git repo exercising every fail-closed cause end-to-end. Co-Authored-By: Claude Fable 5 <[email protected]>
getChangedFiles is now the deduped union of committed (base...HEAD), staged+unstaged (git diff HEAD), and untracked (git status --porcelain --untracked-files=all) — an agent that edits files and runs evals BEFORE committing no longer gets the full $38 suite every time because the committed diff looked empty. Clean tree still returns [] (run-all by design for main-branch/periodic runs). Git failures now THROW with the failing command, stderr, and 'set EVALS_ALL=1 to deliberately run the full suite' — the old return [] silently became run-all, which is silently expensive. 11 new free tests cover every source, dedupe, quoted paths, and both failure shapes via an injectable spawn seam. Co-Authored-By: Claude Fable 5 <[email protected]>
…e state The first full run under the strict runner surfaced 12 failures with one root cause: injecting a single throwaway GSTACK_HOME per invocation made 6,900 tests share a MUTABLE scratch home. gstack-config tests wrote keys into it; relink and update-check tests then read them (e.g. relink saw skill_prefix left behind by a config test and produced prefixed names). All 12 pass when run directly. TMPDIR isolation stays (mkdtemp inside it is still per-call unique). Tests needing GSTACK_HOME isolation mkdtemp their own per test — the repo convention — and hermetic-env covers E2E children. The env-dump pin now asserts GSTACK_HOME passes through UNTOUCHED so the injection can't come back. Co-Authored-By: Claude Fable 5 <[email protected]>
The parity ratchet had quietly failed for 7 skills — v1.58-v1.64 growth landed past the v1.57.7.0 anchors and nothing caught it because this test had no CI lane (verified pre-existing: SKILL.md content is byte-identical to origin/main). Same rebase protocol as v1.53->v1.57.7.0; old baseline retained for the audit trail. Root-caused a second latent bug while rebasing: captureBaseline recorded SKELETON-ONLY bytes while the checker compares UNION bytes (skeleton + carved sections/*.md), so a fresh capture read carved skills at ~2x ratio (ship: 82KB captured vs 183KB checked). captureBaseline now takes sectionedSkills and records unions for carved skills — capture and check measure the same thing, so the NEXT rebase can't hit this. Four CARVE_GUARDS skeleton caps re-ratcheted to current +headroom (plan-ceo 92K, plan-eng 70K, office-hours 100K, design-consultation 70K), annotated inline. Co-Authored-By: Claude Fable 5 <[email protected]>
v1.64.0.0 shipped with VERSION bumped but package.json left at 1.63.0.0 — the 'package.json version matches VERSION file' test fails on origin/main today. Nothing caught it because that test had no CI lane until this branch's free-tests job. Co-Authored-By: Claude Fable 5 <[email protected]>
toUTCString() truncates to whole seconds, so a +3000ms Retry-After date could mean an effective wait of ~2001ms — flaking against the 2500ms assertion floor ~1-2 in 9 runs under suite load. +4000ms puts the truncation floor at 3001ms with the assertion floor safely below it. Pulled forward from U4 because the free-tests lane is now a required check and this flake would randomly block PRs. Co-Authored-By: Claude Fable 5 <[email protected]>
extractSkillSections (fence-aware H2 scanner, loud-throw on missing sections with available-heading list), extractSkillBody (drops the shared generated preamble), extractSkillHead (frontmatter + first 30 lines, for routing fixtures). Pinned section lists per consumer, and free-tier real-skill pins so a gen-skill-docs heading rename fails the FREE suite instead of a paid run. skill-fixture.ts joins GLOBAL_TOUCHFILES (fail-safe polarity: over-select). Co-Authored-By: Claude Fable 5 <[email protected]>
CLAUDE.md's extract-don't-copy rule, applied: the three review fixtures carry only the sections the sql-injection/enum/design-lite prompts and judges exercise (89% cut). Full-file copies made claude -p read 1871 lines per test — the direct cause of the 1705s worst shard (94.7% of the 1800s kill). Co-Authored-By: Claude Fable 5 <[email protected]>
Keeps every section the retro flow exercises incl. base-branch detect; drops preamble, Global Retrospective Mode, Compare Mode (58% cut). retro-base-branch was the single slowest CI test at 224s. Co-Authored-By: Claude Fable 5 <[email protected]>
CS1's set plus Step 1.5 (PLAN COMPLETION AUDIT machinery) and Step 4.5 (army dispatch, quality_score, findings schema) that the 7 army tests assert on. Pin test guards the three load-bearing strings. Co-Authored-By: Claude Fable 5 <[email protected]>
Tests follow all 11 skillify steps, so the whole body stays; only the shared generated preamble drops (skillify 1239->453, scrape 958->167). Co-Authored-By: Claude Fable 5 <[email protected]>
…aller context-save 1037->267 lines, context-restore 952->168; the 8 tests exercise full save/restore/list flows so the body stays, preamble drops. Co-Authored-By: Claude Fable 5 <[email protected]>
CONTRIBUTING.md, AGENTS.md, and ARCHITECTURE.md still taught bare `bun test` for the suite; the shipped runner deprecates it (walks the whole repo, loads paid eval files, misses the strict classifier). All suite-level references now say `bun run test`, the Tier 1 section describes the strict shard runner (~90-100s, --verbose, --wall-timeout), the sharded paid-runner paragraph documents diff-based shard skipping and the EVALS_JOBS / EVALS_CONCURRENCY split, the Tier 3 row points at the actual judge-only invocation, and GSTACK_EVAL_MODEL_JUDGE is documented at the judge it overrides. Co-Authored-By: Claude Fable 5 <[email protected]>
…act; truth-fix stale comments The workspace-revert incident that hit CHANGELOG/TODOS mid-ship also caught free-tests.yml between edits: commit 8d6c2ff's message claims PR-number concurrency + artifact upload + main-push runs, but only the push trigger survived to the commit (caught by the /document-release doc-vs-code audit). Both re-applied. Also: eval-model.ts header said capture defaults to Opus (it's Sonnet per D1a), paid-shards' header pinned a stale 44/63 shard census, and two CHANGELOG phrases over-claimed ('six' -> 'up to six' shard processes; retry-1 scoped to retry-bearing paid paths).
|
😎 This pull request was merged. |
First live run of the cache trio failed at flag-parse time: the
default buildx `docker` driver hard-errors on cache-to registry
export ('Cache export is not supported for the docker driver'), which
failed build-image on PR #2593 and skipped the entire gate eval
matrix behind it. docker/setup-buildx-action creates the
docker-container builder that supports registry cache export; all
three build sites (evals, evals-periodic, ci-image) get it.
…ring
First Linux CI run: isOurXvfb identified the TEST RUNNER as our Xvfb —
the suite's own argv contains 'xvfb.test.ts', the substring match over
the whole cmdline passed, and the start-time check matched because the
pid was real. Any process whose ARGUMENTS mention xvfb (a runner, an
editor) was killable — the sibling-kill class the identity check
exists to prevent. Identity now rests on argv[0]'s basename ('Xvfb'),
with a sh-$0 regression pin. isDisplayFree falls back to the X
socket/lock files when xdpyinfo isn't installed (x11-utils is absent
on some images that ship Xvfb).
On GitHub Actions bun wraps each file's log section in ::group::. The un-stripped header failed FILE_HEADER_RE, failures attributed to the PREVIOUS file, and the terminal recap's re-printed (fail) lines landed under a phantom second file — the first Linux run reported 5 real failures as 10 across 2 files (one of them innocent). Strip the prefix before matching; the existing file+test dedupe then absorbs the recap.
…gate, darwin-scoped pdf gates Three environmental assumptions the Linux lane exposed: (1) gbrain-detect's deterministic SAFE_PATH lacked the bun runtime, so every env-shebang spawn exited 127 on CI; a scratch dir holding ONLY a bun symlink joins the PATH (appending bun's real dir would leak its siblings — dev boxes keep gbrain there too). (2) host-config's 'detect finds claude' assumed a claude binary; the secretless lane deliberately has none — gated on Bun.which. (3) The four make-pdf render gates hard-required prerequisites on ANY CI, but the make-pdf gate workflow is macOS-only by decision and the Linux lane doesn't build dist/pdf — hard-require scoped to darwin.
Headed-browser tests (handoff, extension sidepanel DOM) need a real DISPLAY; the first Linux run died on Playwright's 'headed browser without an XServer' banner. xvfb-run -a provides the display; x11-utils ships xdpyinfo for display probing.
E2E Evals: ❌ FAIL69/72 tests passed | $10.68 total cost
ubicloud-standard-8 runners (Docker: pre-baked toolchain + deps) | wall clock ≈ slowest suite Failures
|
…om failing file Round-3 CI showed the remaining half of the recap bug: bun prints 'N tests failed:' then re-prints every (fail) line with NO file headers, so they attributed to the stale currentFile — an innocent file (test/uninstall.test.ts) was charged with another file's 5 failures. The recap marker now ends attribution (currentFile=null, chunk closed) and recap re-prints of already-recorded test names dedupe; a recap-only failure the main run never attributed still records, unattributed, as belt and braces.
…console capture The suite's raw chromium.launch had no --no-sandbox — every browse test that goes through gstack's launcher (which always passes it) survived the Linux lane, while this file's sandboxed renderer died on first navigation: waitForFunction hung to the 15s test timeout, then every newContext failed with Target.createBrowserContext. Also wires pageerror/console-error capture at all six pages so a page-side failure reads as itself in CI logs instead of a bare timeout.
…emoved in v1.14 Another member of the never-ran class: the file skipped everywhere (Playwright chromium absent locally, no Linux CI until this branch), so it rotted invisibly through THREE contract changes — the v1.63 /extension-token bootstrap, the endpoint growth (/memory, /pty-session, /sse-session), and finally the v1.14 sidebar-REPL rewrite that removed the security shield/banner UI it asserts on (#security-shield survives in sidepanel.html as a dead hidden stub with no JS driver; sidepanel.js:87 and :1317 document the removal). The Linux lane executed it for the first time and it can never pass: the behavior is gone. The L1-L3 security filters it name-checked stay covered by the ~83 unit/behavioral security tests. The free-tests lane also vendors xterm assets (bun run vendor:xterm) so the sidepanel terminal scripts load for any future DOM coverage.
… attempt Three PR rounds of receipts: pty-plan-smoke failed attempt 2 in two consecutive rounds with ROTATING members (plan-design-review, then plan-eng-review) and e2e-workflow's document-release timed out on attempt 2 in round 4 — while both families pass on branches still running three attempts, and every other row stayed green at --retry 1 across all rounds. Matrix rows gain an optional retries field (default 1); only these two rows set 2, keeping the measured retry-amplification win everywhere else.
…urfaced; fix flag-utils path embedding First full run of the expanded Windows lane (13 -> ~258 files, PR #2593 run 31918591602) failed in exactly 8 files. One was a real test bug, fixed: design-flag-utils embedded a raw Windows ROOT into a bun -e string where backslashes act as escapes (D:\a\gstack imported as D:agstack) — forward slashes work on every platform. The other seven are POSIX-bound in ways the content patterns cannot see (sed/ln/bash ARE their subject, a shebang shim arrives via variable, wall-clock retry bounds on the slowest runner) — each gets a receipted KNOWN_WINDOWS_INCOMPATIBLE entry, and the census pin now covers that list so a renamed file fails the suite instead of silently keeping a stale exclusion.
…handled errors in the epilogue Round-2 Windows census (zero failing TESTS — the first curation wave held): shard 1 failed on an unhandled module-load throw in skill-census (the skills-tree symlink layout needs Developer Mode CI runners lack) and shard 2 wedged to its wall deadline inside browser-manager-unit — both get receipted exclusions; macOS + Linux lanes keep covering the files. The unhandled-error class also exposed an epilogue gap: it fails the shard via the strict classifier but produces no (fail) lines, so the epilogue read 'FAIL — 0 failing test(s)' with no culprit. The reporter now attributes each '# Unhandled error between tests' marker to its chunk and the FAIL line carries the count.
…ill-census symlinks)
…een truncating The browser-manager-unit wedge was cutting shard 2 short, so each Windows round revealed the next segment of never-run files. With the wedge excluded, shard 2 completes (50s) and shows its real failures: seven more POSIX-environment files (PID/cmdline identity probing, bash scripts as the subject under test, env-scrubbed bun spawns). Shards 1 and 3 (including all tree-mutators) now PASS on windows-latest — this should be the fixed point: ~234 files of real Windows coverage vs the 13 hand-picked before.
…shard-log artifact Shard 2 ran all 132 files with zero (fail) lines yet bun exited 1 — unhandled errors in a shape neither counter names, and the Windows lane had no log artifact to attribute them. Statically attributed and excluded: browser-skill-commands (spawnSkill spawns bun with a constructed env; resolution fails under Windows spawn) and security-audit-r2 (evil-link symlink fixtures need Developer Mode). The lane now uploads its shard logs on failure like free-tests.yml, with os.tmpdir() pointed at runner.temp so the glob can find them.
…s in-file
The periodic re-baseline for the capture default (Opus -> Sonnet)
found exactly one regressor across the seven-entry AUQ behavioral
matrix: spec failed twice under Sonnet ('never reached a question in
budget', 242s) while its six siblings passed; the controlled Opus
re-run passed cleanly (7/7 format, substance 5, 160s), and a second
run through the new per-entry model plumbing confirms. MatrixSkill
gains an optional model field wired into captureFirstAuq; only spec
sets it. TODOS gains the re-baseline receipts for the never-baselined
periodic tail (three setup-gbrain files + ship-idempotency, all
local-only).
… detector-flake TODO The plan-design-review member fails ONLY scopeGateQuestionObserved intermittently on unchanged code (PR #2593: red rounds 3/11 + rerun, green rounds 5/6 — every attempt terminal, no plan-mode leak), and a bare Expected-true/Received-false is undiagnosable from CI logs. The check now throws with the last-2KB visible evidence, so the next failure distinguishes a detector-sensitivity miss from a real silent bypass. TODO filed with the full receipt trail.
… of the same contention story PR #2472 documented the 180s deterministic 0-turn startup timeouts and ratcheted to 300s; PR #2593 hit 302s timeouts on attempt 2 in two consecutive runs while five sibling rounds passed — marginal at 300s under 40-way in-shard concurrency. Same headroom its contention-class sibling (retro-base-branch) carries; outer bun timeout rises to 480s.
…atchet, receipts in-file Timed out at exactly 180s on its final attempt twice on PR #2593 (rounds 4 and 13) while passing four other rounds — a 30-turn multi-step doc workflow is marginal at 180s under 40-way in-shard CI concurrency. Same story and same fix as review-dashboard-via and retro-base-branch; outer bun timeout rises to 360s.
Eval-matrix flake ledger (post-validation rounds)The required check (
The arithmetic: 17 paid rows at ~95% per-round pass each gives ~40% odds of an all-green round — Subsequent rounds may still show ~1 ambient red on some other row; that is the documented rate, not a regression signal. Merge readiness rests on the required check plus the two demonstrated all-green matrix rounds. |
…eout-flake family
Root cause of the documented intermittent scope-gate-question-NOT-observed failure (test/skill-e2e-plan-mode-no-op.test.ts, also PR #2593 rounds 3/11): on a fresh runner every one-time preamble marker is missing, so each PTY child runs first-run feature discovery before the behavior under test, and touching .feature-prompted-model-overlay under ~/.claude/skills/gstack/ trips Claude Code's sensitive-file permission prompt — the run stalls on that dialog (classified outcome=asked) and the scope gate never renders. Dev machines never reproduce it because the operator's markers exist. Seed ~/.gstack one-time markers (.activated, .first-loop-tip-shown, .telemetry-prompted, .proactive-prompted, .completeness-intro-seen, .plan-tune-nudge-shown) and both .feature-prompted-* markers (via the gstack root symlink into the checkout) in the PTY-smoke registration step, so no first-run prompt can preempt the assertion under test. Co-Authored-By: Claude Fable 5 <[email protected]>
…ned, regression-pinned (#2605) * fix(redact): block real all-caps URL passwords, not just shape-match urlPasswordIsPlaceholder skipped any password matching /^[A-Z][A-Z0-9_]*$/, so a real DSN like postgres://admin:[email protected]/app slipped the HIGH pre-push block. Replace the shape rule with an anchored, exact-match set of doc-convention placeholder tokens (PASSWORD, PASS, CHANGEME, ...), compared case-sensitively and never as a substring (PROD2026SECRET must not match SECRET). The USER:PASSWORD doc convention still suppresses; real all-caps and lowercase passwords block. Regression cases pinned both directions. Co-Authored-By: Claude Fable 5 <[email protected]> * fix(browse): write self-contained .gstack/.gitignore unconditionally ensureStateDir only appended .gstack/ to the project .gitignore when that file already existed, skipped silently on ENOENT, and swallowed other append failures. With BROWSE_PERSIST_STATE=1, session-state.json (live cookies + localStorage/sessionStorage tokens) and browse-network.log / browse-audit.jsonl (request headers) then sat git-add-able under <git-root>/.gstack/. Write a self-contained <stateDir>/.gitignore containing "*" unconditionally, before return, so the state dir's contents can never be committed regardless of the project .gitignore. The project-.gitignore append is kept as redundant safety. The no-import-side-effects guard is relaxed to allow exactly this lone .gitignore guard file (still fails on browse.json / session-state.json / logs / listener binds) — the guard is written eagerly by ensureStateDir at import and is not leaked state. Co-Authored-By: Claude Fable 5 <[email protected]> * fix(browse): restore Bun.spawn exited/drain/OOM-cap contract on Node polyfill The v1.65 fork-port squash silently dropped the `exited` promise, eager stdout/stderr drain, and 16MB GSTACK_SPAWN_MAX_BUFFER cap that v1.64 added (#2571), plus the five tests pinning them. On the Windows Node fallback, `await proc.exited` then resolved to undefined immediately — cookie-import, isBrowserRunning, and browser-skill children all read stdout before the child produced it, a silent failure. Re-land the block (keeping v1.65's windowsHide comment improvements) and re-add the pinning tests. Co-Authored-By: Claude Fable 5 <[email protected]> * fix(ios-qa): compile the private-API touch bridge out of Release builds PR #2264 claimed DebugBridgeTouch.m (KIF-derived in-process touch synthesis using private UIKit/IOKit symbols: _touchesEvent, IOHIDEventCreateDigitizer*, _AXSSetAutomationEnabled) was "compiled out in Release," but the body was gated only by TARGET_OS_IOS, so a Release iOS build carried the private symbols (App Store rejection risk). The safety half of the fix (closed PR #2269) never landed. Gate the body on `#if TARGET_OS_IOS && DEBUG` and add the cSettings DEBUG define to the DebugBridgeTouch target so `#if DEBUG` is true in debug and false in release (mirrors the Core/UI swiftSettings). A free static tripwire pins both halves; the nm/strings symbol proof needs an iOS-SDK build and belongs in the device/periodic tier. Co-Authored-By: Claude Fable 5 <[email protected]> * docs(egress): state truncation/deletion of the ledger are out of scope gstack-egress verify catches in-place edits, reordering, and mid-chain deletion (the hash chain breaks) but not tail-truncation, whole-file re-fabrication, or deletion — a same-user local actor who owns the ledger defeats those and verify still exits 0. That matches the stated threat model (forensic observability, not an exfiltration control). Document it in the header threat model and the usage text rather than adding a count-sidecar, which would false-positive on every legitimate rotation and barely raise the bar. Head-anchoring stays the tracked rotation TODO in lib/egress-receipt.ts. Co-Authored-By: Claude Fable 5 <[email protected]> * fix(ship): scope the App Store Connect key to one app and disclose it at exit The release flow minted a non-expiring APP_MANAGER key with allAppsVisible:true (standing authority over every app on the team) and was told never to mention any credential to the user, so the durable key never reached their revocation checklist. Scope the key to the app being released via the apps relationship (allAppsVisible:false + an explicit apps association — required, since a no-app key can see nothing and uploads fail), and disclose the key once in the closing report with its ASC revocation path. Carve the exit disclosure as the explicit exception to the mid-run no-credential-talk rule so the one-authorization-moment contract still holds. Edited the .tmpl source and regenerated the section. Co-Authored-By: Claude Fable 5 <[email protected]> * harden(browse): constant-time bearer-token comparison in validateAuth The loopback auth check compared the Authorization header with `===`, whose byte-by-byte early exit leaks the token prefix through response timing. Use crypto.timingSafeEqual with a length gate (the length is not secret). Behavior is unchanged for valid/invalid tokens; auth tests unaffected. Co-Authored-By: Claude Fable 5 <[email protected]> * test: pin the security-property regression guards from pre-landing review The pre-landing review found the fixes were correct but three regression guards were missing — each pins a property whose silent revert would keep behavior identical while reopening the hole: - validateAuth: a static tripwire asserting crypto.timingSafeEqual + the got.length===want.length gate + the null-header guard (a revert to `===` keeps accept/reject green but restores the timing side-channel). - redact: a table-driven loop over the exported URL_PASSWORD_PLACEHOLDER_WORDS so a typo or dropped entry can't silently start blocking a doc placeholder; plus a substring-can't-rescue-a-real-secret assertion. - config: assert the self-contained .gitignore is written even when git already ignores .gstack/, proving the write precedes the isIgnoredByGit early return. - bun-polyfill: cover the 128+signal exit branch (POSIX only). URL_PASSWORD_PLACEHOLDER_WORDS is exported so the table test can't drift. Co-Authored-By: Claude Fable 5 <[email protected]> * chore: bump version and changelog (v1.66.2.0) Co-Authored-By: Claude Fable 5 <[email protected]> * docs: sync egress-verify scope and layered iOS Release guard into user docs ARCHITECTURE.md and README.md now carry the same gstack-egress verify scope disclosure the CLI ships (edits/reordering/mid-chain deletion detected; tail-truncation and ledger deletion out of scope for a forensic log). docs/howto-ios-testing-with-gstack.md documents the second Release-build guard: DebugBridgeTouch.m compiles out behind #if TARGET_OS_IOS && DEBUG via the cSettings DEBUG define. Co-Authored-By: Claude Fable 5 <[email protected]> * docs(ios-qa): call the DebugBridge targets SwiftPM targets, not Swift targets DebugBridgeTouch is Objective-C (the same sentence says so); "Swift targets" was the wrong word. Cross-model doc review catch. Co-Authored-By: Claude Fable 5 <[email protected]> * docs(changelog): describe the all-caps DSN examples without a scannable URL shape The v1.66.2.0 entry quoted its own headline fix as three literal postgres://user:PASSWORD@host examples — which the branch's stricter HIGH gate now correctly flags, failing CI's quality scan on this very PR (the local pre-push hook passed because the installed gstack still runs the old engine). Rewrite the three mentions: the reproduce command uses a fully-braced shell interpolation (suppressed in the diff scan by design, expands to the real all-caps password at runtime, still exits 3 — verified), and the table row + Fixed bullet name the password token without the URL shape. Gate scan on the amended diff: 0 high. Co-Authored-By: Claude Fable 5 <[email protected]> * ci(evals): pre-seed one-time preamble markers for PTY smokes Root cause of the documented intermittent scope-gate-question-NOT-observed failure (test/skill-e2e-plan-mode-no-op.test.ts, also PR #2593 rounds 3/11): on a fresh runner every one-time preamble marker is missing, so each PTY child runs first-run feature discovery before the behavior under test, and touching .feature-prompted-model-overlay under ~/.claude/skills/gstack/ trips Claude Code's sensitive-file permission prompt — the run stalls on that dialog (classified outcome=asked) and the scope gate never renders. Dev machines never reproduce it because the operator's markers exist. Seed ~/.gstack one-time markers (.activated, .first-loop-tip-shown, .telemetry-prompted, .proactive-prompted, .completeness-intro-seen, .plan-tune-nudge-shown) and both .feature-prompted-* markers (via the gstack root symlink into the checkout) in the PTY-smoke registration step, so no first-run prompt can preempt the assertion under test. Co-Authored-By: Claude Fable 5 <[email protected]> * chore: re-version release as v1.67.1.0 Co-Authored-By: Claude Fable 5 <[email protected]> * fix: restore main's dependency manifest clobbered by the merge resolution The v1.67.0.0 merge resolved the package.json conflict wholesale --ours, which kept this branch's version stamp but erased main's dependency work (playwright 1.58->1.62 + its patchedDependencies entry, transformers 4.1->4.2, cross-spawn added, puppeteer-core removed — which is also why main dropped the basic-ftp pin test: the pinned package left the tree with it — marked/socks bumps, adm-zip override) while bun.lock auto-merged to main's side. Every CI job that runs `bun install --frozen-lockfile` failed on the mismatch (check-freshness, quality, free-tests, gate, windows x2). Take main's package.json + bun.lock verbatim, re-stamp the version through gstack-version-bump (1.67.1.0). bun.lock is now byte-identical to main's; frozen install verified locally; full free suite green for the branch. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
Summary
Test/evals/CI speedup pass (v1.66.0.0). ~85 bisected commits vs main, +7.3K/−5.5K across 84 files.
Free suite: 454s → ~90-100s, and it stopped lying.
scripts/test-free-shards.tsruns the full ~7,000-test suite as up to six concurrent shard processes (serial within each) with strict per-shard output classification: exit-0-without-bun's-terminal-summary is a FAILURE, a wedged shard is SIGKILLed at a size-scaled deadline and named, and the quiet console contract prints per-shard status +✗ file — test nameepilogues with the full stream in a per-run log. Tree-mutating tests and tree-measuring ratchet readers run in a serial phase after the parallel shards so measurements never race regeneration. 12 orphaned test files wired in; the 3,372-line deadskill-e2e.test.tsmonolith deleted with 4 never-run tests revived out of it; 5 pre-existing env failures quarantined individually with receipts.Paid evals bill by diff. Three-file selection split (
touchfiles-data.tspure literals +test-selection.tslogic +touchfiles.tsfacade, with literal-only + export-parity + duplicate-key tripwires), map-diff selection for edits to the data file itself (old version evaluated viagit show+ a bun child; fail-closed with named reasons), uncommitted/untracked work included in selection, parent-side shard skipping with askipped-by-difftaxonomy and selection banner,EVALS_JOBSsplit fromEVALS_CONCURRENCY, preflight API ping once per run (fail-fast on missing binary/timeout/exit-127),--retry 1on retry-bearing paid paths, detach timeouts floor-enforced against the live shard census.CI. New REQUIRED secretless
free-tests.ymllane (first-ever Linux coverage for ~420 free-test files; least-privilege token, PR-number concurrency, failure-log artifact, main-push runs). Docker cache key trio ends version-bump image rebuilds; Bun 1.3.13;skill-e2e-reviewsplit into three matrix shards (741s job → 3 × ≤250s); actionlint digest-pinned prebuilt image; five jobs right-sized; lint/skill-docs double-runs ended; Windows lane caches bun installs and runs the curated suite.Eval semantics (D1a/D2a/D3a). SDK capture default Opus → Sonnet via centralized
lib/eval-model.ts; judge default STAYS Sonnet after a live A/B regression (below); 4 posture tests demoted to periodic; 9 fixture-extraction commits (SKILL.md sections instead of 1,800-line copies, 58-97% cuts); the 0-for-26 context-save-list test fixed.Review-army fix wave (18 commits). Everything the ship review surfaced and verified, including: cancellation now terminates paid runs (signal forwarders schedule parent exit + launch guards), per-origin classifier buffers (interleaved pipes can't shear a
(fail)line), phantomTREE_MUTATINGkey replaced with the real carve-guard readers + census pin tests, win32 tree-kill viataskkill /T, DSN password percent-encoding, redact placeholder calibration hardened (lowercasepassword/passand bare$wordat URL-password position block; fully-braced${...}interpolations don't), retro E2E requires its report on disk, fork same-name-branch concurrency cancellation closed across three workflows.Test Coverage
Coverage audit (subagent, diff-scoped): 45/54 paths tested (83%) — gate PASS (target 80%). Tests: 498 → 508 files (+11 new, −1 monolith). The one REGRESSION-GAP it found (browser-manager
close()SIGKILL branch untested) was closed in this PR with four unit tests on an injectable race window. Remaining gaps are tracked in TODOS.md follow-ups (evals.yml matrix census tripwire, buildPaidShardArgs pin,main()full-suite path self-exercise).Pre-Landing Review
5 reviewers (checklist pass + testing/maintainability/security/performance specialists) + red team + Claude adversarial + Codex adversarial: 26 findings, all triaged; every confirmed critical fixed in-branch. Highlights: 3 testing criticals (phantom TREE_MUTATING key, vacuous destructive-actions guard, classifier line-shear), red team's fork-concurrency cancel vector + evaporating CI failure logs, Codex adversarial's 3 P1s (cancellation didn't stop paid runs — repro'd;
admin:+ lowercase-password URL passing the redact HIGH gate — verified; DSN corruption on reserved password chars). One deliberate rejection: preflight stays fail-open on generic non-zero exits (pinned by test — a flaky preflight must not block a runnable suite); it now fail-fasts on spawn error/timeout/127. Codex structured review timed out at 540s (exit 124) — that pass contributed NO findings and is missing coverage, not a clean bill; the completed passes above cover the diff.Design Review
No frontend files changed — design review skipped (the only
browse/srcchange is process-lifecycle code inbrowser-manager.ts; diff-scope's frontend flag was a false positive from workflow/test files).Eval Results
qa/SKILL.md.tmpl→ selection bannerselected 17 of 177 tests -> running 4 of 45 shards, reason: diff; 41 shards reportedskipped-by-diff; /qa E2E passed (quick $0.54 + bootstrap $0.13).GSTACK_EVAL_MODEL_JUDGEoverride added. Receipts intest/helpers/llm-judge.ts.eval:bg:periodic) is scheduled post-merge; regressors get Opus pins per D1a.Scope Drift
Scope Check: CLEAN. All 84 files trace to plan items; the two
lib/collaterals are item 7's bash→TS port and the redaction calibration that port triggered on push, both test-pinned.Plan Completion
46 plan items — 37 done, 5 changed, 4 deferred (3 of 4 were declared stretch). Changed: parallelism shipped as N shard processes after a
--parallelprobe hit three Bun 1.3.13 worker pathologies (receipts in the runner header); detach timeouts are static-above-floor with the census-derived floor enforced by test; judge default reverted per D1a's own regressor clause; final full-gate + CI validation routed to this PR's checks (V6/V7). Deferred → TODOS.md: gbrain-detect DI refactor, git-fixture helper (stretch), dynamic fromJSON select matrix (stretch), fail-fast dead shards (stretch).Verification Results
Plan verification V1-V5 complete (post-merge re-measure, failing canary, timing ×2, $0 selection checks, live partial-diff rehearsal). V6/V7 run on this PR's CI: the required free-tests lane's first Linux run + the full gate eval matrix + the cache-trio second-push tag hit. /qa-only auto-verification skipped — no dev server (CLI project).
TODOS
Documentation
Doc sync commit: 9b9bc84 — docs: sync docs for v1.66.0.0 (test/evals/CI speedup)
bun testreferences →bun run test; Tier 1 timing corrected to ~90-100s for the full ~7,000-test suite; strict shard runner documented (--verbose,--wall-timeout); sharded paid-runner paragraph documents diff-based shard skipping and theEVALS_JOBSvsEVALS_CONCURRENCYsplit;GSTACK_EVAL_MODEL_JUDGEdocumented.bun run test(strict shard runner, ~90-100s).bun test" sentences updated tobun run test.Documentation Debt
b831f9b2) — the workspace-revert incident during the ship caught that file between edits.GSTACK_EVAL_MODEL_<KIND>overrides and--shards N --shard iCI mode have no how-to coverage (/document-generatecan fill these).CI validation record (post-open triage, all resolved)
Opening this PR was the forced-full validation moment, and it delivered. Ten CI rounds, every failure root-caused and fixed in-branch:
dockerdriver can't export registry cache —setup-buildx-actionadded at all three build sites; the tag-hit fast path verified on the following round.isOurXvfbsubstring-matched the whole cmdline, so the test runner itself was identified as our Xvfb — the sibling-kill class the identity check exists to prevent; the failure reporter misattributed under GHA::group::wrappers and bun's headerless recap, inventing a phantom failing file) plus five environment classes (no DISPLAY →xvfb-run; missing bun on a deterministic PATH; a claude-binary assumption on the secretless lane; make-pdf gates hard-requiring off-platform; missing xterm vendoring).security-sidepanel-domhad never executed anywhere (no local chromium, no Linux CI) and rotted through three contract changes, ending with the v1.14 sidebar rewrite that removed the UI it asserts on — deleted with receipts.pty-plan-smoke(rotating members) ande2e-workflow(document-release) failed attempt 2 across rounds while passing on three-attempt branches — per-rowretries: 2override for exactly those two rows; every other row keeps--retry 1.Known risks / watch on this PR
Test plan
bun run test(strict runner, exit 0; ~3.5 min under load, ~90-100s dedicated)🤖 Generated with Claude Code