Repository navigation
[CI] Reduce repeated test work and fix Windows cleanup and IME confirmation - #26608
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughVitest projects now extend the root configuration, and a plugin restores empty root test selectors from shared test options when projects are configured. The Vitest patch passes merged test options to its resolver. The changes remove or revise selected tests and reliability-gate entries, and exclude Pi test files from a workflow path filter. The node-pty patch changes Windows terminal teardown before pipe readiness, and new tests cover pre-ready teardown and patch upgrades. Relaunch cleanup handling now uses a shared helper. Priority: ➖ Normal Merge Risk: 🟡 Moderate · up to The Windows terminal teardown changes have a cleanup failure path that can crash the app or daemon process when no error listener is attached. The rest of the change looks low risk. Guard the error emission before merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)Full details: Docstring CoverageExplanation Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 24 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
config/reliability-gates.jsonc (1)
6531-6531: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winRestore the browser capability contract test.
The deleted test is the only direct assertion for the canonical browser capability strings and their membership in
RUNTIME_CAPABILITIES. The surviving tests use imported constants or test capability gating, so a changed literal or omitted registry entry can pass the reliability gate.Suggested fix
- "pnpm exec vitest run --config config/vitest.config.ts src/shared/browser-network-tunnel-protocol.test.ts src/main/browser/browser-network-tunnel-session.test.ts src/main/browser/remote-browser-socks-server.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/shared/browser-network-capabilities.test.ts src/shared/browser-network-tunnel-protocol.test.ts src/main/browser/browser-network-tunnel-session.test.ts src/main/browser/remote-browser-socks-server.test.ts",Restore
src/shared/browser-network-capabilities.test.tswith the deleted canonical-string and registry-membership assertions.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
d5fd5952-82d7-47d4-b8cc-82322a19e72d
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
.github/workflows/pi-owner-runtime.ymlconfig/patches/[email protected]config/reliability-gates.jsoncconfig/vitest.config.tspnpm-workspace.yamlsrc/renderer/src/components/browser-pane/host-guest/browser-page-viewport.test.tssrc/renderer/src/components/native-chat/native-chat-composer-drop-scope.test.tsxsrc/renderer/src/components/terminal-pane/terminal-ios-hangul-preedit-coexistence.test.tssrc/shared/agent-status-types.test.tssrc/shared/browser-network-capabilities.test.ts
💤 Files with no reviewable changes (4)
- src/shared/browser-network-capabilities.test.ts
- src/renderer/src/components/terminal-pane/terminal-ios-hangul-preedit-coexistence.test.ts
- src/renderer/src/components/native-chat/native-chat-composer-drop-scope.test.tsx
- src/renderer/src/components/browser-pane/host-guest/browser-page-viewport.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Kill the native agent when a pre-ready forwarding socket closes. · [email protected]:1380-1387
config/patches/[email protected]:1380-1387
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winKill the native agent when a pre-ready forwarding socket closes.
When
kill()ordestroy()runs before_isPipeReady,WindowsTerminal.kill()calls_close()and returns without calling_agent.kill(). If the forwarding socket then closes, the native child can remain alive. Adding_agent.kill()in that close handler fixes the process leak, but it does not fix the separate missingexitcallback becauseWindowsPtyAgent.kill()does not emit it and the readiness guard still suppresses the event.Suggested fix
this._socket.once('close', () => { + if (this._killRequested && !this._killComplete) { + this._agent.kill(); + this._killComplete = true; + } if (this._isPipeReady) { this.emit('exit', this._agent.exitCode); } this._close(); });
🟡 Minor · Emit exit for pre-ready socket teardown. · [email protected]:1499-1504
config/patches/[email protected]:1499-1504
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winEmit
exitfor pre-ready socket teardown.When
killordestroyruns before_isPipeReady, the forwarding socket can close with the readiness flag still false. Theonce('close')handler then calls_close()without emittingexit, so publiconExitlisteners receive zero callbacks. This is independent of native-process termination because_agent.kill()does not emit the terminalexitevent.Suggested fix
this._socket.once('close', () => { - if (this._isPipeReady) { - this.emit('exit', this._agent.exitCode); - } + this.emit('exit', this._agent.exitCode); this._close(); });
🧹 Nitpick comments (1)
config/reliability-gates.jsonc (1)
6531-6531: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd regression coverage for the public network-capability status.
The deleted test checked
RUNTIME_CAPABILITIESmembership, notgetStatus(). The current status tests do not assertnetwork.browserTunnel.v1ornetwork.browserTunnel.executionHosts.v1, and the gate no longer runs those tests. If either registry entry is removed, the gated tests can still pass. Add status assertions and include that test in the gate.Suggested fix
+import { + BROWSER_NETWORK_EXECUTION_HOSTS_RUNTIME_CAPABILITY, + BROWSER_NETWORK_TUNNEL_RUNTIME_CAPABILITY +} from '../../../shared/protocol-version' + // ... + it('advertises browser network capabilities', () => { + const capabilities = createRuntime().getStatus().capabilities + + expect(capabilities).toContain(BROWSER_NETWORK_TUNNEL_RUNTIME_CAPABILITY) + expect(capabilities).toContain(BROWSER_NETWORK_EXECUTION_HOSTS_RUNTIME_CAPABILITY) + })- "pnpm exec vitest run --config config/vitest.config.ts src/shared/browser-network-tunnel-protocol.test.ts src/main/browser/browser-network-tunnel-session.test.ts src/main/browser/remote-browser-socks-server.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/orca-runtime-tests/browser-capabilities.spec.ts src/shared/browser-network-tunnel-protocol.test.ts src/main/browser/browser-network-tunnel-session.test.ts src/main/browser/remote-browser-socks-server.test.ts",
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
cc7c3d57-3a2d-4f5f-94f7-c11fb690afba
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
src/main/app-relaunch.tssrc/main/ipc/app.test.tssrc/main/ipc/app.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.
…ansforms-six-junk-cases-20261008
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
33557e29-7e10-456d-b99b-ebdfa9a47346
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (35)
.github/workflows/pr.ymlconfig/patches/[email protected]config/relay-assets/node-pty-1.1.0-windows-pty-teardown-patch.cjsconfig/scripts/mobile-mirrored-storage-write-path.test.mjsconfig/scripts/mobile-set-native-props-web-siblings.test.mjsconfig/scripts/node-pty-windows-pty-teardown-patch.test.mjsconfig/scripts/pnpm-cli-invocation.test.mjsconfig/scripts/project-renderer-web-client.test.mjsconfig/scripts/release-javascript-workflow.test.mjsconfig/scripts/windows-pty-closed-forwarding-teardown.cjsconfig/scripts/windows-pty-pre-ready-teardown.cjssrc/main/crash-reporting/self-initiated-tree-kill-log.tssrc/main/daemon/daemon-reattach-checkpoint-isolation.test.tssrc/main/daemon/issue-6814-daemon-failure-classification.test.tssrc/main/foreign-sqlite-readers/foreign-sqlite-readers-import-boundary.test.tssrc/main/ipc/app.tssrc/main/ipc/filesystem-import-ssh-ops.test.tssrc/main/ipc/filesystem-import-ssh-path-safety.test.tssrc/main/ipc/filesystem-import-ssh.test.tssrc/main/ipc/filesystem-import-ssh.tssrc/main/main-process-tree-kill-gate.test.tssrc/main/observability/architecture.test.tssrc/main/opencode/hook-plugin-opencode2-session-lineage.test.tssrc/main/own-chromium-tree-kill-guard.tssrc/main/pty/node-pty-master-fd-retirement.test.tssrc/main/runtime/client-hosted-page-reconciliation-hold.integration.test.tssrc/main/runtime/client-hosted-page-reconciliation-window.test.tssrc/main/startup/single-instance-lock-headless-exit.test.tssrc/main/windows/windows-pty-job.win32.test.tssrc/renderer/src/components/feature-wall/feature-wall-setup-progress.test.tssrc/renderer/src/components/sidebar/WorktreeMetaDialog.test.tsxsrc/renderer/src/lib/ime-composition-keyboard-event.tssrc/renderer/src/lib/ime-text-field.test.tsxsrc/renderer/src/lib/ime-text-field.tsxsrc/renderer/src/renderer-node-builtin-boundary.test.ts
💤 Files with no reviewable changes (16)
- src/main/runtime/client-hosted-page-reconciliation-window.test.ts
- src/main/crash-reporting/self-initiated-tree-kill-log.ts
- src/renderer/src/renderer-node-builtin-boundary.test.ts
- src/renderer/src/components/feature-wall/feature-wall-setup-progress.test.ts
- src/main/observability/architecture.test.ts
- config/scripts/project-renderer-web-client.test.mjs
- src/main/runtime/client-hosted-page-reconciliation-hold.integration.test.ts
- src/main/foreign-sqlite-readers/foreign-sqlite-readers-import-boundary.test.ts
- src/main/main-process-tree-kill-gate.test.ts
- src/main/opencode/hook-plugin-opencode2-session-lineage.test.ts
- src/main/startup/single-instance-lock-headless-exit.test.ts
- config/scripts/mobile-set-native-props-web-siblings.test.mjs
- config/scripts/pnpm-cli-invocation.test.mjs
- src/main/pty/node-pty-master-fd-retirement.test.ts
- config/scripts/mobile-mirrored-storage-write-path.test.mjs
- config/scripts/release-javascript-workflow.test.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Library rollback: The Vitest patch, its dependent shared configuration, and the node-pty lifecycle additions from this PR were reverted by #26727. Earlier native/Unix/Windows fixes remain. The rollback intentionally restores the earlier quiet/pre-ready shutdown behavior and safely downgrades recognized Windows SSH files. The benchmark below is historical evidence for the reverted configuration; it is not a current-main improvement claim. Other application behavior changes from this PR remain separately flagged in the CI scope audit.
ELI5
Reduce repeated test work and remove source-spelling checks, while fixing Windows cleanup and Korean text confirmation. Validate the consolidated corrective head once.
What Changed
Vitest’s Bun, Node and measurement projects share a transform server; the pinned patch preserves original project options, isolation, four workers, six setups, deadlines and protected Node contracts.
Remove eight redundant checks and 42 source-spelling/private-scanner checks. Preserve the custom-agent compile-time assignment in its real parser case, real AST validators, SQLite, security, RPC and platform boundaries. Update reliability selectors and retire dated records whole. Remove stale comments and the obsolete raw-project-options loop while retaining its eight assignment cases.
Windows kill/destroy retires input immediately; before READY, native close waits for output-worker termination. Requested ConPTY socket close waits for native acknowledgement when its exit code is unknown; an already-known natural exit still drains after a later kill. Publish the payload once. Preserve Winpty, early-exit draining and relay Agent ordering. Count the built-in error listener correctly; real first-fault/retry cases cover both backends. The installer atomically upgrades known patches and rejects unknown hashes before mutation.
IME completion state survives the captured completion-first unmarked Return: confirmation keeps Notes open; a deliberate Return saves. Composition-only commits, expiry and existing keyboard boundaries remain.
Three tests replace waits with actual exit or guarded advancement after checkpoint/health entry, retaining disk, 4999/5000 and 2999/3000 oracles, slow-daemon coverage and cleanup. Two assertions use the injected clock. Move unchanged app cleanup into its relaunch owner, retaining upstream save-delay handling.
Filesystem SSH imports use the canonical registry; partial mocks retain ownership and desktop/headless startup retains the façade. Pi unit-only paths avoid three smoke jobs. Computer-use/packaged-serve filters exclude only
src/main/daemon/**/*.test.ts; production, mixed changes, fixtures and workflow changes remain selected.Why
Reuse existing owners and commands instead of adding runners or weakening contracts. Deletions intentionally lose capability/wire-name, mobile declaration, import/call-site inventory, JSX ordering and build/SDK spelling alarms; retained behavior is not equivalent to those global text policies. The original intermittent Windows startup-silence cause remains unknown.
Linked Issue
N/A — maintainer-directed CI capacity work.
Visual Proof
Before closes Notes prematurely after confirmation; after shows the deliberate save. Images alone cannot prove ordering. The earlier passing trace includes a marked Enter.
New ordinary
de0240f/515495fevidence is distinct: DOMProcess/229 → emptycompositionend→ committed글→ two Enter/13 events withisComposing: false. Notes retains focused한글after confirmation, then closes and persists it after deliberate save. The native first Return is also unmarked; this does not relabel the earlier trace or establish a universal cause.Testing
7ba179dat tested merge506e96a(base81fd59d)Merged
de0240fpasses lint, typechecks, changed-code quality and non-patch whitespace. Its 21-file integration reports 303 passes/three platform skips/zero errors in 9.549 seconds: correctness only. Patch-context markers explain raw diff-check exit 2.Ordinary de024 units pass: 11,919 modules; 115,970 cases (114,889 passed, 1,073 skipped, 5 todo, 3 expected failures); zero unhandled errors. Console routes: 10,756 Bun/1,162 Node/1 measurement. Reports lack full title maps. X11 passes four deterministic/four native cases and four engagement receipts; Wayland passes three repetitions/receipts.
The preceding validation attempt failed: quiet destroy observed child death/native acknowledgement, but no public exit and open forwarding. Final corrective head
7ba179debe422fc9a95b4e8507ea28e38364ee4bpasses local lint (56.284 seconds), typechecks (16.892), changed-code quality (19.786), formatting, whitespace and eight installer cases (3.0065). Frozen patched installation passes (2.055 seconds); ten compiled-owner ordering controls and two generated-relay controls pass with injected Agent dependencies. These do not qualify native Windows. Local controls cover socket closure before acknowledgement and acknowledgement before a later teardown. One corrective push completed normal validation: all ten workflows passed. Actual Windows native 13 + installer 8 = 21 passed; six lifecycle witnesses show native acknowledgement followed by one public exit with its actual code, and no unexpected exits. Both first-fault retry cases reach a live child before retry and then retire it without unhandled rejection. Inbox post-death identity is unavailable; do not infer all witnesses retained the same process identity. X11 passes four deterministic/four native cases and Wayland three repetitions, with positive native engagement. Current Notes has a marked Process/229 Return followed by plain Enter events; the earlier de024 unmarked first Return is separate evidence on identical IME owner bytes. All four workflow self-validation roles passed. No standalone CI diagnostic was launched for the local checks.Historical 1,187-file CI comparison, six first ABBAAB commands:
All retain 11,602 cases (11,479P/123S), duplicate-aware maps/routes/options. Count every first; no primer/retry/discard. Occupancy: 2,111 seconds, including 2,036.229 command seconds and 74.771 outside; queues of 4 seconds/job and 7 seconds/run separate. Warming/census included; this is the historical ten-way shard, not current fleet capacity.
Local macOS ARM64 comparisons use stock routing, four workers, isolation and filesystem cache and unchanged setups/deadlines. All firsts listed; execution ABBAAB:
Exact maps: deletions 118 → 76/fourteen → six files; PTY four passes/three Linux skips; checkpoint four passes; health two passes; filesystem 101 passes. Independent raw peers verify maps/routes/options. Warming included; later-two deletion/filesystem 25.26%/42.35% are descriptive. One CPU field malformed, wall valid. Separate untimed mutations prove entry/deadline/write failures and awaited cleanup/restoration; observers do not ship. Local percentages are not additive CI gains. Lucide stays excluded/HOLD.
All listed failed/cancelled allocations remain counted
Final corrective
7ba179/ tested merge506e96retains all 54 owned paths unchanged; the tested base is81fd59, with 108 additional upstream paths and six protected-route additions. All five unit shards pass across 11,926 modules (11,783 passed/143 skipped), with 116,085 aggregate cases (115,002 passed, 1,075 skipped, 5 todo, 3 expected failures) and zero failed/unhandled errors. Routes: 10,757 Bun/1,168 Node/1 measurement. Reports remain module-only. The seven new modules and 16 changed count/skip/route rows are source-classified; do not normalize the earlier census.Ordinary CI above tested
506e96a(81fd59d+7ba179d). Main then advanced to3c07588, adding 56 paths, including Remend 1.4.0; the only overlap with this PR ispnpm-lock.yaml. We separately checked the latest combined treeb66ab34locally: frozen install passed in 2.040 seconds without changing the lockfile; all typechecks passed in 14.699 seconds; 22 focused files passed with 216 tests passed/two skipped in 17.255 seconds. All 53 owned non-lock files remain exact, and the lock retains both persistent patches with only Remend additions. The Windows, IME, full unit census and allocation figures above remain results of506e96a; they are not fresh platform or performance results for the latest tree. No additional CI run was requested for this integration.Main subsequently added
bb44f74(native chat/clear): 149 further paths, with no overlap with any of the 54 PR-owned paths and no package/lock change. We locally checked that combined treedab686btoo: all typechecks passed in 17.756 seconds and the same 22 focused files passed with 216 tests passed/two skipped in 15.221 seconds. All owned outputs remain preserved; this is local correctness evidence, not a new full-platform census or speed comparison.The corrective attempt occupied 15,740 runner seconds across 57 allocated/69 declared jobs: main 6,160; units 2,960 = 2,785 Test + 175 outside. All ten workflows and all 57 allocations passed; 12 unallocated skips count zero. Four workflow self-validation roles used 1,372 seconds, already included. Recorded created-to-start intervals total 8,938 seconds separately and include dependencies. Combined listed validation cost is 70,881 seconds; paired benchmark 2,111 and earlier scoped qualification 452 remain separate. Sources and completion/cancellation mixes differ from earlier attempts, so these totals establish neither a causal speed change nor the 2× capacity target.
Earlier listed allocations total 40,085 seconds. The preceding de024 ten workflows added 15,056 seconds (main 5,910; units 2,925 = 2,779 Test-shard seconds + 146 outside): 57 allocated/69 declared jobs, six successful/one failed/three cancelled workflows. Subtotal before this corrective attempt: 55,141 seconds; paired benchmark 2,111 and earlier qualification 452 remain separate. Different source/platform/workflow mixes prevent causal comparisons; PID5372 survival/reuse remains unresolved.
Preceding de024 Computer-use/packaged-serve cancellations spent 928 seconds across four allocations (102 successful/826 cancelled), already included. SSHWindows separately spent 4,660 seconds: 3,137 successful plus 1,523 cancelled residual ARM/inbox after the head was superseded by the known native defect. Neither cancellation is a pass or saved-time measurement.
For the original 52-path scope, only two daemon unit paths selected the two additional workflows; revised filters select neither by those paths (source-only). This corrective push changes both workflows, deliberately selecting the same four self-validation roles once; do not cancel that qualification. Actual future allocation savings and the overall 2× capacity goal remain unproven.
Review
Ownership/maps/mutations/restoration and final native/IME/census/cost records have independent peers. Current corrective local and platform checks pass. The final snapshot has no unresolved review threads; the latest bot review predates this corrective commit, so this does not claim a new bot review. Its async-error finding is fixed and covered by the local controls and both real backend retry cases. Inventory/status/list suggestions are declined under the owner’s deletion scope with lost alarms disclosed; bulk-docstring advice is declined under concise-comment policy. Socket closure never proves death; reassess the pinned Vitest patch on upgrades.
Agent skill upstream boundary
Checklist
506e96a; latest-main integration passes locallyAdditional observed main-push cost after merge
The merge at
59b9bdeb901538a5e1e0cb731fd2f4a85148dff2triggered three successful main-push workflows: Node server 3,000 occupied runner-seconds across 12 allocations; shared cache warming 850 across five; Mobile 215 across one. Their additional total is 4,065 seconds across 18 allocations (20 declared jobs, two skipped). This is separate from the preceding ordinary PR validation total of 15,740 and the listed cumulative historical validation total of 70,881. Unrelated scheduled, dispatched and issue-event workflows on the same commit are excluded. These are observed validation costs; they do not establish causal savings. Existing before/after tables and their limitations above remain unchanged.