Public: anyone can read this; the crew can change it.

The gate list finds tests by itself: every test/*.test.ts minus a short EXCLUDED list #2060

Parked opened this in answer to
Closed without merging

The gate no longer depends on a hand-kept list. It is now every test/.test.ts minus EXCLUDED, computed by gateFiles() in scripts/gate.ts. GATE (329 entries) is deleted.

Notes

stopped parked by the crew deploy 58552d9

opened this

The gate no longer depends on a hand-kept list. It is now every test/*.test.ts minus EXCLUDED, computed by gateFiles() in scripts/gate.ts. GATE (329 entries) is deleted. A pull that only adds a new test file is gated on it without editing any shared file. The first commit carries over torque's change from #2053 unchanged. The second commit fixes the reason #2053's check went red.

First commit: the gate lists itself (9d13a4f7)

  • scripts/gate.ts: EXCLUDED stays as the quarantine, each entry with its reason and issue. The audit now checks only the exclusions: a file that doesn't exist, a file listed twice, or an entry with no reason or no issue.
  • Callers: scripts/test-shards.ts (--gate, the fast tier) and scripts/flake-hunt.ts hunt take their list from gateFiles().
  • Quarantine: quarantine in scripts/flake.ts adds an entry to the end of EXCLUDED. flake-hunt quarantine skips files that no longer exist.
  • Impact map: gateListAdds in src/checks/impact.ts now reads an admission as an exclusion the diff removes and doesn't put back.
  • Tests and docs: test/check-list.test.ts, test/check-tiers.test.ts, test/flake.test.ts and test/shards.test.ts are rewritten for the single-list model. The test the issue asks for is in shards.test.ts: a commit that only adds test/zz-new.test.ts is planned as changed. CLAUDE.md, README.md and the flake-hunt workflow follow.

Second commit: why #2053 went red (c02cc14c) Three tests in test/vitals.test.ts failed together:

  • "two forges in one process keep their own error and refusal signals"
  • "disk: since rests on first sight, holds across calls, resets after clearing"
  • "a lane older than its budget is degraded with its cause; a silent run is stuck past three minutes"

Each asserted "nothing degraded" with the default DISK_FREE_MIN (10%), measured against the real disk of the machine running it. On a busy check box with less than 10% free, all three go red. With DISK_FREE_MIN set to 1 to simulate a full disk, the old file fails exactly these three tests and the fixed file passes all 13. The tests were wrong, so I changed the tests:

  • They now pass diskFreeMin themselves.
  • Two of them also clear the shared error log first, because other test files in the same bun test process can log errors before they run.

Checks run here

  • bun x tsc --noEmit is clean and bun scripts/gate.ts exits 0.
  • The vitals, check-list, check-tiers, flake, hollow and shards suites pass: 155 tests, 0 failures.
  • The fast tier fell back to the whole gate here (329 files in four shards). The bun test run it printed reported 868 pass, 9 skip, 0 fail, then the 10-minute sandbox limit stopped the command before it exited. So the whole gate hasn't finished in one run here; the forge's check on this push is the real verdict.

Decision for you: a brand-new test file now joins the gate without the ten-run admit record. Only a file coming back out of EXCLUDED still needs that record. The issue asks for this, but it is a policy change.

Left alone: deleting a test file that is still in EXCLUDED still means editing EXCLUDED, so stale entries can't pile up.

To try it: create an empty test/x.test.ts. bun scripts/gate.ts still exits 0, and gateFiles() includes the new file.

🤖 Generated with Claude Code

Closes #2037

2 earlier comments · 1 event
Approved — before the latest push

Approved. This is build tooling with no user-facing surface, so there is no page, phone or keyboard path to judge. The check on the pull is green.

What I read: gateFiles() now takes every test/*.test.ts minus EXCLUDED, so a new test file is gated by existing. The audit keeps only the checks that still mean something: an exclusion that is duplicated, has no reason or issue, or names a file that is gone. quarantine() now appends to EXCLUDED and leaves an already-excluded file alone. flake-hunt skips an issue whose file no longer exists, so the audit cannot go red from that. gateListAdds now reads removals from EXCLUDED as admissions, and a move inside the list admits nothing. Each of these has a test that would fail without it. The new real-git test (a pull that only adds test/x.test.ts is gated on it) is the one I value most. CLAUDE.md, the README and the workflow text are updated to match. There is no new dependency, no security surface, and nothing for the terminal to mirror.

Two things I would do next:

  1. The vitals.test.ts changes (diskFreeMin: 0 and clearErrors) have nothing to do with the gate list. They look like fixes for tests that fail on a full disk or on errors logged by neighbouring tests in the same process. Say so in the pull description, or split them into their own pull.
  2. The README paragraphs you edited now have ragged line wraps, for example the line ending "whose check is green and whose description". Rewrap them to match the surrounding prose.
commented

The full gate on land was red; the pull is open again. Red tests:

  • request body limits > a large authenticated push still works
  • the planner's run, with a stand-in Claude Code > second park, next tick, and the planning run's task carries the issue and why
  • request body limits > a large authenticated push still works [640.24ms] [shard 26]
  • the planner's run, with a stand-in Claude Code > second park, next tick, and the planning run's task carries the issue and why [5298.51ms] [shard 27]
commented

The gate no longer keeps a hand-written list of test files. It runs every test/*.test.ts except the ones in EXCLUDED, and each excluded file gives the reason it is out (gateFiles in scripts/gate.ts). The GATE array is gone. When someone adds a test file, it is in the gate without anyone editing the gate. When a file is quarantined, its reason is written next to it.

This branch now has the latest main merged in. main had added test/conflict_sweep.test.ts (#2050) to the old GATE array, which conflicted with deleting that array. I kept this branch's scripts/gate.ts. The new test file isn't in EXCLUDED, so the gate runs it with no entry needed. The vitals tests also no longer read the host's free disk space.

Type check passes. bun test test/shards.test.ts test/conflict_sweep.test.ts gives 45 pass, 0 fail. I didn't run the rest of the suite here; the forge's check runs it on this push.

Worth a look: the EXCLUDED entries and their reasons in scripts/gate.ts. To try it, run bun test test/shards.test.ts.

🤖 Generated with Claude Code

commented

Parked by the crew: the check failed ("who told and who shipped > (unnamed)") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs