fix(lite): keep Windows CLI alive through cleanup - #691
Merged
Conversation
Contributor
AI Code Review (astron-code-latest) — e0eb11bAPPROVE Required Skills
Security Guardrails未触发任何安全守卫限制。代码未修改 CI Status所有 CI 检查均已通过(success),包括与当前平台行为密切相关的 Findings
整体 Diff 范围狭窄且测试覆盖充分,同意合并。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
main()completes backend, PGlite, and data-lock cleanupref -> stdout -> clear -> exitorderingRoot cause
PR #690 exposed an existing Bun 1.3.14 Windows lifecycle race: after status output is flushed, the child can stop pumping IOCP while only unref handles remain, so PGlite or lock cleanup never settles. Parent-side pipe draining and keepalive were already present and the >64 KiB output regression passes. This is consistent with oven-sh/bun#34478.
Verification
bun test test/cli-shutdown.test.ts(5/5)bun test test/snapshot.test.ts --timeout 60000(6/6)bun run typecheckbun run buildbun run build:standalone:host && bun run test:standalonegit diff --checkScope
This is intentionally separate from PR #690. It changes only SupaCloud Lite CLI lifecycle handling and its focused test. No test or production server was modified by this PR.