Skip to content

test(runtime): avoid unused RPC catalog setup in listener tests - #29324

Merged
OrcaWin merged 33 commits into
mainfrom
OrcaWin/test-audit-bind-host-startup
Oct 16, 2026
Merged

OrcaWin merged 33 commits into
mainfrom
OrcaWin/test-audit-bind-host-startup

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

The listener-security tests keep every existing check while avoiding unrelated RPC method loading. Application behavior is unchanged.

What Changed

Use the existing guarded empty RPC registry in all 20 server constructions. All 19 case bodies and assertions remain unchanged, including real servers, device registries and WebSocket clients. The only change is 21 added test lines; production code is unchanged.

Why

These tests call server APIs directly and never dispatch an RPC request. The existing registry option removes unnecessary startup work without replacing listener or pairing behavior. The existing guard throws if a constructor accidentally uses the full default catalog.

Linked Issue

Maintainer-requested audit of tests running on every PR.

Visual Proof

N/A — test setup only; no UI change.

Testing

  • Locally verified on Linux with background launch, Node 24.21.0 and Bun 1.4.3.
  • All 65 bind-host, fallback-port, pinned-port and mobile IPC cases pass together with shuffle seed 104729.
  • Three alternating refreshed-parent pairs retain the same 19 full test names and outcomes: median command wall 11.457→9.617 s; summed module phases 9.889→7.981 s.
  • A fresh pair after merging current main retains all 19 case names and outcomes: wall 15.300→10.437 s; module phases 13.242→8.269 s. This is one unpaired local sequence; sources were restored byte-for-byte.
  • Fresh current-main guard control catches an omitted registry option; source restored byte-for-byte, then all 65 shuffled owner/sibling cases pass again.
  • Current Node typecheck, changed-code quality, targeted lint, formatting and whitespace checks pass.
  • Latest main plus CI repair refresh: all 65 shuffled cases and Node typecheck pass; the exact same 19 names/outcomes in a fresh pair measured wall 11.394→10.013 s and module 9.809→8.453 s.
  • Exact-head full PR CI and current source-qualified hosted measurement required before merge.

Local worker measurements do not establish whole-PR elapsed or billed-runner savings. Historical hosted observations are superseded by the required current-head qualification.

Review

Independent preservation review verifies that removing only the fixture import and 20 registry options exactly restores the parent file. Every existing assertion and real transport path is preserved. Current pinned-port policy and its dedicated sibling remain intact.

Agent skill upstream boundary

  • Not applicable; no upstream skill source copied or translated.

Notes

No production behavior, platform condition, wire format, SSH execution or folder-workspace assumption changes.

Checklist

  • Focused change with before/after, mechanism and rationale explained.
  • Visual proof N/A; platform and remote behavior considered.
  • Retained assertions, guard control and shuffled owner/sibling validation.
  • Final local gates pass.
  • Exact-head full CI passes.

Final hosted qualification

Exact head 53305204 passed full pr.yml run 38889388272 and aggregate job 116937916025, with all 31 attached checks terminal success/skipped. All 19 cases pass under Bun; all five inventories reconcile (12,347 unique modules, no duplicates/unhandled errors/omitted failures). Original successful baseline module time about 2.982s → 1.722s, execution 204ms → 185ms. This is unpaired focused work with source drift, not whole-PR elapsed savings. Merged after exact-head validation.

@OrcaWin OrcaWin mentioned this pull request Oct 16, 2026
10 of 12 tasks
@OrcaWin
OrcaWin requested a review from brennanb2025 as a code owner October 16, 2026 09:59
@OrcaWin
OrcaWin changed the base branch from OrcaWin/test-audit-mobile-geometry to main October 16, 2026 09:59
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 10c99002-37a8-4213-bc11-4d9e2bc6b7eb
📥 Commits

Reviewing files that changed from the base of the PR and between b56cc36 and 2df7cda.

📒 Files selected for processing: 1
  • src/main/runtime/runtime-rpc-websocket-bind-host.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

📝 Walkthrough

The WebSocket bind-host tests now import the unused-default-RPC-methods fixture and pass an empty methods list to each OrcaRuntimeRpcServer construction. The test scenarios and assertions are unchanged.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 2df7c

This test-only change uses the guarded empty registry on paths that do not dispatch RPCs. Complete the reported CI and hosted measurement before merging; no concrete code risk is evident.

Pre-merge checks: Passed 5
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely identifies the main change: avoiding unused RPC catalog setup in runtime listener tests.
Description check Passed The description is detailed and follows the required structure. It explains the change, rationale, testing, review findings, scope, and checklist status. It also clearly records that exact-head full C…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

Full details: Description check

Explanation

The description is detailed and follows the required structure. It explains the change, rationale, testing, review findings, scope, and checklist status. It also clearly records that exact-head full CI remains pending. The Linked Issue section names a maintainer-requested audit but does not provide a specific issue link; this is a minor template gap in an otherwise complete description.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • 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.

@OrcaWin
OrcaWin merged commit 712e228 into main Oct 16, 2026
31 checks passed
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