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

Red after landing: test/spawn-cell.test.ts fails on main #12945

opened this in answer to

Closed 17d 16h ago

Main's check went red on the test time budget, not on a test assertion. That is why the earlier tries could not reproduce it. I haven't run the forge's full check, so nothing confirms the fix on the gate box yet.

Notes

opened this

Main's check went red on the test time budget, not on a test assertion. That is why the earlier tries could not reproduce it. I haven't run the forge's full check, so nothing confirms the fix on the gate box yet.

The forge's check log (run 01m7e0ck…) names three breaches:

  • test/agents.test.ts, one test: "a webhook to a server that never answers" took 10.04 s against the 2 s per-test budget. It really waited out the production 10 s delivery timeout.
  • test/agents.test.ts, whole file: 25.3 s against the 20 s file budget, mostly that one test.
  • test/spawn-cell.test.ts, whole file: 25.3 s against the 20 s file budget. The file's real bwrap-cell tests are skipped in my sandbox, so I couldn't time them here.

What changed

  • deliverDue in src/core/webhooks.ts takes an optional trailing timeoutMs. It defaults to the existing DELIVER_TIMEOUT_MS (10 s), so production behaviour is unchanged.
  • The hang test passes 300 ms and asserts it returns in under 5 s. It still fails if the delivery has no abort signal. test/agents.test.ts now runs in about 4 s, down from 25 s.
  • test/spawn-cell.test.ts is now in SLOW in scripts/gate.ts, under #12939. The reason is its real-cell boot tests (25.3 s on the gate box), the same way spawn-cell-e2e is listed.

What I checked

  • bun scripts/gate.ts and bun x tsc --noEmit are clean.
  • bun test test/agents.test.ts and test/spawn-cell.test.ts pass.
  • In the gate, budget and webhook test files I ran, one test fails: the looks-lane test in test/test-budget-run.test.ts. It needs Chromium, which this sandbox lacks, and my change doesn't touch it.

Not done: I didn't try to shrink the cell-boot time in spawn-cell.test.ts, because I can't time those tests without a cell. If someone wants it under 20 s, that is a separate issue.

Closes #12939

2 earlier comments
commented

Main's check went red on the test time budget, not on a test assertion. That is why the earlier tries could not reproduce it. I haven't run the forge's full check, so nothing confirms the fix on the gate box yet.

The forge's check log (run 01m7e0ck…) names three breaches:

  • test/agents.test.ts, one test: "a webhook to a server that never answers" took 10.04 s against the 2 s per-test budget. It really waited out the production 10 s delivery timeout.
  • test/agents.test.ts, whole file: 25.3 s against the 20 s file budget, mostly that one test.
  • test/spawn-cell.test.ts, whole file: 25.3 s against the 20 s file budget. The file's real bwrap-cell tests are skipped in my sandbox, so I couldn't time them here.

What changed

  • deliverDue in src/core/webhooks.ts takes an optional trailing timeoutMs. It defaults to the existing DELIVER_TIMEOUT_MS (10 s), so production behaviour is unchanged.
  • The hang test passes 300 ms and asserts it returns in under 5 s. It still fails if the delivery has no abort signal. test/agents.test.ts now runs in about 4 s, down from 25 s.
  • test/spawn-cell.test.ts is now in SLOW in scripts/gate.ts, under #12939. The reason is its real-cell boot tests (25.3 s on the gate box), the same way spawn-cell-e2e is listed.

What I checked

  • bun scripts/gate.ts and bun x tsc --noEmit are clean.
  • bun test test/agents.test.ts and test/spawn-cell.test.ts pass.
  • In the gate, budget and webhook test files I ran, one test fails: the looks-lane test in test/test-budget-run.test.ts. It needs Chromium, which this sandbox lacks, and my change doesn't touch it.

Not done: I didn't try to shrink the cell-boot time in spawn-cell.test.ts, because I can't time those tests without a cell. If someone wants it under 20 s, that is a separate issue.

commented

I merged main into the branch and pushed it. The merge leaves the branch with no changes compared to main, so #12945 no longer adds anything of its own.

main fixed both breaches from #12939 while this pull was open, so I kept main's side in all three conflicted files:

  • src/core/webhooks.ts and test/agents.test.ts: main has the same optional timeoutMs on deliverDue and the same 300 ms hang test, with a 2 s bound where mine was 5 s.
  • scripts/gate.ts: main split the slow cell-boot tests into test/spawn-cell-real-child.test.ts and listed that in SLOW. That makes my spawn-cell.test.ts entry unnecessary, so I dropped it.

bun scripts/gate.ts and bun x tsc --noEmit are clean. test/spawn-cell.test.ts and test/agents.test.ts pass: 66 pass, 1 skip.

Since there's nothing left to land, the pull can probably be closed, and #12939 along with it, once the forge's check on main confirms it's green.

commented

Closed by the crew: superseded, its change is already on main in 1b16e457.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs