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

Every test file is in the gate or excluded by name with an owning issue; the gate's list leaves forge.json (first half of #261) #496

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The list of files the gate runs now lives in `scripts/gate.ts` instead of `forge.json`, and a new test (`test/check-list.test.ts`) fails whenever a test file isn't accounted for. The gate runs the same files as before, plus that new test. A local `bun run check` was **not** fully green: 602 of 603 tests passed, and one test in `test/fork-flow.test.ts` failed (details below).

shipped production is serving it deploy 97ab7b8

opened this

The list of files the gate runs now lives in scripts/gate.ts instead of forge.json, and a new test (test/check-list.test.ts) fails whenever a test file isn't accounted for. The gate runs the same files as before, plus that new test. A local bun run check was not fully green: 602 of 603 tests passed, and one test in test/fork-flow.test.ts failed (details below).

What moved where

  • scripts/gate.ts (new) exports two lists:

- GATE: the 40 files forge.json's check.run named, in the same order, plus test/check-list.test.ts. - EXCLUDED: the other 119 test/*.test.ts files, each as { file, reason, issue }. Known-red files carry their owners from #261's table: - web-apps → #290 - web-code, web-origins, ssh-site, looks → #291 - surfaces-adversarial → #292 - agents → #293 - highlight → #294 - All the others read reason: "not yet admitted", issue: 261. - It also exports auditGate(present, gate, excluded), which takes plain data and returns one line per problem.

  • scripts/test-shards.ts: --gate runs GATE. Naming files on the command line still works for running a slice by hand.
  • forge.json: check.run is now bun x tsc --noEmit && bun scripts/test-shards.ts --timeout 60000 --gate. scripts/check.ts is unchanged and still runs that one string.
  • test/check-list.test.ts (new, and in GATE) checks the real lists against test/. It goes red when:

- a file is in neither list, or in both; - an exclusion has no reason or no issue number; - an entry names a file that does not exist; - a file is listed twice; - check.run names a test file.

Each of these failure cases has its own test against auditGate.

  • README.md: a paragraph on how a file joins the gate: move it from EXCLUDED to GATE in a pull whose check is green. CLAUDE.md: its sentence about the gate now says what the check covers.

Before and after file sets

  • Before (40): crew, crew-wrapup, crew-limits, crew-sandbox, steer, landing, decide, ledger, checks, dependencies, autonomy, studio, studio-words, forks, fork-flow, cross-repo-pull, pulls, apps, apps-adversarial, apps-busy, apps-token, web, git-trust, helpers, shards, migrate, vitals, asks, feed, feed-page, offline, share, cloud, run-secrets, forge-cloudflare, usage, standing, board-windows, spawn-plan, spawn (each test/<name>.test.ts).
  • After (41): the same 40, plus test/check-list.test.ts. The local run of bun run check reported "41 files".

Test results

  • test/check-list.test.ts: 8 pass.
  • Full bun run check: 602 of 603 pass. The failure is the fork flow > a mirror whose git is not ready yet is fetched again, and lands. It is red alone as well. The repository is seeded 300 ms after the mirror starts, and on this host the 2 s retry still comes back with no branches.
  • That file was already in main's gate, and this diff touches neither src/ nor that test. I did not try it on main itself, though. If the forge's check hits the same failure, it needs its own issue.

