Skip to content

test: strengthen transport lifecycle and benchmark checks - #33538

Merged
OrcaWin merged 2 commits into
mainfrom
codex/test-audit-374-transport-benchmarks
Oct 25, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
codex/test-audit-374-transport-benchmarks

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​171 $\color{#cf222e}{\Huge{\mathbf{−}}}$​64 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​107
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​48 $\color{#cf222e}{\Huge{\mathbf{−}}}$​14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​34

ELI5

Make useful tests catch dropped requests, duplicate cleanup, and incorrect timeout boundaries.

What Changed

Strengthen request-delivery, subscription release, pairing publication, timer cleanup, and the inclusive ten-minute dialog hold boundary. Use fake clocks for pairing lifecycle checks. Repair stale terminal benchmark owner guards and serialization fixtures.

This grouped audit covers 19 test/support sources: 53 test declarations kept, 16 strengthened, and none removed. Seven benchmark sources have no test declarations; three receive fixes.

Why

The previous assertions could still pass when the intended action never happened or cleanup was incomplete. The updated cases check observable delivery, exact published values and ordering, immediate cleanup, and both sides of the boundary.

Visual Proof

N/A — test and benchmark changes only.

Testing

  • Combined changed-file formatting and lint passed on Linux.
  • Focused original/candidate test runs and bounded production-fault controls are recorded in the audit evidence. Historical results remain tied to their actual source versions.
  • Shutdown serialization and three unchanged session/skill benchmarks were reviewed statically and were not executed.
  • Fresh full PR CI will validate the combined changes against the current base; local aggregate checks were not completed because they require excluded dependency/native preparation.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer material copied or translated.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 51a77bc6-0a3e-4af8-bcc8-9c2985214200
Commits

Reviewing files that changed from the base of the PR and between 928782d and b7c319b.

Files selected for processing: 1
  • mobile/src/transport/rpc-client-reconnect-wait.test.ts
Files skipped from review as they are similar to previous changes: 1
  • mobile/src/transport/rpc-client-reconnect-wait.test.ts

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

Walkthrough

The changes update three terminal benchmark scripts to check current source structure and fixture conditions. Mobile transport tests add assertions for relay authentication, cancellation, pairing recovery, timers, RPC release, reconnect behavior, and request deadlines. A runtime test now checks dialog-hold behavior at fixed time boundaries.

Priority: Low

Merge Risk: Low · up to b7c31

The reconnect checks introduce no identified merge blocker, but the shutdown benchmark may still accept a stale capture. The change is mergeable with that test-confidence limitation acknowledged.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description clearly explains the scope, motivation, testing, and lack of visual changes. However, it omits the required Linked Issue section and does not provide the Review, Notes, Checklist, or A… Add an actual linked issue under “Linked Issue” using “Fixes #…”. Complete the Review, Notes, Checklist, and applicable AI Disclosure sections, or explicitly mark them as not applicable where allowed.
Docstring Coverage Warning Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 12 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main changes: stronger transport lifecycle tests and benchmark checks.
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.
Full details: Description check

Explanation

The description clearly explains the scope, motivation, testing, and lack of visual changes. However, it omits the required Linked Issue section and does not provide the Review, Notes, Checklist, or AI Disclosure sections from the template.

Resolution

Add an actual linked issue under “Linked Issue” using “Fixes #…”. Complete the Review, Notes, Checklist, and applicable AI Disclosure sections, or explicitly mark them as not applicable where allowed.

Finishing Touches: 💡 1
📝 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments: 1
config/scripts/terminal-shutdown-byte-limit-benchmark.mjs: 1

179-179: Trivial · Functional Correctness · Quick win

Assert that the buffer is freshly captured.

mergeCapturedLeafState retains 'prior-buffer' when serialization produces no fresh value. The presence assertion can therefore pass without validating capture for panes that were not cleared. Compare the result with the prior sentinel or the expected serialized value.

Suggested fix
-        assert(results[1].layout.buffersByLeafId?.[leafId(index)])
+        const captured = results[1].layout.buffersByLeafId?.[leafId(index)]
+        assert(captured)
+        assert.notEqual(captured, 'prior-buffer')

Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1ddf1966-9586-4dfe-af0b-dcb951bb55cd
Commits

Reviewing files that changed from the base of the PR and between e03786f and 928782d.

Files selected for processing: 12
  • config/scripts/terminal-output-frame-chunk-benchmark.mjs
  • config/scripts/terminal-shutdown-byte-limit-benchmark.mjs
  • config/scripts/terminal-stream-byte-length-benchmark.mjs
  • mobile/src/transport/mobile-relay-browser-cancel-budget.test.ts
  • mobile/src/transport/mobile-relay-e2ee-link.test.ts
  • mobile/src/transport/mobile-relay-pairing-error-timer-cleanup.test.ts
  • mobile/src/transport/mobile-relay-pairing-recovery.test.ts
  • mobile/src/transport/mobile-relay-physical-client.test.ts
  • mobile/src/transport/rpc-client-ready-stream-release.test.ts
  • mobile/src/transport/rpc-client-reconnect-wait.test.ts
  • mobile/src/transport/rpc-client-request-deadline.test.ts
  • src/main/runtime/claude-open-dialog-hold.test.ts

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

@OrcaWin
OrcaWin merged commit 1661c3c into main Oct 25, 2026
36 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