Repository navigation
test(link): verify activity-holds crash points portably on Windows - #8669
Conversation
process.exit runs exit handlers a crash skips; keep process.kill(SIGKILL) everywhere (TerminateProcess on Windows) and assert Windows' report of it, a null signal and a nonzero exit code.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Review of #8669: on Windows a marker plus a nonzero exit cannot tell an abrupt kill from an error exit. The fixture registers an exit handler that writes a sentinel; an abrupt kill never runs it, and the test asserts stdout is exactly the crash point on every platform. Replacing the kill with an error exit fails all four cases.
|
Maintainer judgment (dev integration, MAINTAINERS.md maintainer-integration exception): merging without a second maintainer approval, as part of the DEV-RED repair for dev batch run 43369456647 (windows 10/14).
|
Summary
windows 10/14 of dev batch run 43369456647 failed the four
tests/clients/link-ws-activity-holds.test.ts"crash points (SIGKILL)" cases at line 177. The cases came from #8593 (7e3cefd162). The child fixture kills itself withSIGKILLand the test assertedchild.signalCode === "SIGKILL". Windows has no signals: the same kill isTerminateProcess, reported as a nonzero exit code withsignalCode: null, which is what the log shows. #8628 (which moved thesyncDirseam) is not involved, since this fixture supplies nosyncDirhook.The fixture now writes the crash point it reached to stdout just before killing itself, and the test asserts it. A child that never reaches its point now fails explicitly instead of looking like a crash. The kill stays abrupt on every platform; it is never an orderly
process.exit, which would run exit handlers a crash skips. An exit handler in the fixture writes a sentinel that only an orderly exit can produce. The test asserts stdout is exactly the crash point, which proves the child died abruptly on every platform: replacing the kill with an error exit fails all four cases. The termination assertion is also platform-aware:SIGKILLon POSIX, a null signal and a nonzero exit code on Windows. Recovery expectations are unchanged.Verification
process.platformset towin32andsignalCodereported as null: on dev, the four cases fail withsignalCode: null; with this change, 4 pass.bun test tests/clients/link-ws-activity-holds.test.ts tests/clients/link-ws-activity-holds-operator.test.ts: 40 pass, 0 fail.bun run typecheck: exit 0.Checklist
Summary by CodeRabbit