Skip to content

fix(daemon): bump main to v38 so it doesn't reuse the 1.4.217 patch daemon - #23908

Closed
Jinwoo-H wants to merge 1 commit into
mainfrom
Jinwoo-H/daemon-v38-after-release-cut
Closed

Jinwoo-H wants to merge 1 commit into
mainfrom
Jinwoo-H/daemon-v38-after-release-cut

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​8 $\color{#cf222e}{\Huge{\mathbf{−}}}$​7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1

ELI5

Orca keeps a background terminal service running across app updates, and an updated app reuses a running service whenever the version number matches. The 1.4.217 patch release is cut from the Sep 27 daily build plus #23900/#23907, so it ships a v37 service that has the Codex fix but none of main's other service-side changes since that cut. Main is also v37 today, so 1.4.218 would quietly reuse 1.4.217's older service instead of starting its own. This bumps main to v38 so it starts a fresh service.

What Changed

Before: a user who installs 1.4.217 and later updates to a build from main, with terminals open, keeps running 1.4.217's v37 service. New tabs miss main's post-cut service fixes (#23500 OpenCode stale plugin env, #22468 DSH spawn env, #23584/#23474 input-mode fixes, #23602 Reset Terminal's service side) until every terminal is closed.

After: main's build looks for a v38 service, doesn't find one, and starts a fresh one with all of main's fixes. Tabs already open stay on v37 and remain attachable.

Mechanism: PROTOCOL_VERSION 37 → 38 with a named marker, 37 added to PREVIOUS_DAEMON_PROTOCOL_VERSIONS (legacy adapter keeps v37 owners attachable), local-build compatibility contract and version tests updated. Same shape as #23907. No other code changes.

Why

The service is chosen only by protocol version (daemon-v<N>.sock / versioned named pipe), and replacing a service with live terminals would kill them, so a version bump is the only way to roll new service code to users who update with terminals open. The alternative, doing nothing, is safe (nothing crashes; Reset Terminal treats a rejecting service as unsupported) but leaves those fixes unreachable for 1.4.217 users until a restart.

Trade-off: a user updating 1.4.216 → 1.4.217 → 1.4.218 without closing tabs may briefly run v36, v37 and v38 services side by side; each exits when its last tab closes.

Linked Issue

Follow-up to #23907 (v37 is shipped by the 1.4.217 patch release).

Visual Proof

N/A: no UI change.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

tsc (node) clean. src/main/daemon, src/main/providers, src/main/ipc/pty, local-build contract, electron-builder config tests: 4288 passed. The only 2 failures are repro-13767-shell-ready-marker-lost-to-exec, which fails on macOS without this change too.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Windows: the named pipe carries the version, same path. SSH/relay terminals don't use this service.
  • Must not be cherry-picked into 1.4.217.

@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Critical risk] Bumps daemon protocol version and compatibility contract.

The PR appears safe to merge; the new daemon uses a separate endpoint while v37 remains available for existing terminals.

Summary

The PR assigns main’s terminal daemon protocol v38 so an updated app starts its own daemon rather than reusing the v37 daemon shipped with 1.4.217.

  • It retains v37 in the legacy attachment list so existing terminals can remain with their owner.
  • It updates both local-build compatibility contracts and the version assertions.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Updated app: protocol v38] --> B[New v38 endpoint and daemon]
  A --> C[Legacy adapter: v37 endpoint]
  C --> D[Existing v37 terminal sessions]
  B --> E[New terminal sessions]
Loading

