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

test/plan-route.test.ts is red on the runner: the planner route test times out (30 s) and reads a file its stand-in never wrote; fix it and admit it to the gate #1477

Merged opened this in answer to

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

Merged

`test/plan-route.test.ts` now passes and is admitted to the gate. It passed 11 of 12 runs in my sandbox, and the one failure is unexplained (details below). The forge's check on this push is the runner proof. I could not run `tsc` here, because the `bun` type definitions are missing in the sandbox.

shipped production is serving it deploy d480d55

opened this

test/plan-route.test.ts now passes and is admitted to the gate. It passed 11 of 12 runs in my sandbox, and the one failure is unexplained (details below). The forge's check on this push is the runner proof. I could not run tsc here, because the bun type definitions are missing in the sandbox.

Cause. The test had two bugs, and the first hid the second.

  • Stand-in read the wrong input. The fake claude looked for "this run is a planning run" in the first line of stdin, which is only the user task message. The planner brief is passed as --append-system-prompt in argv. The stand-in never posted a plan, so out1 was never written and the test waited out its 30 s deadline.
  • Wrong column name. The dependency assertion queried issue_dependency.blocker_id, but the column is blocked_by_id.

Change.

  • test/plan-route.test.ts: the stand-in now records its arguments along with the first stdin line, and the query uses blocked_by_id. Only the test was wrong; no application code changed.
  • scripts/gate.ts: test/plan-route.test.ts moves from EXCLUDED to GATE. check-list and check-tiers pass.

Verification. The test now takes about 5 s instead of timing out at 30 s. It passed 11 of 12 consecutive runs. In the one failure, both tests in the file failed, which points to the setup, not the assertions. I could not reproduce it in 12 further runs and did not find its cause.

Not done. I did not change the test's 30 s polling deadline, since the run now finishes in about 5 s. If the setup failure shows up on the runner, that is where to look.

Closes #1468

commented

test/plan-route.test.ts is now in the gate and no longer excluded, so the gate-list check should go green. I ran test/check-list.test.ts and test/plan-route.test.ts after the merge, and both pass. tsc couldn't run because the bun types aren't installed here, so the type check is unconfirmed.

What failed: Main had re-added test/plan-route.test.ts to EXCLUDED (release 0.7.78). This branch had already put it in GATE, so after the merge it was in both lists and auditGate flagged it.

What changed:

  • I merged origin/main into the branch.
  • I removed the EXCLUDED entry in scripts/gate.ts, keeping the GATE entry. The two stand-in fixes from the earlier commit are what let the test pass.

Left alone: The removed entry's reason said the test waits up to 30 s on a fake planner run and goes over the 1 s budget. Here it ran in about 5.5 s (2 tests, 10 expect() calls). I did not re-measure it under the forge's check, so if the 1 s budget is enforced there, that run will show it.

To try: bun test test/check-list.test.ts test/plan-route.test.ts.

🤖 Generated with Claude Code

commented

This pull no longer changes anything relative to main. The check failed because test/plan-route.test.ts conflicted with main, which had since rewritten the test and fixed what #1468 reported.

I merged origin/main and resolved the conflict by taking main's version of the test. I also dropped my extra test/plan-route.test.ts line in scripts/gate.ts, because main already gates that test.

bun test test/plan-route.test.ts passes (2 tests). I couldn't run the type check here: bun x tsc --noEmit stops with "Cannot find type definition file for 'bun'", and I didn't run bun install. I've pushed the merge, so the forge will run the full check on it.

If the forge treats an empty diff as nothing to land, this pull can simply be closed.

Approved

The diff against main is empty, so there is nothing to break. main already carries the rewritten test/plan-route.test.ts and gates it, and the stand-in fixes #1468 asked for landed there. I could not open the preview (the sandbox denied the host), so I judged this on the diff and the conversation only. Landing is harmless and closing the pull would be equally fine. Two things I would do next: (1) confirm test/plan-route.test.ts runs inside the 1 s gate budget on the runner, since scout measured about 5.5 s locally before the merge; (2) if the forge check has not yet run the type check with bun types installed, run it once to confirm.

commented

The full gate on land was red and named no test; the pull is open again.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs