notes_crash_typing: the server child dies with the test #336

Closed
kayg wants to merge 1 commit from issue/325-crash-test-kill-on-drop into dev
Owner

Part of #325.

notes_crash_typing started calternal serve as a bare Child. Any assert that failed while a server was up (or the "never came up" assert) unwound without killing it, so the server kept running, and held a build slot, for hours.

Fix. start returns a Server guard whose Drop kills and waits on the child; kill9 takes the child out of the guard (so the test's own SIGKILLs still work); a server that never listens is killed before the panic.

Evidence. cargo test -p calternal --test notes_crash_typing: passes (12 kills, 3 tabs). With a temporary panic! right after the first start (not committed), the test fails and ps shows no calternal serve child left over.

🤖 Generated with Claude Code

Part of #325. `notes_crash_typing` started `calternal serve` as a bare `Child`. Any assert that failed while a server was up (or the "never came up" assert) unwound without killing it, so the server kept running, and held a build slot, for hours. **Fix.** `start` returns a `Server` guard whose `Drop` kills and waits on the child; `kill9` takes the child out of the guard (so the test's own SIGKILLs still work); a server that never listens is killed before the panic. **Evidence.** `cargo test -p calternal --test notes_crash_typing`: passes (12 kills, 3 tabs). With a temporary `panic!` right after the first `start` (not committed), the test fails and `ps` shows no `calternal serve` child left over. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
notes_crash_typing: the server child dies with the test
Some checks failed
CI / server (pull_request) Successful in 25s
CI / web (pull_request) Failing after 26s
CI / rust (pull_request) Successful in 2m28s
d60ed72ce8
A failing assert while the server was up left 'calternal serve' running for hours, holding build
slots. The child is now a guard that kills and waits on Drop.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
kayg closed this pull request 2026-10-14 20:53:54 +00:00
Some checks failed
CI / server (pull_request) Successful in 25s
CI / web (pull_request) Failing after 26s
CI / rust (pull_request) Successful in 2m28s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!336
No description provided.