fix(tests): the pause test raced the deferred launch and blocked the deploy (v0.446.1) - #827
Merged
Merged
Conversation
…deploy (v0.446.1) `session-pause-test.cjs`'s HTTP section asserted the row read `running` after unpause. But `launchAgentRuntime` stamps `launching` synchronously and hands the real work to a `setImmediate` whose `.catch` stamps the row `crashed` — and that deferred half does far more than the stubbed `backend.spawn` (env files, skills, credentials). On a box where any of it throws, the status flipped between the `await` and the read. Live: instawp failed `the row is running again`, expresstech passed it — the worst shape a test can have. `make-live.sh` gated correctly and restarted nothing. The section stubs `launchAgentRuntimeNow`: it is about the ROUTE and the status transition, and the launcher has its own tests. Both status assertions now report the value they actually found, so the next failure is diagnosable from the log alone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What happened
make-live.shrefused to restart anything after v0.446.0:session-pause-test.cjsfailed its last assertion on instawp and passed on expresstech. The gate was right — but the failure was in the test, not the feature.The HTTP section asserted the row read
runningafter unpause.launchAgentRuntimestampslaunchingsynchronously and hands the real launch to asetImmediatewhose.catchstamps the rowcrashed— and that deferred half does far more than the stubbedbackend.spawn(env files, skills, credentials). On a box where any of it throws, the status flips between theawaitand the read.A test that passes on one box and fails on another for timing reasons is the worst shape a test can have, so this removes the race rather than widening the assertion.
Fix
launchAgentRuntimeNowin that section. It is about the route and the status transition; the launcher has its own tests, and the section already stubs every other backend call.Also checked
The same deploy showed
warm-chat-testfailing once on expresstech. It passes 5/5 standalone there and the full suite now passes end to end on that box (EXIT=0), so that one was a flake under suite load, not a regression — noted rather than papered over.Testing
npm run test:governancegreen locally; verified on instawp (the box that reproduced it) before merge.🤖 Generated with Claude Code