Repository navigation
[CI] test: remove repeated idle polling from PTY cleanup - #26360
Merged
Merged
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe failed-I/O cleanup test now uses a 1 ms polling interval while waiting for the SIGKILL call. The expected signal and process ID are unchanged. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk remains from this polling change; it is reasonable to merge with normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 8, 2026
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.
ELI5
The PTY cleanup test repeatedly waits for a mocked kill signal using a 50ms polling interval. Check that same positive result every 1ms so successful cleanup does not spend most of its time waiting for the next check.
What Changed
Add
{ interval: 1 }to the existingvi.waitForassertion inpty-subprocess-io-failure-cleanup.test.ts. That assertion executes 192 times across three simulated platforms, two I/O operations and 32 cleanup iterations. The same signal, exit, destruction and cleanup assertions, fixture work and real clock remain. The default 1,000ms deadline is preserved.Why
Use the existing polling API to remove repeated idle time while preserving actual asynchronous cleanup. Shortening deadlines or reducing iterations would weaken the contract. More frequent retries can cost additional CPU when the expected signal does not arrive.
Linked Issue
Related measured test-suite improvements: #26327.
Visual Proof
N/A — test polling only; no visual or interaction change.
Testing
Correctness run 37694502389 passed all eight original/candidate commands under Bun 1.4.2 and actual Node 24.21.0, shuffled with seeds 104729 and 130363. Every command retained 36 exact original case identities and statuses: 32 passes and the same four platform skips. No errors, process leaks or source/routing changes were found. Root and independent raw reviews match the successful CI collector.
Timing run 37700932895 retained every whole
pnpm testcommand in before/after, after/before, before/after order:This is 3.54× faster for this one fixture. All three pairs improve, including the first commands. There was no warmup, retry or discarded sample. Each command kept the same 36 cases, four workers, isolation, six setup files and disabled Vitest filesystem module cache. The held Linux ARM host used Vitest 5.0.3 with the pinned runtimes above; shared OS and Bun transpiler caches can still warm between counted commands.
The measurements use frozen source
31a5b42b0d272526c405458154eea932cd0ded8e. The product fixture before/after bytes match it exactly on current base7abd74e8187d39cbdc8ff127969c5cd384a2a20b. Root independently replayed the collector, raw case/status maps, settings, process exit and arithmetic. These single-file results do not establish the overall 2× full-suite goal or faster real PTY termination.oxfmt --check, changed-code checks and Node typecheck passed; no native or Electron tests launched locally.Review
Independent source and all-eight correctness/all-six timing reviews passed. Root verifies the current candidate's exact qualified bytes. CodeRabbit reviewed current head16830 and reported no actionable findings. No unresolved review threads or change requests remain. Root verified the fixture before/after bytes match qualified source exactly, including the unchanged fixture on observed main e9b3efa. Candidate CI covers head16830; it does not cover additional upstream commits merged afterward. Merged squash5a1009f82fa1e1ae5e33e5ff965885fadc00415e has actual parent e9b3efa, exactly the final observed main. Root verified its one changed path and both fixture byte hashes match the qualified candidate exactly. The actual merge tree also contains seven upstream commits after candidate parent7abd (relay pacing, OpenCode ACP, remote history, Radix leaves, cache reset, compact tool runs and rail previews); candidate CI is not claimed to cover those additional commits.
Agent skill upstream boundary
Notes
No production process termination, SSH execution, remote protocol, workspace ownership or platform routing changes. Native contracts remain covered by CI; no native or Electron test was launched on the user's desktop.
Checklist