Repository navigation
Description
The fork's tooling tests (.github/scripts/, fork-ci/, fork-kit/) come to about 160 000 lines in 191 *.test.* files. Their listed weight in .github/fork-ci-tests.txt is about 2 700 s, and each test with no weight adds another 10 s. From now on they follow docs/fork/tooling-tests.md: upstream's 15_testing.md as the baseline, the "is this test worth keeping" check, and a few core tests per tool. The fork-test-names-check.cjs check (part of Fork checks) refuses new test names that carry a PR, issue or round. This issue cleans up the tests that already exist.
Rules for every part (merge safety)
- One test file per PR. Before you start, check that no open PR touches the file:
gh pr list -R scuttletoby/t3code --state open --json number,files -q '.[]|select(any(.files[]; .path=="<file>"))|.number'. If one does, wait for it or take another part. - Keep every important behaviour covered. Run the "worth keeping" check from the doc on each test. A test whose failure would mean a real break (data, security, the merge or deploy path, what a person sees) stays, or is folded into a table. A test that only guards a small detail is deleted. Prove it with a planted bug in the code under test: it fails before the change and still fails after (or show the kill rate, once a mutation job covers the module).
- Shrink the allow list. A renamed or deleted flagged name also comes out of
.github/fork-test-names.json(the check enforces this). If the file's run time changes, update its weight line. - Merge as usual. The PR goes through the normal lenses and merge queue. Nothing is merged past them.
Parts, sorted by estimated CI seconds saved
Measured on main at 9983982. "Weight" is the ~Ns in .github/fork-ci-tests.txt; "-" means none, which counts as 10 s. The saving is estimated from the share of the file's tests a part removes, and each part reports its real number. The last five rows have no estimate yet: their saving is measured within the part, and they are sorted by weight.
| # | File | Lines | Weight | What is there | Proposed part (delete / fold) | Est. CI s saved |
|---|---|---|---|---|---|---|
| 1 | Hand-written mutants: RedCheck classes in 43 fork-kit/.github test files (813 lines) |
Largest: heavy/tests/facts.test.py (210 lines, 1.7 s locally), .github/scripts/fork-ci-plan.test.py (88, 1.1 s), schedule-kick/tests/keepon.test.py (70, 1.9 s), schedule-kick/tests/heads.test.py (47, 1.4 s), model-guard/tests/install.test.py (30, 8.3 s) |
Delete. Blocked on 1a: a weekly mutation job over the kits' modules, with a baseline. No fork workflow runs mutation-report yet. After that, one PR per file deletes its class |
~40–80 in all | ||
| 2 | fork-kit/agent-guards/tests/actions-disable.test.py |
5 481 | 60 s | 20 classes named after a PR, issue or round (150 of 269 tests, 2 572 lines), 2 in-file mutant blocks, test_issue_1436_… |
Delete the mutant blocks, plus the round tests that only guard a small detail or repeat a general case. Fold the rest into a few behaviour tables (switch-off shapes, pipe into a shell, script names) | ≤ 30 |
| 3 | fork-kit/golive/tests/switch.test.py |
1 788 | 109 s | Round2 (15 of 108 tests) |
Delete what repeats the verify/rollback cases; fold the rest | ≤ 15 |
| 4 | fork-kit/agent-guards/tests/leak-guard.test.py |
655 | - | RoundOnePostTest, RoundTwoPostTest, RoundTwoPushTest (18 of 40 tests) |
Fold into one post/push table; delete repeats | ≤ 4 |
| 5 | fork-kit/claude-login/tests/claude-login.test.py |
978 | - | RoundTwoTest (7 of 58) |
Delete repeats, fold the rest | ≤ 1 |
| 6 | fork-ci/actions/gradle-cache/gradle_cache.test.py |
781 | - | 5 Issue13xx… classes (13 of 43 tests) |
Rename after behaviour; merge rows that overlap | ~0 |
| 7 | fork-ci/actions/pr-queue/pr_queue.test.py |
6 048 | 89 s | Sec1R2, test_pr_9_left_off_… |
Rename. Look for duplicates across its 402 tests (they would move to part 7b if found) | ~0 |
| 8 | fork-kit/slot-filler/tests/catch-up.test.py |
931 | - | test_pr_43_shape_… |
Rename | 0 |
| 9 | fork-kit/agent-guards/tests/repro_1387_r2.py + repro-1387-r2.sh |
350 | (imported) | Repeats Issue1387Round2Test |
Delete both after part 2 (moving any row part 2 still lacks) | 0 (−350 lines) |
| 10 | fork-kit/golive/tests/install.test.py |
168 s | The heaviest file | Worth-keeping check per test; delete slow small-detail tests; merge repeated tables | measured in part | |
| 11 | fork-kit/pc-agents/tests/setup.test.py |
153 s | Same | measured in part | ||
| 12 | .github/scripts/fork-fleet.test.py |
6 432 | 141 s | Round-history comments ("lens B minor 4: mutants that stayed green") | Same; delete history comments (git keeps that history) | measured in part |
| 13 | .github/scripts/fork-contracts.test.py |
5 733 | 91 s | Same | measured in part | |
| 14 | .github/scripts/fork-seam-check.test.cjs |
4 758 | 23 s | Round-history comments ("Round 2's surviving mutant (M22)") | Same | measured in part |
These are not mutants and they stay: bad-input tables for checkers, such as the workflow mutants tables in fork-contracts.test.py, fork-schema-check.test.cjs and fork-upstream-files-check.test.cjs, and toml_mutant in fork-secret-scan.test.sh.
Placement
General tools' tests stay in the fork. Tests specific to one project belong in that project's repository. Any part that finds a project-specific test in the fork moves it there (or deletes it) instead of folding it.
🤖 Generated with Claude Code
Activity
Tooling tests doc: upstream baseline, is a test worth keeping, core t…
Test-name check: refuse shrunk roots and removals for untouched files…
Test-name check: judge the list and roots against the merge-base, not…
Tooling tests: rules against bloat and a ratchet on PR- and round-nam…
scuttletoby commentedon Nov 30, 2026
Taking part 4:
fork-kit/agent-guards/tests/leak-guard.test.py(fold the round classes into the post/push cases, delete repeats).🤖 Generated with Claude Code
scuttletoby commentedon Nov 30, 2026
Taking part 3:
fork-kit/golive/tests/switch.test.py(fold theRound2class into the behaviour classes, delete what repeats the verify/rollback cases).🤖 Generated with Claude Code
Tooling tests: fold leak-guard.test.py (#1511)
Tooling tests: fold fork-kit/golive/tests/switch.test.py (#1523)