What I did not do

  • No file was admitted to or dropped from the gate.
  • No test that is already red was edited.
  • scripts/shards.ts (#307) is untouched.
  • #290 and #291 still say scripts/suite.ts; the list is in scripts/gate.ts.

How to try it

Run bun run check. Then add an empty test/zz.test.ts and run bun test test/check-list.test.ts: it fails with test/zz.test.ts is in neither GATE nor EXCLUDED.

🤖 Generated with Claude Code

Closes #492

commented

The list of files the gate runs now lives in scripts/gate.ts instead of forge.json, and a new test (test/check-list.test.ts) fails whenever a test file isn't accounted for. The gate runs the same files as main, plus that new test. A local bun run check was not fully green: 620 of 621 tests passed, and one test in test/fork-flow.test.ts failed (details below). The forge's check on this pull's previous push was green.

What moved where

  • scripts/gate.ts (new) exports two lists:

- GATE: the 41 files main's check.run names, in the same order, plus test/check-list.test.ts. - EXCLUDED: the other 118 test/*.test.ts files, each as { file, reason, issue }. Known-red files carry their owners from #261's table: - web-code, web-origins, ssh-site, looks → #291 - surfaces-adversarial → #292 - agents → #293 - highlight → #294 - All the others read reason: "not yet admitted", issue: 261. - It also exports auditGate(present, gate, excluded), which takes plain data and returns one line per problem.

  • scripts/test-shards.ts: --gate runs GATE. Naming files on the command line still works for running a slice by hand.
  • forge.json: check.run is now bun x tsc --noEmit && bun scripts/test-shards.ts --timeout 60000 --gate. scripts/check.ts is unchanged and still runs that one string.
  • test/check-list.test.ts (new, and in GATE) checks the real lists against test/. It goes red when:

- a file is in neither list, or in both; - an exclusion has no reason or no issue number; - an entry names a file that does not exist; - a file is listed twice; - check.run names a test file.

Each of these failure cases has its own test against auditGate.

  • README.md: a paragraph on how a file joins the gate: move it from EXCLUDED to GATE in a pull whose check is green. CLAUDE.md: its sentence about the gate now says what the check covers.

Merging main

main admitted test/web-apps.test.ts (#479, closing #290) by adding it to forge.json's check.run. That was the conflict. I resolved it by keeping --gate in check.run and moving web-apps from EXCLUDED to GATE, so both changes are kept.

Before and after file sets

  • Before, main (41): crew, crew-wrapup, crew-limits, crew-sandbox, steer, landing, decide, ledger, checks, dependencies, autonomy, studio, studio-words, forks, fork-flow, cross-repo-pull, pulls, apps, apps-adversarial, apps-busy, apps-token, web, git-trust, helpers, shards, migrate, vitals, asks, feed, feed-page, offline, share, cloud, run-secrets, forge-cloudflare, usage, standing, board-windows, spawn-plan, spawn, web-apps (each test/<name>.test.ts).
  • After (42): the same 41, plus test/check-list.test.ts. The local run of bun run check reported "42 files".

Test results

  • test/check-list.test.ts: 8 pass.
  • Full bun run check after the merge: 620 of 621 pass, including web-apps.
  • The failure is the fork flow > a mirror whose git is not ready yet is fetched again, and lands, which was also red locally before the merge. The repository is seeded 300 ms after the mirror starts, and on this host the 2 s retry still comes back with no branches.
  • That file is already in main's gate, and this diff touches neither src/ nor that test. If the forge's check hits the same failure, it needs its own issue.

What I did not do

  • No file was admitted to or dropped from the gate beyond main's own web-apps.
  • No test that is already red was edited.
  • scripts/shards.ts (#307) is untouched.
  • #291 still says scripts/suite.ts; the list is in scripts/gate.ts.

How to try it

Run bun run check. Then add an empty test/zz.test.ts and run bun test test/check-list.test.ts: it fails with test/zz.test.ts is in neither GATE nor EXCLUDED.

🤖 Generated with Claude Code

commented

Operator: main moved under this branch (forge.json's check command was shortened, among others). Merge main into the branch, resolve the conflicts keeping this change's intent, run the check locally, and push.

commented

Every test file is now either in the gate's list or excluded by name with a reason and the issue that owns it. The list lives in scripts/gate.ts, not in forge.json (first half of #261). forge.json's check.run names no test files: it runs bun scripts/test-shards.ts --timeout 60000 --gate, which runs GATE. test/check-list.test.ts fails if a test file is in neither list, in both, or listed without existing, so a new test file can't sit outside the gate unnoticed.

Merging main (this push)

  • Conflicts: main had added 15 files to the old inline list in check.run. GATE now holds main's list in main's order, plus check-list, and those 15 are removed from EXCLUDED. forge.json keeps the short --gate command.
  • scripts/test-shards.ts: keeps main's splitArgs, the -- short form, --record and timed splits, and adds --gate beside them. --gate and named files can be combined.
  • test/fleet-graph.test.ts: arrived on main without being added to its check. It is green (16 tests), but to keep this gate the same as main's it is excluded as not yet admitted under #261.
  • test/board-windows.test.ts: fails on origin/main too, run alone and in the full check. The board no longer shows the "$0.40 spent, nothing shipped this week" row. It is excluded under a new issue, #555, so this gate passes. Excluding it means this gate runs one file fewer than main's does.
  • Test change: the test in test/shards.test.ts that checks check.run only names real files was written for an inline list. Now that check.run says --gate, it also checks the files in GATE. The test was outdated, not the code.
  • Comment fix: the comment in scripts/check.ts now says the list lives in scripts/gate.ts.

What to look at: scripts/gate.ts (the two lists and auditGate), the argument handling at the top of scripts/test-shards.ts, and forge.json.

Try it: bun run check passed locally: type check plus 772 tests across 56 files in 3 shards, about 6.5 minutes. bun test test/check-list.test.ts runs only the list audit.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs