notes_crash_typing: the server child dies with the test #364

Closed
kayg wants to merge 0 commits from issue/325-crash-test-kill-on-drop-2 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.

Rebased onto current dev (5552b79), which has the dotted tree lines, the Bar rewrite and the tree-cost fix; the earlier CI failure of the old PR was dev's own tree-cost unit test, already fixed there. Replaces #336.

🤖 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. Rebased onto current dev (5552b79), which has the dotted tree lines, the Bar rewrite and the tree-cost fix; the earlier CI failure of the old PR was dev's own tree-cost unit test, already fixed there. Replaces #336. 🤖 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 28s
CI / rust (pull_request) Failing after 1m54s
CI / web (pull_request) Failing after 2m13s
8a3400db4e
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
Author
Owner

Landed in merge train #380.

Landed in merge train #380.
kayg closed this pull request 2026-10-14 22:25:28 +00:00
Some checks failed
CI / server (pull_request) Successful in 28s
CI / rust (pull_request) Failing after 1m54s
CI / web (pull_request) Failing after 2m13s

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!364
No description provided.