Reviews (1) · Last reviewed commit: "fix(daemon): bump main to v38 so it does..."

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Daemon protocol bump 37 → 38 — PROTOCOL_VERSION is now 38 so a build from main starts a fresh daemon instead of reusing the v37 daemon shipped by the 1.4.217 patch release.
  • v37 kept attachable — 37 is appended to PREVIOUS_DAEMON_PROTOCOL_VERSIONS, so createLegacyDaemonAdapters keeps running v37 owners attachable while they drain.
  • Named marker — POST_1_4_217_PATCH_DAEMON_PROTOCOL_VERSION = 38 documents the boundary, mirroring the CODEX_NO_DAEMON_SHELL_LAUNCH_DAEMON_PROTOCOL_VERSION = 37 precedent from #23907.
  • Compatibility contract — local-build-compatibility-contract.{json,ts} bump daemonProtocolVersion to 38 and append 38 to attachableDaemonProtocolVersions.
  • Version tests updated — the protocol-version and foreground-confirmation tests pin 38 and add 37 to the previous-version list.

The bump is internally consistent: src/main/local-builds/local-build-compatibility-contract.test.ts:11 enforces daemonProtocolVersion === PROTOCOL_VERSION and attachableDaemonProtocolVersions === [...PREVIOUS, PROTOCOL_VERSION], createLegacyDaemonAdapters derives adapters from PREVIOUS_DAEMON_PROTOCOL_VERSIONS (so v37 arrives automatically), and 38 stays distinct from the previous set (the invariant src/main/ipc/pty-management.ts:143 relies on). The config/scripts/*.mjs protocol readers still take the leftmost PROTOCOL_VERSION = <n> match, so the new sibling marker line does not perturb them.

One sequencing note, already captured in the PR body: this only takes effect if it lands before the next release is cut from main, and it explicitly must not be cherry-picked into 1.4.217.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: 5c3174bc-9efd-40b3-81a4-03908cdc8dda

📥 Commits

Reviewing files that changed from the base of the PR and between 8f4a740 and aaa5529.

📒 Files selected for processing (5)
  • src/main/daemon/daemon-foreground-confirmation-protocol.test.ts
  • src/main/daemon/daemon-protocol-version.test.ts
  • src/main/daemon/daemon-protocol-version.ts
  • src/shared/local-build-compatibility-contract.json
  • src/shared/local-build-compatibility-contract.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.


📝 Walkthrough

Walkthrough

The daemon protocol version changes from 37 to 38. The new POST_1_4_217_PATCH_DAEMON_PROTOCOL_VERSION constant is set to 38, and version 37 is added to the previous-version list. Both local-build compatibility contracts include version 38 as the current and attachable protocol version. Related tests expect these values.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to aaa55

Protocol v38 is current while v37 remains compatible, and the smoke scripts use the new version. No actionable compatibility blocker is supported by the supplied evidence.

Security Architecture Review

Security architecture risk: 🔵 Low · up to aaa55

The new build uses a separate daemon endpoint while keeping existing terminals attachable. The reviewed connection and ownership controls remain in place. Rollback and concurrent-start behavior have not been fully validated.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The affected access path is the versioned local terminal-daemon endpoint and its live terminal sessions. The inspected change does not add a new connection role or remove the existing handshake checks.

Trust Boundaries and Controls

  • observed — Version 37 is reached through a version-specific legacy adapter, not by relaxing the current daemon’s protocol check. Connections still require the endpoint’s token and the accepted control or stream role.

Resilience and Maintainability Implications

  • inferred — Installing the routed provider last and leaving legacy daemons with their original owners limits the effect of a failed or interrupted new-daemon adoption. Cross-process startup and platform-specific cleanup behavior remain unvalidated at runtime.

Hardening Proposals

  • proposed — Validate an actual downgrade with live protocol-38 terminals and concurrent startup on both socket and named-pipe platforms to strengthen evidence for rollback and endpoint ownership.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: bumping the daemon protocol to v38 to prevent reuse of the 1.4.217 patch daemon.
Description check ✅ Passed The description is detailed and covers the motivation, behavior before and after, implementation, compatibility impact, testing, linked issue, and lack of UI changes. Some template sections, such as A…
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 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

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

Jinwoo-H commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Closing: obsolete. v1.4.219 ships at daemon protocol v38 via the release branch; main is at v39.

@Jinwoo-H Jinwoo-H closed this Oct 2, 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