Skip to content

The weekly test-time recording can land again on its own (GST-3303) - #4581

Merged
capy-ai[bot] merged 5 commits into
mainfrom
ci/seed-recorder-fix
Nov 21, 2026
Merged

capy-ai[bot] merged 5 commits into
mainfrom
ci/seed-recorder-fix

Conversation

@garrytan

@garrytan garrytan commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

The weekly job that re-records how long each test file takes can land its update again without someone fixing it by hand. Free Tests uses those times to split the suite evenly.
It had not landed an update since 11-09: the Windows half kept failing, and its pull request waited for a maintainer whenever a new file ran past 60 seconds.
Nothing to do. The bot's commit and pull-request step runs for real only on the weekly schedule, so the next Monday run is its first live test.

What changed
  • Windows recording, two at a time. It used to time four files at once on a four-core runner. Under that load, tests that pass in the nightly Windows run failed. Today's file count no longer fits the 30-minute job either: a run on main this evening stopped at the limit after 838 of 921 files, with several red files. The recording now runs two files at a time with a 60-minute limit. A trial on this branch timed all 921 files cleanly in 38 minutes.
  • Slow files no longer stall the seed pull request. The seed check refuses a file over 60 seconds unless the allowlist names it, and the bot never touched the allowlist, so each weekly pull request waited for a hand edit. Now the bot lists each new file over 60 seconds with the run that measured it and a follow-up to split it, and drops entries for files back under 60 seconds. It does this with scripts/free-seed-allowlist.ts --reconcile, the same kind of entry a maintainer added by hand on 11-09 and 11-20. The pull request description names every file it adds or drops.
Evidence
  • Four at a time, on main: Windows Free Tests run 44830554276 stopped at its 30-minute limit after 838 of 921 files, with red files including ceo-review-gate and the two gstack-doctor test files. All of these pass in the nightly Windows run.
  • Two at a time, on this branch: run 44830546810 timed all 921 files, none red, in 38 minutes.
  • The 11-16 weekly run had four red Windows files of the same kind, and every weekly recording since 10-26 has ended red on Windows.

That's one run of each setting, so it's a strong signal rather than a rate.

Review

Five reviewers read the whole change, then read the wording fix again. They were a batched specialist (testing, security, state machines), a red team, a native adversarial reader, a second-model review (GPT-6.1 Sol) and a targeted reader for the test-gate change. None found a defect that would fail a test, break production or lose data. The Windows recording job's time limit, raised from 30 to 60 minutes, was approved by the maintainer on the two runs under Evidence.

