Repository navigation
Make terminal and child-process lifetimes explicit - #275
Merged
DocksDocks merged 7 commits intoDec 1, 2026
Merged
Conversation
Keep the write buffer active only while an exclusive action owns output. Verified: bun run test:unit cli/test/unit/logger.test.ts; bun run check:types; bun run lint cli/src/engine-native/logger.ts cli/test/unit/logger.test.ts; bun fmt --no-script --check cli/src/engine-native/logger.ts cli/test/unit/logger.test.ts
Let only the winning deadline or close event perform terminal cleanup. Verified: bun run test:unit cli/test/unit/exec.test.ts; bun run check:types; bun run lint cli/src/engine-native/exec.ts cli/test/unit/exec.test.ts; bun fmt --no-script --check cli/src/engine-native/exec.ts cli/test/unit/exec.test.ts
Document lease handoff and check sink failures, missing executables and both partial output streams.
Verified: bun run test:unit cli/test/unit/{logger,exec,syncLock,bun,deps,tidy,toolchain}.test.ts; bun run check:types; bun run golden:dryrun (public sync and toolchain); isolated public tidy; targeted lint and format
Use a controlled deadline with a real child and real pipes. Assert the timeout result and wait for the child to close.
Verified: bun run test:unit cli/test/unit/{logger,exec,syncLock,bun,deps,tidy,toolchain}.test.ts; bun run check:types; public sync and toolchain goldens; isolated public tidy; targeted lint and format
Wait for complete lines on both pipes before expiring one deadline. Derive the fixture watchdog and cleanup reserve from the platform ceiling.
Verified: bun run test:unit cli/test/unit/{logger,exec,syncLock,bun,deps,tidy,toolchain}.test.ts; bun run check:types; public sync and toolchain goldens; public tidy; targeted lint and format
Remember the grandchild as soon as its complete PID arrives. Restore the clock before cleanup and tolerate an already exited process. Verified: 138 focused tests; bun run check:types; public sync and toolchain goldens; public tidy; targeted lint and format
DocksDocks
marked this pull request as ready for review
December 1, 2026 00:22
Update the source extents for the logger and process runner. The portable CI gate caught the stale logger extent. Verified: skillMetadata.test.ts; 138 behavior tests; bun run check:types; targeted lint and formatting; both public goldens and the public tidy proof
DocksDocks
marked this pull request as draft
December 1, 2026 00:30
DocksDocks
marked this pull request as ready for review
December 1, 2026 00:30
DocksDocks
marked this pull request as draft
December 1, 2026 00:46
DocksDocks
marked this pull request as ready for review
December 1, 2026 00:46
DocksDocks
deleted the
269-make-cli-terminal-and-child-process-lifetimes-explicit
branch
December 1, 2026 01:19
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.
Plan run: #269 Make CLI terminal and child-process lifetimes explicit
Pull request: #275. All 10 jobs passed in Full CI run 46547968375 on reviewed head
d168ea0a1d6dbb254dac355aafbd69d206c7928d.What changed
Decisions and corrections
withExclusive; tests exercise that API.Delegated decisions
Reviews
The plan passed in round 2. Code review passed on the final candidate in round 6. No findings remain open.
Verification
bun run check:types, targeted Oxlint and Bun formatting passed.skillMetadata.test.ts. The next run could not acquire a macOS runner. The final run passed all 10 jobs on the same repaired head, including the required Full CI check.Limits and failures
The complete
bun run checkcommand did not run locally; the required remote gate covers the full suite.Kept resources
If left open: #269, its linked branch, and this pull request. Parent #267 and the remaining child issues stay open.
After merge
Archive #269 and mark the engine row done in #267. No deployment or release.
Checklist
bun run checkpasses locally: not run in full.bun run check:typespasses.Full CIpasses on the reviewed head against currentmain.Closes #269