Skip to content

[CI] Revert library patches introduced by test optimization - #26727

Merged
nwparker merged 1 commit into
mainfrom
nwparker/ci-revert-library-patches-20261009
Oct 9, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/ci-revert-library-patches-20261009

Conversation

@nwparker

@nwparker nwparker commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​134 $\color{#cf222e}{\Huge{\mathbf{−}}}$​220 $\color{#cf222e}{\Huge{\mathbf{−}}}$​86
Prod 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​67 $\color{#cf222e}{\Huge{\mathbf{−}}}$​957 $\color{#cf222e}{\Huge{\mathbf{−}}}$​890

ELI5

Undo the library modifications introduced in #26608. Vitest uses its published implementation again, and Windows terminals return to their previous teardown behavior. Existing terminal fixes remain in place.

What Changed

  • Remove the Vitest patch and restore the earlier configuration that gives each test project its own complete settings. Keep the current test routes, setup files, isolation, cache option and deadlines.
  • Revert only [CI] Reduce repeated test work and fix Windows cleanup and IME confirmation #26608's node-pty changes in both its JavaScript and TypeScript sources. Preserve the longstanding native job ownership, Unix, pipe-error and input-error patches.
  • Restore the previous Windows SSH relay files through a version-checked rollback. Validate every file before writing; replace the terminal entrypoint before removing the newer agent and output-worker APIs. Recognize the exact previously shipped versions, resume interrupted replacements, and refuse unknown source without modifying files.
  • Retire the six Windows tests and two fixtures for the reverted lifecycle behavior. Keep the seven earlier native contracts and five earlier relay installer contracts; add five installer cases for known versions, actual interrupted renames and refusal without partial writes.

The rollback intentionally restores the earlier behavior: Windows kill() and destroy() can wait for first output. It removes the newer pre-ready input retirement, closed-forwarding recovery and native-exit notification changes.

Why

The requested cleanup removes library changes from the CI performance work. Reverting the entire node-pty patch would also remove longstanding production fixes. Simply restoring the old relay installer would reject already-installed newer files on Windows SSH hosts; the strict rollback handles those known files without adding another terminal backend or changing native binaries.

No performance improvement is claimed. Current dependency versions and unrelated dependency updates remain unchanged.

For context, #26608's existing paired 1,187-file benchmark measured 347.655s before versus 331.088s after (4.77% less command time). This rollback gives up that patched-configuration optimization; those historical numbers do not predict this rollback's current five-shard runner cost or establish a fleet improvement. No new CI benchmark was added.

Linked Issue

Follow-up to #26608.

Visual Proof

N/A — this changes test configuration and terminal teardown internals, with no rendered UI change.

Testing

  • Local automated qualification completed on macOS, without launching an app.
  • Automated tests updated for actual file migration, interrupted writes and refusal.

Frozen pnpm install --frozen-lockfile --ignore-scripts passes and installs published Vitest 5.0.3 and the exact pre-#26608 node-pty patch. Full typechecks, changed-code-quality scans, focused Oxlint, Oxfmt and git diff --check pass locally.

Local command Cases Result Command wall
Stock Bun coordinator, four complete suites 1,360 1,352 pass / 8 skip 22.257s
Stock Node coordinator, same four suites 1,360 1,352 pass / 8 skip 19.149s
Balanced CI configuration, seven suites 45 45 pass Vitest duration 2.26s

The first two commands have identical duplicate-preserving case/status maps: runtime 1,338 pass / 1 existing skip, installer 10 pass, protected Node pool 4 pass, and seven original Windows contracts skipped on macOS. Bun routes protected workers through Node; the Node coordinator runs all four under Node. Both preserve isolation, six setup files, caching and deadlines. The balanced run covers actual SQLite read/write contention, runtime identity and shard planning. No test-name filter, primer, retry or CI diagnostic was used.

The installer tests exercise known upgraded relay files, real atomic renames interrupted after the first or second write, successful recovery, idempotence and unknown-source refusal before mutation. Independent reviews cover the full old patch, the downgrade dependency order and the output hashes. Source and installed dependency hashes remain unchanged after qualification.

These are local correctness checks, not a speed comparison or fresh Windows/SSH lifecycle qualification. The ordinary Windows check below supplies native qualification; the local ignore-scripts installation alone does not rebuild native modules.

The ordinary main workflow passed at tested merge 053ccd846b99d7a50a90b3eb1dcee38828f8967a (base ebb192e3 plus head 39970b09). All ten rollback files and deletions exactly match the locally qualified head. Its five unit shards report 11,955 test files and 116,309 cases: 115,229 pass, 1,070 skip, five expected failures and five todo; no unexpected failures. This console census is not a full per-case JSON comparison. The ordinary Windows package job passes the original seven native PTY cases, all ten installer cases, the packaged PTY capability smoke and the packaged CLI smoke. Its complete boundary selection reports 591 passes and 54 skips across 64 files.

All six Node persistence platforms and Linux compatibility follow-ups, all four Windows SSH cells, hostile SSH hosts, localization and updater checks pass. The SSH checks do not independently prove an upgrade of a previously deployed live relay; known-version downgrade and interruption behavior is covered by the real-file installer cases.

Seven ordinary workflows allocated 50 runners, with 10 additional unallocated skips. Total occupied runner time was 13,297 seconds: main 6,315; Node/server 1,925; Windows SSH 3,940; hostile SSH 754; localization 284; updater 73; LoC 6. The five unit jobs occupied 3,087 seconds, including 2,913 seconds in their test steps and 174 outside them. Queue delay is separate. All jobs use attempt one; no diagnostic workflow, benchmark, CI retry or corrective repush was added. These are qualification costs, not a paired before/after benefit or the later automatic main-run cost.

Review

  • No upstream skill-installer material copied or translated.

Independent source and raw-data reviews cleared the rollback, interrupted migration, runtime routes, source/installed hashes and occupied-runner totals. There were no unresolved GitHub review threads at the merge gate; no fresh automated bot review is claimed.

Notes

The Windows SSH relay retains its earlier late input-pipe release order. Unix and native C++ patches remain unchanged. Unknown remote source is rejected rather than overwritten; loss of remote contact remains unverifiable.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • N/A stated for visual proof
  • Source reviewed for correctness, security and dependency boundaries
  • Cross-platform and SSH impact considered
  • Local checks completed and results recorded
  • Ordinary required platform checks pass before merge

@coderabbitai

coderabbitai Bot commented Oct 9, 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: d765f848-8f62-4921-a4bb-53f8b478adc1
📥 Commits

Reviewing files that changed from the base of the PR and between ebb192e and 39970b0.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • config/patches/[email protected]
  • config/patches/[email protected]
  • config/relay-assets/node-pty-1.1.0-windows-pty-teardown-patch.cjs
  • config/scripts/node-pty-windows-pty-teardown-patch.test.mjs
  • config/scripts/windows-pty-closed-forwarding-teardown.cjs
  • config/scripts/windows-pty-pre-ready-teardown.cjs
  • config/vitest.config.ts
  • pnpm-workspace.yaml
  • src/main/windows/windows-pty-job.win32.test.ts
💤 Files with no reviewable changes (5)
  • config/scripts/windows-pty-closed-forwarding-teardown.cjs
  • pnpm-workspace.yaml
  • src/main/windows/windows-pty-job.win32.test.ts
  • config/scripts/windows-pty-pre-ready-teardown.cjs
  • config/patches/[email protected]

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


📝 Walkthrough

Walkthrough

The node-pty patch updates native build settings and PTY lifecycle handling across Unix and Windows. Windows shutdown now accounts for pipe readiness, output closure, and exit-event deduplication. Relay-patch migration targets and tests cover recognized prior patch states. Vitest project configuration changes, its patch file is removed, and Windows teardown test scripts and integration-test groups are deleted.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 39970

This change restores the earlier terminal shutdown behavior and test setup. No defects were found, but the restored Windows terminal and SSH relay paths were only checked on macOS. Confirm the standard Windows platform checks pass before merging.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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 identifies the primary change: reverting library patches introduced by the test optimization work.
Description check Passed The description is complete and closely follows the repository template. It explains the rollback, rationale, linked issue, testing, platform coverage, review status, and checklist results. Visual pro…
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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.

@nwparker
nwparker merged commit da6d632 into main Oct 9, 2026
60 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