Review notes

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

  • INFORMATIONAL scripts/lib/free-ci-health.ts:164 auto-admission is unbounded (count and duration); deliberate loosening of the seed ratchet on the bot's PR
  • INFORMATIONAL scripts/lib/free-ci-health.ts:157 growth gate becomes automatic on the seed PR (same as targeted#1)
  • INFORMATIONAL scripts/free-seed-allowlist.ts:29 reconcile ignores record-failures.txt, so a timed-out or crashed file can be admitted or pruned on a bad duration
  • INFORMATIONAL scripts/test-pr-profile.ts:241 comment says only the ratchet reads the allowlist; new scripts not in FREE_ONLY_PR_FILES
  • INFORMATIONAL scripts/lib/free-ci-health.ts:169 formatSeedAllowlist reserializes every entry; a hand-formatted file would diff whole on first change
  • INFORMATIONAL scripts/free-seed-allowlist.ts:29 auto-admission is unbounded (same as p1/targeted#1); bound it per run
Exploratory QA

The new allowlist command was run three times on a copied tree with made-up timings. It admitted a new 65-second file with the run link and a follow-up, dropped a file back at 59 seconds, kept a listed slow file, changed nothing on a second run, and refused a missing run link with exit 2 before writing anything. The workflow's own commit step was not exercised here.

Documentation

Status: updated. One stale wording fix was made in docs/TESTING_INTERNALS.md.

Scope: 8 files changed across 4 commits (14a8498..4732d5f): the weekly seed recorder workflow, the Windows recording job (two workers, 60-minute limit), the scripts/free-seed-allowlist.ts --reconcile command and its library helpers, tests, a changelog fragment and docs/TESTING_INTERNALS.md. There was no uncommitted content before the audit.

Documentation health:

  • docs/TESTING_INTERNALS.md: Updated. The Free suite duration seed section now says files at four workers failed under load, not that they timed out. This matches the corrected workflow comment and changelog.
  • CONTRIBUTING.md: Current. The manual Windows seed refresh command is unchanged.
  • TODOS.md: Not changed (outside this audit's scope). Its seed items stay accurate.
  • changelog.d/ci-seed-recorder-unstuck.md: Reviewed and current. It was not edited because it is outside this audit's scope.

Coverage debt: scripts/free-seed-allowlist.ts has a reference entry and a usage header but no how-to page. It is an internal CI tool, so this is low-priority debt.

Diagram drift: none.

Tests
  • Free Tests run 44836537383 at af3257f: green, 1,722 files. Free Tests run 44840566118 at the final head 89b2660: green, 1,722 files.
  • Local: test/free-seed-ratchet.test.ts, test/spawnsync-timeout-tripwire.test.ts and test/bun-entry-isolation.test.ts at af3257f: 28 pass, 0 fail.
Agent notes

Tracking: GST-3303; the Captain chose option A on 11-20 (close #4249, fix the recorder in phase 2). #4249 is closed as superseded by #4578.

Plan: exempt: bug fix

Local: free-seed-ratchet (new reconcile and format tests), free-durations-record-workflow, free-fixtures, bun-entry-isolation, harness-version, workflow pins and shell lint, egress wiring, and every test that reads TESTING_INTERNALS.md or the two workflows (470 pass), typecheck, actionlint 1.7.11. /ship added af3257f, an end-to-end test of the allowlist command, because the pre-gate found no test naming scripts/free-seed-allowlist.ts. 4732d5f and 89b2660 are the Captain's wording fix (failed under load, not timed out) and the docs audit's matching line.

Approvals

No approvals recorded for branch ci/seed-recorder-fix.
Plan: exempt: bug fix
Plan check: exempt bug fix

REVIEW_LOOP: passes=2 blocking_found=1 deferred=0 noted=6 fixed=0 scope=frozen ledgers_read=4 dispatches=8
Gate edits: 10 listed, 3 read, 1 findings — 1 kept, 0 restored, 0 open

  • kept: RH-15 .github/workflows/windows-free-tests.yml — owner disposition a-971ed3dc3524
    Gate disposition: .github/workflows/windows-free-tests.yml:313:gate-integrity [gate c9bf3f7157d7] at af3257f by Captain GStack Minder (GSTA-36) at 2026-11-20T23:49:38.930Z: Windows recording job limit 30 to 60 min: run 44830554276 at four workers hit 30 min, run 44830546810 at two workers took 38 min — "GStack Minder, 2026-11-20: approve 60. Two workers timed all 921 files in 38 min (run 44830546810), and four workers hit 30 min at 838 files (run 44830554276); 60 gives headroom over one run." (approval a-971ed3dc3524)
    Allowlist edits by the bot: approved by Captain GStack Minder (GSTA-36), 2026-11-20; follow-ups after change 7: skip record-failures.txt files when reconciling, and cap admissions per run.

Open in Capy

{
  "schema_version": 1,
  "pr": 4581,
  "head": "89b26605024fcc2ee04b986c509070110890df51",
  "version": "1.102.1.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 1722,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 44840566118,
      "attempt": 1,
      "tree": "ed2263cab9d271ce70c31bc36d59e7ac6ef892d7"
    }
  ],
  "calls": 29,
  "session_kind": "unattended",
  "run": "ship-4581-ee8539f",
  "head_tree": "ed2263cab9d271ce70c31bc36d59e7ac6ef892d7",
  "product_patch_id": "8209e7adf93b1dd9f7b3da123376245dcf59756f",
  "gstack_version": "1.102.1.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 77,
    "rules": "85b3923b1a978e41",
    "base": "92c57ca4ce41b81af450a7543152fa0e5771928c",
    "registry": "92c57ca4ce41b81af450a7543152fa0e5771928c",
    "gate_scan": {
      "tagged": 1,
      "head": "89b26605024fcc2ee04b986c509070110890df51"
    },
    "reasons": [
      "gate-class",
      "runtime=77"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "warn @ed2263cab9d2 (8 checks, current for 89b26605024f)",
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/, README.md, changelog.d/ (docs/TESTING_INTERNALS.md wording matched to the corrected failure cause; CONTRIBUTING.md checked)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 1,
    "deferred": 0,
    "noted": 6,
    "fixed": 0,
    "scope": "frozen",
    "rounds": 2,
    "ledgers_read": 4,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  },
  "gate_dispositions": [
    {
      "finding": ".github/workflows/windows-free-tests.yml:313:gate-integrity",
      "gate_id": "c9bf3f7157d7",
      "head": "af3257f52165dc80389bee52a4ec855e5d543430",
      "by": "Captain GStack Minder (GSTA-36)",
      "reason": "Windows recording job limit 30 to 60 min: run 44830554276 at four workers hit 30 min, run 44830546810 at two workers took 38 min",
      "words": "GStack Minder, 2026-11-20: approve 60. Two workers timed all 921 files in 38 min (run 44830546810), and four workers hit 30 min at 838 files (run 44830554276); 60 gives headroom over one run.",
      "at": "2026-11-20T23:49:38.930Z",
      "approval": "a-971ed3dc3524"
    }
  ],
  "review_targeted": {
    "classes": [
      "gate"
    ],
    "rules": "b3f6f8b4843c0c30",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "8209e7adf93b1dd9f7b3da123376245dcf59756f",
    "status": "done",
    "findings": 1,
    "raised_by": "targeted"
  }
}

garrytan and others added 2 commits November 20, 2026 22:37
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The Windows recording runs at two workers with a 60-minute job: at four,
files that pass nightly timed out under load and the recording outran its
30-minute job (runs 43802987074, 44830554276); at two, all 921 files timed
cleanly in 38 minutes (44830546810). The propose step reconciles the
allowlist with the recording (scripts/free-seed-allowlist.ts --reconcile):
new files over 60 s become annotated exceptions naming the run, files back
under leave, and the PR body lists both, so the seed PR passes the ratchet.

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

trunk-io Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 3 commits November 20, 2026 23:23
The weekly recorder now runs scripts/free-seed-allowlist.ts; this runs it on a copied fixture tree and checks the rewritten allowlist and its ADMITTED and PRUNED lines, so a change to the command is caught by a test.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The red files at four workers were assertion and JSON-parse failures, not timeouts. The workflow comment and the changelog entry now say so, and the changelog no longer reads as if the 30-minute overrun still happens.

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>
@capy-ai
capy-ai Bot merged commit 507ebfc into main Nov 21, 2026
76 checks passed
capy-ai Bot added a commit that referenced this pull request Nov 21, 2026
- Habits from nine teams, written into gstack. (#4585)
- Three more habits from teams that run evals. (#4602)
- The /ship conductor trial plan gives its real-problem judge one more attempt on fresh labels after it missed its agreement bar twice, and stops the trial incomplete if it misses again (GST-3003). (#4611)
- The /ship conductor trial plan now stops a trial only at the final remote-gate refusal, gives both arms the same note that the brief overrides team rules, and counts every report the no-gstack arm returns (GST-3003). (#4609)
- The /ship conductor trial plan now ends a trial at the remote gate when its case base isn't main, gives the no-gstack arm a test runner, and audits every trial for exposure to the plan (GST-3003). (#4605)
- The /ship conductor trial plan now runs an uncounted pilot in every arm before its counted trials and takes one planned look at half the cases (GST-3003). (#4587)
- gstack's own use on Capy can be counted, and is kept out of real-use numbers. (#4576)
- Free Tests shards finish closer together. (#4578)
- The weekly test-time recording can land again on its own. (#4581)
- The job-log tree.json step's recommended sleep is long enough for real runners. (#4589)
- Pull requests no longer wait on the Trunk flaky-test upload, and the quick tier's flaky passes now reach Trunk. (#4579)
- Windows Setup E2E finishes sooner on install changes. (#4575)
- Skills no longer stop on Codex when they clean up temp files. (#4612)
- /review on Codex with OpenAI models no longer holds back a review that ran its adversarial pass. (#4622)
- Crew threads on Capy now check in at 500M own tokens, standing threads rotate at 250M and any subagent past 50M gets a look, half the old lines, because Capy's token counts read about half what they did before 2026-11-15. (#4582)
- gstack no longer offers to add a `## Skill routing` section to your project's CLAUDE.md. (#4629)
- The README and docs no longer say gstack makes your agent fix more bugs. (#4598)
- `/eval-plan` now writes eval plans that waste less money. (#4591)
- /cso checks every folder above a source file before it looks at the file, so it never looks through a symlinked folder. (#4592)
- Plan reviews no longer read a /design-review audit summary as the branch's design doc. (#4623)
- Node's built-in test files now run with `node --test` in repos that use vitest or jest. (#4626)
- A quarantined test that the runner skipped now fails the run instead of passing it. (#4590)
- A flaky free test is fixed: the spawnSync overflow check no longer fails about once an hour on CI. (#4613)
- Free Tests runs its shards on 16-core runners. (#4600)
- /office-hours asks for ground truth first. (#4468)
- Every startup session ends with a dated test. (#4468)
- /plan-tune's dream cycle now logs each send of your typed answers to Anthropic. (#4621)
- Landing a ready PR no longer depends on a hand-copied gate decision, and the ready note, release PR and squash message say the right thing. (#4596)
- /ship no longer asks for a fresh review because of a stacked parent that main already had. (#4580)
- Results PRs with large captured agent sessions can be reviewed. (#4574)
- /ship no longer stalls on review notes a reviewer already cleared, counts review rounds the way the review policy reads them, and keeps security findings out of the PR body. (#4595)
- /ship's review readers are now told never to stop processes they didn't start. (#4607)
- /ship's review no longer stops when Capy's own drive sync database grows past 100 MB. (#4606)
- /ship's preflight now honors your repository's time limit for rerunning CI-skipped tests, and tells you when a fresh worktree needs its packages installed. (#4608)
- The slowest free test file is now six files. (#4588)
- Step 11.5 keeps a reviewed head current across base-only merges. (#4577)
- On a Capy install, only the owner's opt-in sends telemetry. (#4597)
- New page: working across agent systems. (#4583)

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