Skip to content

revert: back out the Windows terminal update-survival chain (#7421→#7499) - #7505

Merged
Jinwoo-H merged 5 commits into
mainfrom
Jinwoo-H/revert-daemon-host-relocation-chain
Jul 6, 2026
Merged

Jinwoo-H merged 5 commits into
mainfrom
Jinwoo-H/revert-daemon-host-relocation-chain

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Reverts the entire Windows terminal-relocation chain

Reverts, in reverse order: #7499, #7486, #7473, #7463, #7421.

The chain attempted to make terminal sessions survive Windows app updates by relocating the ConPTY runtime and then the daemon host image out of the installer's kill zone. Each step fixed its predecessor's regression and introduced a new one — rc.5 flashed console windows every ~3s, rc.6's fix was inert (bundler ordering + a promisify bypass), and rc.7's fix broke daemon startup outright ("Daemon exited during startup with code 1"). Reverting to the pre-#7421 baseline is the safe state.

What this restores

  • Terminals work normally on all platforms (the rc.7 daemon-startup failure is gone).
  • No flashing console windows (the daemon runs under Electron-as-Node again, whose windowsHide default the code was written for).
  • Windows app updates go back to pre-Relocate node-pty ConPTY runtime outside the Windows install dir (fixes update-time terminal loss) #7421 behavior: the NSIS installer's process sweep kills the daemon and console hosts during an update, so sessions do NOT survive updates — panes cold-restore with scrollback instead. This was the status quo before July 5 and is explicitly accepted.

Verification

Note

#7456 (open, unmerged) is part of the same effort and should stay unmerged pending a ground-up design. A future attempt at update-survival will come as a fresh proposal with packaged-installer E2E validation before any release, not as another patch on this chain.

@Jinwoo-H
Jinwoo-H merged commit 6a4b897 into main Jul 6, 2026
7 checks passed
@Jinwoo-H
Jinwoo-H deleted the Jinwoo-H/revert-daemon-host-relocation-chain branch July 6, 2026 05:50
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8a90f275-55cb-4e6d-acd6-df52b1d64d32

📥 Commits

Reviewing files that changed from the base of the PR and between 553ad4f and d6985e1.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (18)
  • .github/workflows/release-cut.yml
  • config/daemon-host-node-runtime.cjs
  • config/electron-builder.config.cjs
  • config/patches/[email protected]
  • config/scripts/electron-builder-config.test.mjs
  • config/scripts/package-electron-runtime-contract.test.mjs
  • electron.vite.config.ts
  • src/main/daemon/daemon-entry.ts
  • src/main/daemon/daemon-host-relocation.test.ts
  • src/main/daemon/daemon-host-relocation.ts
  • src/main/daemon/daemon-init.ts
  • src/main/daemon/windows-hidden-console-children.test.ts
  • src/main/daemon/windows-hidden-console-children.ts
  • src/main/index.ts
  • src/main/pty/install-dir-runtime-relocation.test.ts
  • src/main/pty/install-dir-runtime-relocation.ts
  • src/main/pty/node-pty-runtime-relocation.test.ts
  • src/main/pty/node-pty-runtime-relocation.ts

📝 Walkthrough

Walkthrough

Changes

This PR removes the daemon-host node.exe relocation infrastructure, node-pty native runtime relocation, and Windows hidden-console child-process patching. Affected modules include daemon-host-relocation, install-dir-runtime-relocation, node-pty-runtime-relocation, and windows-hidden-console-children, all deleted along with their tests. daemon-init.ts and src/main/index.ts are updated to remove references to these removed modules and associated tracing spans. electron-builder.config.cjs replaces daemon-host staging with packaged-runtime-node-modules helpers. The release-cut workflow drops a daemon-host node.exe verification step. The node-pty patch is updated to remove Spectre mitigation flags, add a ConPTY console-list fallback, and refactor Unix posix_spawn error handling with structured cleanup. Related tests are updated or removed accordingly.

Sequence Diagram(s)

Not applicable — changes are primarily removals and refactors without new user-facing interaction flows.

Compact metadata

  • Type: Refactor/removal
  • Scope: Build config, daemon process management, native pty patch
  • Breaking changes: None declared

Related issues: None specified

Related PRs: None specified

Suggested labels: refactor, build, daemon, node-pty

Suggested reviewers: None specified

Poem
A rabbit hopped through daemon halls,
Removed the props, relocated walls,
No more node.exe stowed away,
ConPTY now catches its own fray,
Cleaner code, one less hop to make. 🐇

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

Jinwoo-H added a commit that referenced this pull request Jul 6, 2026
Records why the #7421->#7499 chain was reverted in #7505 (failure
mechanisms, why verification missed them, non-negotiables), and lays out
the from-scratch plan: proof harness first, relocate the daemon file
closure out of the install dir while keeping the exact Electron runtime,
fix adoption interactivity, and gate every phase on a packaged-artifact
update test.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…#7421→stablyai#7499) (stablyai#7505)

* Revert "Preload the daemon windowsHide shim via --require; wrap promisify custom (stablyai#7499)"

This reverts commit b5710ee.

* Revert "Hide console windows for children of the node.exe-hosted daemon (stablyai#7486)"

This reverts commit 081cf2f.

* Revert "fix(daemon): relocate daemon host image out of the install-dir kill zone (stablyai#7473)"

This reverts commit 38c2e2e.

* Revert "fix(pty): keep runtime dirs a surviving daemon still uses (stablyai#7463)"

This reverts commit 01ad86a.

* Revert "Relocate node-pty ConPTY runtime outside the Windows install dir (fixes update-time terminal loss) (stablyai#7421)"

This reverts commit 24d599f.
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