Repository navigation
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit details
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 |
9 tasks done
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
Check that runtime-environment controls can be registered again safely. Two tests copied the complete handler list and started failing when restart support was added, even though production registration was correct.
What Changed
Replace both copied lists with one test that runs the real registration twice. The Electron fake now rejects duplicate handlers, removes live registrations, and tracks actual binary listeners. Begin with stale registrations, then verify exactly one binary listener and a working current list handler after the second registration. All 17 other behavior cases remain unchanged; 19 cases become 18, with 49 net test lines removed and no production change.
Why
Updating the copied lists would leave the cleanup test unable to catch registration before removal. A strict registration boundary catches omitted cleanup for any installed channel while related behavior tests own what each endpoint does. No expected inventory comes from production.
Linked Issue
Internal test audit; failures follow restart support in #29371.
Visual Proof
N/A — test-only change, no application interaction changes.
Testing
Original: 17 passed, two stale-inventory failures reproduced. Candidate: all 18 passed on Bun 1.4.3 and native Node 24.21. Pairing, maintenance, recovery, subscription lifecycle and managed launch-session siblings: 46 passed. Node typecheck, changed-code quality, normal/anti-slop lint, formatting and whitespace checks pass. Linux background execution; no visible app, real Windows or macOS run claimed.
Controls: removing only restart cleanup fails on the second registration with duplicate restart; removing binary cleanup fails with three listeners rather than one. Production bytes restored. Independent final preservation review approved.
Three alternating single-worker Bun pairs compare the candidate against an explicitly repaired baseline (the original two lists plus the missing restart entries, not the failing original). All runs passed, 19 vs 18 cases. Official module median 2,234 → 2,275 ms; process wall median 3,750 → 3,888 ms. Bun coordinator reports Node compatibility 26.3.0; subprocess PATH pins Node 24.21. These noisy observations establish no speedup. Full PR CI and hosted qualification remain pending.
Review
Independent review verified strict duplicate detection, stale-listener replacement, current callback lookup, cleanup, unchanged behavior cases and both intended mutation failures.
Agent skill upstream boundary
Notes
No production, platform, SSH, folder-workspace or wire changes. This test does not claim to exercise the restart action itself; the existing copied inventory did not either.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)