Skip to content

fix(windows): separate updater from orchestration migration - #11405

Merged
OrcaWin merged 2 commits into
mainfrom
orchestration-windows-updater-cleanup
Jul 29, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
orchestration-windows-updater-cleanup

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Jul 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • restore the stock Windows updater/uninstaller behavior changed by fix(orchestration): preserve active workers across updates #11271
  • remove unverified installer process-ownership and distinct-artifact claims from the orchestration migration plan and reliability gate
  • preserve the packaged Windows launcher marker, exact status propagation, and resumable legacy ask compatibility path
  • preserve mobile reveal-tab adoption while attesting the renderer's actual tab/leaf/PTY identity; exact legacy-worker recovery matching remains enforced in main

Packaged Windows updater continuity remains separate reliability work that needs its own real A/B artifact proof.

Validation

  • exact CI shard 7 command (238 files, 2,245 tests)
  • focused reveal identity and recovery fencing tests (105 tests plus exact main-process gates)
  • SSH system-transport integration test (3 tests; CI's earlier timeout did not reproduce)
  • pnpm typecheck
  • pnpm lint
  • git diff --check
  • generic updater files match their pre-fix(orchestration): preserve active workers across updates #11271 state

@greptile-apps

greptile-apps Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR separates Windows updater/uninstaller concerns from the orchestration migration gate by reverting the NSIS customCheckAppRunning macro added in #11271 and removing the --require-distinct-artifacts flag from the e2e harness and CI. It also fixes a real bug in the terminal reveal identity path where tabId (the requested arg) was passed instead of tab.id (the actual bound tab) to verifyTerminalRevealIdentity, causing recovery callers to receive a mismatched identity.

  • Reverts daemon-host-uninstall.nsh to stock NSIS behavior by dropping the PowerShell process-release macro; Windows updater continuity is deferred to a dedicated reliability gate with its own artifact proof.
  • Removes installer-pair-proof.mjs, its tests, the --require-distinct-artifacts CLI flag, and all associated reliability-gate claims about distinct installer paths, versions, and SHA-256 hashes.
  • Fixes useIpcEvents.ts to use tab.id in the reveal identity, aligns the test harness so setTabLayout mutates the in-memory layout state, and updates four test assertions to expect the identity field in replyTerminalCreate replies.

Confidence Score: 5/5

Safe to merge. The Windows updater rollback is intentional, the tab.id fix is correct, and all changed paths are covered by the updated tests.

All changes are either deliberate reversions to pre-#11271 stock behavior (NSIS macro, distinct-artifacts flag, gate claims) or targeted fixes with corresponding test coverage (terminal reveal identity using tab.id, test harness setTabLayout mutation, four updated test assertions). No logic is left in an inconsistent state: every removed assertion has a matching code deletion, and the tab.id fix is exercised by the four updated mobile-reveal tests.

Files Needing Attention: No files require special attention. tools/win-update-e2e/run.mjs defers toInstaller resolution to after the window-watch starts, but this is consistent with the existing harness design and the pre-existing concern about watch cleanup was already noted in a prior review.

Important Files Changed

Filename Overview
src/renderer/src/hooks/useIpcEvents.ts Bug fix: passes tab.id (the actual created/found tab) instead of tabId (the requested tab arg) when constructing the terminal reveal identity, ensuring recovery callers receive the correct binding.
src/renderer/src/hooks/ipc-events-test-harness.ts Test harness fix: setTabLayout default now mutates state.terminalLayoutsByTabId so subsequent reads in the same test reflect the updated layout, enabling identity assertions to work correctly.
src/renderer/src/hooks/mobile-terminal-reveal-tab-adoption.test.ts Tests updated to assert the identity field in replyTerminalCreate responses; adds a revealIdentity helper for the expected shape.
config/nsis/daemon-host-uninstall.nsh Restores stock NSIS uninstaller behavior by removing the entire customCheckAppRunning macro and its embedded PowerShell process-release logic introduced by #11271.
config/reliability-gates.jsonc Removes installer-pair-proof.test.mjs from the orchestration reliability gate commands, test file list, and assertion refs; updates coverage notes and oracle to drop Windows distinct-artifact claims; moves Windows updater continuity to a separate gate.
tools/win-update-e2e/run.mjs Removes --require-distinct-artifacts proof block and defers toInstaller resolution to just before the update step (after the window-watch has started); the existing concern about watch orphaning on resolution failure remains.
tools/win-update-e2e/installer-pair-proof.mjs File deleted: SHA-256 distinctness proof helper is no longer needed now that the distinct-artifacts gate is removed from this migration.
tools/win-update-e2e/installer-pair-proof.test.mjs File deleted: tests for the removed installer pair proof module.
tools/win-update-e2e/cli-args.mjs Removes --require-distinct-artifacts flag from CLI argument parsing and help text.
.github/workflows/win-update-e2e.yml Removes --require-distinct-artifacts from the CI invocation of the update e2e harness.
tools/win-update-e2e/README.md Removes CLI table row for --require-distinct-artifacts and the corresponding known limitations section about the updater packaged journey.
docs/reference/plans/2026-07-28-orchestration-seamless-update-migration.md Removes claims about installer process-ownership, exact executable release proofs, and the paired Windows updater/launcher test requirement; scopes the compatibility path description to the ask-resume behavior only.
src/main/cli/windows-launcher-asset.test.ts Removes the test that asserted the NSIS uninstall script contained the PowerShell process-release macro, consistent with the rollback of that macro.

Sequence Diagram

sequenceDiagram
    participant Mobile as Mobile Client
    participant IPC as useIpcEvents
    participant Store as AppStore
    participant API as window.api.ui

    Mobile->>IPC: "onRequestTerminalCreate({requestId, worktreeId, tabId, leafId, ptyId})"
    IPC->>Store: find or create tab (by worktreeId / tabId)
    Store-->>IPC: "tab {id: tab.id}"
    Note over IPC: Before fix: verifyTerminalRevealIdentity used tabId (request arg)<br/>After fix: uses tab.id (actual binding)
    IPC->>Store: "verifyTerminalRevealIdentity({worktreeId, tabId: tab.id, leafId, ptyId})"
    Store-->>IPC: "identity | undefined"
    IPC->>API: "replyTerminalCreate({requestId, tabId: tab.id, title, identity})"
    API-->>Mobile: terminal reveal reply with correct identity
Loading

Reviews (2): Last reviewed commit: "fix(terminal): attest adopted reveal ide..." | Re-trigger Greptile

@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Windows update harness no longer accepts or executes distinct-installer artifact proof, and target installer resolution now occurs immediately before update installation. Reliability-gate and migration-plan text, test coverage, and harness documentation remove packaged Windows updater claims. The NSIS script now stops and removes the daemon directory only during genuine uninstall, with the previous process-check macro removed. Terminal creation now reports identities based on actual tab bindings, with corresponding test harness and expectations updated.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and validation, but it misses required template sections like Screenshots, AI Review Report, Security Audit, and Notes. Add the missing template sections, fill the testing checklist, include AI review coverage and cross-platform checks, and add security audit plus notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 is concise and matches the main change: splitting Windows updater work from the orchestration migration.
✨ 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.

@OrcaWin
OrcaWin merged commit dde72f8 into main Jul 29, 2026
26 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…#11405)

* fix(windows): separate updater from orchestration migration

* fix(terminal): attest adopted reveal identity

---------

Co-authored-by: OrcaWin <[email protected]>
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