Repository navigation
chore(skills): recurring test-health audit, a full-pass wrapper and tracker helpers - #3841
Merged
Merged
Conversation
…racker helpers Adds two repo-local skills that keep the existing tests in shape, and the scripts that make them deterministic across agents. - test-health: one run audits a few clusters of related test files through eight lenses, proves each fix (mutation receipts, repeated runs, obligation maps), lands fixes in per-package batches behind a mechanical gate, and records the run on an append-only ledger ref. - test-health-push: the same audit over the whole suite in parallel against an integration branch. It adds only scale. - scripts/test-health.ts: inventory, static smell scanner, neighbours, rotation and claims, measure, mutate, worksheet validation, the batch gate with test accounting, shards and metrics. Output is one line of JSON by default, with the detail in files. - docs/process/test-authoring.md: which test proves which claim, structure, determinism and cost. docs/decisions/test-health.md records the rulings. - scripts/issue-queue.ts and scripts/pr-status.ts replace the gh-and-jq pipelines of the work-issue and triage-issues skills, which no longer prefix commands with `rtk proxy`. - The tooling's own tests live in scripts/skill-tests/ (bun run test:skills), outside product discovery, so they never gate a product change. Closes #3840 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
schlessera
marked this pull request as ready for review
November 10, 2026 11:06
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3840
What changed
Two repo-local skills now keep the existing tests in shape, backed by scripts that decide everything a script can decide.
test-healthdoes one recurring run: it picks a few clusters of related test files, audits them through eight lenses (tests that cannot fail, overlap between tiers, non-determinism, open failure issues, cost, tests that do not run, wrong tier or double, hygiene), proves each fix, lands fixes in per-package batches and records the run on an append-only ledger ref.test-health-pushruns the same audit over the whole suite in parallel against an integration branch; it adds only scale.docs/process/test-authoring.mdis the guide the audit checks against.The
work-issueandtriage-issuesskills now usescripts/issue-queue.tsandscripts/pr-status.tsinstead ofghandjqshell pipelines, and no longer prefix 41 commands withrtk proxy, which switched output compression off.Why this shape
The rulings are in
docs/decisions/test-health.md. In short:tests/accompanies every package change's unit proof, so they live inscripts/skill-tests/(bun run test:skills), where a broken audit tool blocks only itself.Rejected: one pull request per audited cluster; relying on the leaf-test shortcut (about 15% of test files qualify); keeping the rotation's state in the main tree.
Proof
Tested head
ab79790ede42b976fbb2ad1e132f14401527cb37on based79eeed0a1860184bc552e034525286a230eaa0f.Mutation receipts, each produced by the new
mutatecommand against the real runner (the named test fails with the guard broken and passes with it restored):agent-readyallowed beside aneeds:labelproofcheck read as passedCollisions at head
ab79790ede42b976fbb2ad1e132f14401527cb37(bun scripts/collisions.ts --json --pr 3841): no textual or path collision. 21 open pull requests share a proof closure with this one (#3054, #3056, #3059, #3069, #3116, #3393, #3437, #3464, #3581, #3622, #3662, #3726, #3735, #3761, #3772, #3786, #3805, #3806, #3827, #3837, #3839), as expected for a change to root tooling whose affected closure is every workspace.Read-only commands were also run against the live tracker and a live pull request:
issue-queue candidates,snapshot,show,check, andpr-statuswith--failures --logs. The planner was run offline against the real tree with a scratch ledger.{"version":1,"kind":"brain-check-pr-receipt","head":"ab79790ede42b976fbb2ad1e132f14401527cb37","base":"origin/main","mode":"focused","startedAt":"2026-11-10T10:55:33.210Z","finishedAt":"2026-11-10T10:56:56.968Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":11984.643028},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":101.39566299999933},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":69.6613899999993},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":17.41590499999984},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":71568.454044}]}Anything left open
measureandmutate(the pinned container) was not exercised. For browser tiers the test accounting checks titles only, because that runner reports no case list.bun run test:skills. Thetest-healthskill runs it as its first step. A workflow for it would be a proof-system change and is out of scope here.plancreates it.Checklist
docs/reflect the change, or nothing documented moved.docs/decisions/provider-history.md): the provider-history guard passes, or nothing on a turn's path changed.🤖 Generated with Claude Code