Conversation
Contributor
Author
|
@coderabbitai review |
Contributor
✅ Action performedReview finished.
|
Contributor
📝 WalkthroughWalkthroughThe PTY connection test suite tracks and disposes foreground agent trackers during teardown, restores Vitest mocks after each test, and stubs 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 Jul 13, 2026
Contributor
Author
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
Two independent exact-head CI failures exposed nondeterminism in
pty-connection.test.ts:Math.random(). Pinning the jitter midpoint makes its fake-timer boundary deterministic, matching the coordinator unit tests.beforeEachreplaced the shared store mock. CI for fix(runtime): republish projects after renderer reload #8072 proved the leak: a single-LEAF_1case received two callbacks forLEAF_2, which that case cannot create.The fixture now restores mocks after every case and records/disposes foreground trackers before the next store mock is installed.
CI evidence
LEAF_2callback arguments from the foreground tracker's deterministic delayed-read ladder.Testing
pty-connection.test.ts+pane-foreground-agent-tracker.test.ts: 457/457 passed.pnpm run typecheck.oxlinton the changed test.oxfmt --checkon the changed test.git diff --check.Evidence limitation
The cross-case tracker leak did not reproduce locally under Node 26; its diagnosis is based on the authoritative Node 24 CI's impossible cross-pane callback arguments. Exact-head PR Checks are the final verifier.
Scope
Test fixture lifecycle only; no runtime behavior changes.