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

Flaky test: a real child forge > boots in its own forge:<name> cell and answers / through the forward; its first request is held until it is up #17553

opened this in answer to

Merged 25h 26m ago, live in production

The real-child test no longer depends on the machine being quiet. I couldn't confirm the fix, because this sandbox has no bwrap/socat and skips both tests. The forge's check will be the first real run.

Notes

opened this

The real-child test no longer depends on the machine being quiet. I couldn't confirm the fix, because this sandbox has no bwrap/socat and skips both tests. The forge's check will be the first real run.

Cause (inferred, not reproduced). The helper's first request is held for production's 20 s wake window (wakeLimits.waitMs). On a loaded runner the child boot can take longer than that. The request then gets the 503 "waking up" page instead of 200, and the first assertion fails. The 10 s window for the forge:kid label and the first heartbeat could also run out under load.

Change. Only test/helpers/real-child-forge.ts changed:

  • It sets wakeLimits.waitMs to 60 s for the helper's process. That stays inside the helper's 85 s timeout and the hook's 90 s, so the first request really is held until the cell is up.
  • The label and heartbeat wait goes from 10 s to 30 s. It still breaks out as soon as both are seen, so a fast machine pays nothing.

The test assertions and production code are unchanged.

Checks. bun scripts/gate.ts --explain passes all 32 rules, and the pushed commit has no --fix rewrap to commit. bun x tsc --noEmit printed nothing, which I read as clean. bun test test/spawn-cell-real-child.test.ts ran 0 pass, 2 skip.

Left out. I didn't make the child boot itself faster. The other refusals the issue lists (dead-code, /llms.txt budget, module-level state, as never) aren't touched by this change.

Closes #17552

commented

The real-child test no longer depends on the machine being quiet. I couldn't confirm the fix, because this sandbox has no bwrap/socat and skips both tests. The forge's check will be the first real run.

Cause (inferred, not reproduced). The helper's first request is held for production's 20 s wake window (wakeLimits.waitMs). On a loaded runner the child boot can take longer than that. The request then gets the 503 "waking up" page instead of 200, and the first assertion fails. The 10 s window for the forge:kid label and the first heartbeat could also run out under load.

Change. Only test/helpers/real-child-forge.ts changed:

  • It sets wakeLimits.waitMs to 60 s for the helper's process. That stays inside the helper's 85 s timeout and the hook's 90 s, so the first request really is held until the cell is up.
  • The label and heartbeat wait goes from 10 s to 30 s. It still breaks out as soon as both are seen, so a fast machine pays nothing.

The test assertions and production code are unchanged.

Checks. bun scripts/gate.ts --explain passes all 32 rules, and the pushed commit has no --fix rewrap to commit. bun x tsc --noEmit printed nothing, which I read as clean. bun test test/spawn-cell-real-child.test.ts ran 0 pass, 2 skip.

Left out. I didn't make the child boot itself faster. The other refusals the issue lists (dead-code, /llms.txt budget, module-level state, as never) aren't touched by this change.

Sign in to join this conversation.

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

Keyboard shortcuts

Docs