Skip to content

test: replace copied IPC lists with re-registration proof - #29498

Closed
OrcaWin wants to merge 1 commit into
mainfrom
OrcaWin/test-audit-runtime-registration
Closed

OrcaWin wants to merge 1 commit into
mainfrom
OrcaWin/test-audit-runtime-registration

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​34 $\color{#cf222e}{\Huge{\mathbf{−}}}$​83 $\color{#cf222e}{\Huge{\mathbf{−}}}$​49
Prod 0 0 0 0

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

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

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

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c162d82-c105-494a-bc03-f10f49751f9e
📥 Commits

Reviewing files that changed from the base of the PR and between 971e4f2 and 53f7647.

📒 Files selected for processing: 1
  • src/main/ipc/runtime-environments-pairing.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant