Fix a race in the cancel_command test #82

Merged
jared merged 1 commits from fix-cancel-test-race into main 2026-11-23 16:02:53 -05:00
Owner

This is a test-only change.

What failed: the push runs for #80 and #81 both failed cancel_command (#8) › cancelling stops the command and everything it started, so neither was deployed. Production is still on #79.

Why: the test waited for a pid file to appear, then read it. But the shell creates a redirect target before writing to it. So the test could read an empty file, get pid 0, and conclude the child process wasn't running.

Fix: the command writes the pid to a temporary file and renames it into place. The file only appears once it holds a complete pid.

Checks: the test passed 15 times in a row locally, and the full unit suite passes (149/149). Merging this deploys #80 and #81.

🤖 Generated with Claude Code

This is a test-only change. **What failed:** the push runs for #80 and #81 both failed `cancel_command (#8) › cancelling stops the command and everything it started`, so **neither was deployed**. Production is still on #79. **Why:** the test waited for a pid file to appear, then read it. But the shell creates a redirect target *before* writing to it. So the test could read an empty file, get pid 0, and conclude the child process wasn't running. **Fix:** the command writes the pid to a temporary file and renames it into place. The file only appears once it holds a complete pid. **Checks:** the test passed 15 times in a row locally, and the full unit suite passes (149/149). Merging this deploys #80 and #81. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jared added 1 commit 2026-11-23 15:55:07 -05:00
Fix a race in the cancel_command test
CI / Lint (eslint) (pull_request) Successful in 20s
CI / Test (jest) (pull_request) Successful in 19s
CI / Security (npm audit) (pull_request) Successful in 12s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 3m9s
CI / Integration (api) (pull_request) Successful in 4m1s
CI / UI screenshots (before/after) (pull_request) Successful in 11s
CI / UI (playwright) (pull_request) Successful in 2m38s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
0412eeeb38
The shell creates a redirect target before writing to it, so the test
could read an empty pid file, take pid 0, and decide the child was not
running. This failed the push run of #80's merge, so that commit was not
deployed. The command now writes the pid to a temporary file and renames
it into place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jared merged commit 64703482fd into main 2026-11-23 16:02:53 -05:00
jared deleted branch fix-cancel-test-race 2026-11-23 16:02:56 -05:00
Sign in to join this conversation.