Repository navigation
Description
Context
The rules for good tests are written down (docs/process/testing.md, docs/process/test-waits.md), and one-off epics have repaired the suite before, but nothing audits the existing tests on a schedule. At 3aadc8df51294fc32fc14cd3b5552de4d52193fc the unit cost table lists 1,179 files and 4,354 s, with 62% of that time in the 50 slowest files, and 80 type: test issues are open, 23 of them needs: repro.
The two skills that pick up and triage issues also cost more than they need to. .agents/skills/work-issue/SKILL.md, its references/ci-and-merge.md and .agents/skills/triage-issues/SKILL.md prefix 41 commands with rtk proxy, which switches rtk's output compression off, and they select issues with gh ... | jq shell pipelines that depend on tools an agent environment may lack and that each agent has to re-derive.
Scope
- A
test-healthskill for a recurring run: it audits a few clusters of related test files in depth through eight lenses, proves each fix, lands fixes in per-package batches and records the run. - A
test-health-pushwrapper skill that runs the same audit over the whole suite in parallel against an integration branch and lands once. It adds only scale. scripts/test-health.tsand its modules: inventory, static smell scanner, neighbour detection, rotation and claims on an append-only ledger ref, repeated-run measurement, mutation receipts, worksheet validation, the batch gate with test accounting, shards and metrics.docs/process/test-authoring.md: which kind of test proves which claim, structure, determinism and cost, mapped to every smell the audit knows.docs/decisions/test-health.mdrecords the rulings.scripts/issue-queue.tsandscripts/pr-status.ts, and thework-issueandtriage-issuesskills rewritten around them withoutrtk proxyorjqpipelines.- The tooling's own tests in
scripts/skill-tests/, run withbun run test:skills, outside product discovery.
Out of scope
- A hosted workflow for the skill-tooling tier. It would be a proof-system change and needs its own decision.
- Running the first audit or a full push. This delivers the tooling only.
- Any change to product code, product tests, timeouts, shards, selection rules or workflows.
- Reconciling labels that exist on issues but not in
scripts/labels.ts.
Acceptance criteria
bun run test:skillspasses, and product discovery (./packages,./tests) and the experiment tier contain none of those tests, proven by a test.- The batch gate refuses: a change outside test code, a proof-system change, a commit with no recorded audit, a new skip, retry, focused test or long time budget, and any test title that disappears without a fixed finding naming it. Each refusal is proven by a test, and a mutation of each guard makes its named test fail.
- For Bun test files, a recorded cluster's executed case count may fall only by the declared number; a shortened table and an undeclared removal are each refused at record time, proven by tests.
- Two writers appending to the ledger ref concurrently both land, proven against local git remotes with a forced push race.
- Every command, subcommand and flag the five skill documents name exists in the script it names, and no skill prefixes a command with
rtk proxyorrtk bypass, proven by tests. - The
test-health-pushskill names no lens, smell or finding action of its own, and its config profile changes only what scale requires, proven by tests. bun run lint,tsc --noEmitandbun run check:pr --base origin/mainpass.
Verification
bun run test:skills, bun run lint, the typecheck and bun run check:pr --base origin/main, plus mutation receipts for the gate, the ledger compare-and-swap, the accounting and the claim race, recorded in the pull request.
Contract impact
None: repository scripts, skills and documentation. No CLI --json shape, MCP schema or package changes.
Activity
schlessera commentedon Nov 10, 2026
Delivered by #3841, squashed to
mainasa26e2546f9f033d124d7504fdd5de63d575b3bda.9d59ed3835310bfc18031bc8d46cc8415f2b9237against basef100cc95a4a4cd5871cd77921cdd388a962d200b.d94019b530ed8e2819f331c0b640571bd418ce20, the tree of the merge checkout the confirmation tested.Left open, as named in the pull request and out of this issue's scope: no agent has done a real audit run yet; the browser-tier path of
measureandmutateis unexercised; no hosted job runsbun run test:skills; the ledger ref is created by the first realplan.