Skip to content

test(terminal): harden daemon upgrade adoption - #12353

Merged
OrcaWin merged 1 commit into
mainfrom
followup-terminal-upgrade-hardening
Aug 3, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
followup-terminal-upgrade-hardening

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • normalize daemon attachOnly exactly once before spawn preparation and host dispatch
  • cancel a throttled animation-frame callback when the hidden-window timer wins
  • add a deterministic two-daemon v30-to-v31 adoption test using real daemon sockets

Upgrade contract

The new harness creates a live PTY in a protocol-v30 daemon, disconnects the old app adapter, starts a protocol-v31 daemon and router, discovers the preserved v30 session, and mounts it with attachOnly. It verifies the exact PTY/incarnation/output survive, no v30 or v31 replacement process is spawned, and input remains writable through the v30 owner.

Validation

  • 231 focused tests across daemon server/adapter/router/upgrade adoption and pane fit
  • pnpm run typecheck:node
  • pnpm run typecheck:web
  • pnpm run check:code-quality:changed
  • pnpm run check:max-lines-ratchet
  • pnpm run check:reliability-gates
  • changed-file oxlint and oxfmt

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2cd1ae7b-4512-42d3-9d88-981d7fb5a5e0

📥 Commits

Reviewing files that changed from the base of the PR and between 17df980 and b7c6cfa.

📒 Files selected for processing (5)
  • src/main/daemon/daemon-pty-upgrade-adoption.test.ts
  • src/main/daemon/daemon-server-attach-only.test.ts
  • src/main/daemon/daemon-server.ts
  • src/renderer/src/lib/pane-manager/pane-fit-continuation-retry.ts
  • src/renderer/src/lib/pane-manager/pane-fit.test.ts

📝 Walkthrough

Walkthrough

The daemon now normalizes attachOnly values before PTY preparation and terminal attachment. Tests cover malformed input, fresh session creation, and adoption of legacy sessions without replacing their subprocesses. The pane-fit retry completion path now cancels its pending animation frame before invoking the continuation, with coverage for timer-driven completion.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes a summary and validation results but omits the required Screenshots, AI Review Report, Security Audit, and Notes sections. Add all required template sections, including visual-change status, AI review findings with cross-platform checks, security audit details, and platform-specific notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary change: hardening terminal daemon upgrade adoption.
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.
✨ 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 25213ec into main Aug 3, 2026
49 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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