Repository navigation
test(cli): stop the chDB streak test leaking exit code 78 - #3271
Conversation
…streak test Assigning undefined back to process.exitCode is a no-op in Bun, so the 78 a chDB refusal sets leaked out whenever this file ran before any other set the exit code: the CLI suite failed with every test passing.
Maple review🟢 Confidence 10/10 · safe to merge. One-line test fix that matches the existing The streak test now restores
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The
apps/clitest job sometimes fails with every test passing andscript "test" exited with code 78(seen on #3268 and #3270).Cause:
test/in-memory-store.test.ts("keeps the failure streak across runs") savesprocess.exitCode, runs a chDB refusal that sets 78, then writes the saved value back. When the saved value wasundefined, that write is a no-op in Bun, so the 78 stays. Whether the saved value isundefineddepends on whether an earlier file in the run set the exit code, so the failure is flaky.expected-outcomes.test.tsalready guards against the same trap with?? 0. This applies the same fix.Evidence:
bun test test/in-memory-store.test.tsalone: before, 13 pass, 0 fail, exit code 78. After, exit code 0.effect-sdkbuild orlibchdb, which this worktree doesn't have and CI builds.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit