Skip to content

feat(opencode): add managed setup and stable runtime admission - #696

Merged
pascalandr merged 19 commits into
devfrom
prep/opencode-v2-post-beta
Sep 20, 2026
Merged

pascalandr merged 19 commits into
devfrom
prep/opencode-v2-post-beta

Conversation

@pascalandr

@pascalandr pascalandr commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Main change: retire obsolete OpenCode V2 compatibility

This PR removes the old V2 wire adaptations. Following the user's review, the initial arbitrary >=2.0.11 <3.0.0 policy has been replaced by a technically justified boundary.

  • Technical minimum: 2.0.7. This release introduces session.step.started.data.started, consumed directly by the current Solid reducer. Earlier versions require the timestamp fallback removed by this cleanup.
  • Recommended and release-tested: 2.0.11. This remains independent of the minimum and the pinned client/plugin packages. 2.0.7–2.0.10 are not blocked because they are older than the recommendation.
  • Unlisted versions, custom/prerelease labels and future majors undergo authenticated bounded API recognition. Unknown is not synonymous with incompatible. Missing canonical APIs or session-environment replacement produce a concrete reason.
  • Custom CLI labels and +build metadata survive the actual executable probe. They do not enable an automatic update/downgrade based on a truncated stable version.

Precisely what is removed

  • Pre-2.0.4 request routes, methods and payload translations; HTTP inbox timestamp conversions; old permission-event naming.
  • The pre-2.0.7 step timestamp fallback.
  • Remaining pre-2.0.4 live location/worktree/credential/Form serializers and legacy-positive selector/import/cursor acceptance branches.
  • Obsolete catalog.updated invalidation. Current resource-specific events remain; session.message.content.updated is retained because it still belongs to the current durable event union.
  • The now-unused global npm/pnpm/bun/yarn installer and its legacy-package removal path.

What remains, and why

  • Authenticated historical service discovery prevents a current CLI from mistaking an older live daemon for a stopped one and replacing it unintentionally.
  • Current authorization, cancellation, generation and no-write-retry checks remain. Internal historical identities, original pagination cursors and independent import-history ownership are preserved; obsolete public workspace selectors are rejected explicitly.
  • CodeNomad plugin-entry/presence migration remains necessary for existing installations and concurrent backends.
  • Pruning's read-only preview and TUI synchronization remain necessary with the current plugin contract; their stale beta-only comments were corrected.

Setup changes retained and corrected

The shared card is an implementation-reuse choice, not an absolute requirement that all failures have the same screen. Missing installations, technical incompatibility and optional updates expose distinct actions. Minimum/recommended/running versions and the technical explanation are separate. A usable older daemon can continue without restarting.

Node's official archive already contains npm; the previous packaging step discarded it. Both desktop hosts now retain npm and install the CLI into a persistent user prefix. Installation and shared-daemon restart remain separate, custom/WSL executable selections are preserved, and an unavailable bundled npm does not advertise automatic installation. Server builds clean generated output so deleted compatibility modules cannot survive incremental packaging.

The explicit configuration-reload action is an additional recovery feature, not the original cleanup request. It remains optional, follows actual route availability, and explains native daemon-wide interruption. Ordinary reads/provisioning never invoke it.

Validation of the corrected implementation

  • 622 server tests passed, 2 skipped; no failures. Server/UI typechecks passed.
  • 7 real Solid browser setup scenarios, 11 native-reducer/invalidation tests, and 11 packaging/fixture-guard tests passed; rendered setup captures inspected.
  • Native 2.0.7, 2.0.8, 2.0.9, 2.0.10 and 2.0.11 control each passed 13 direct integration scenarios, including real environment replacement/isolation, synthetic prompts, Shell and current plugin/RPC loading.
  • Production CodeNomad suites passed on 2.0.7: environment, locations/worktrees/relay, pruning/proxy with rendered UI, and automation. 2.0.10 passed environment and full pruning/proxy. Both passed real compaction and pre-compaction history pruning.
  • The 2.0.7/2.0.8 provider/model component schemas differ, but CodeNomad does not generate the newer settings payloads. Raw user configuration still requires runtime-appropriate syntax; no universal settings-shape compatibility is claimed.
  • Native beta-19271 / 2.0.3 → 2.0.7 history migration passed on Windows and native Linux/WSL, including long paginated histories, forks, historical identities, provider connections, unchanged seed database hashes and same-version Form durability controls. Evidence: approved temporary opencode/pr696-native-207-210/MIGRATION-MINIMUM207.md.
  • Real installation of 2.0.7 without system Node/npm on PATH passed.
  • Autonomous independent review loop closed all source/docs/CI and final fixture findings. The production custom-version parsing finding received regression coverage and independent re-review.
  • CI now reads the technical minimum from source and qualifies both minimum/latest runtimes rather than only latest.
  • Final packaged Electron and Tauri acceptance passed at 781c3a42. On both hosts, installing 2.0.11 retained the compatible 2.0.10 daemon with identical PID/version and optional restart. The 2.0.3 scenario required an explicit restart. Both resumed the requested folder and passed recovery reentry over the loading overlay; retired generated modules were absent. All private services and fixture windows were stopped. Final rendered captures inspected. Evidence: pr696-native-207-210/DESKTOP-FINAL.md, codenomad-setup-desktop-Z6gPDT (compatible) and codenomad-setup-desktop-kr69SG (retired).

Earlier results remain recorded as historical evidence, not approval of the discarded version policy. Corrected local/native/packaged acceptance is complete; final-head remote CI is not yet confirmed. See dev-docs/OPENCODE_V2_POST_BETA.md for exact boundaries, retained responsibilities and evidence locations.

Pre-merge refresh against current dev

Integrated dev@306c2ba4 in 8517fb23, including #723 full-history search/global navigation and #732/#734 README updates. The merge was conflict-free, but validation found an upstream standalone-plugin packaging omission: navigation-scope.ts, outline-index.ts and outline-preview.ts were absent from the distribution allowlist. The manifest is corrected and the existing pack-outside-checkout entrypoint test passes.

The merged result passes 643 server tests (2 skipped), 154 UI store/reducer tests, 29 browser tests and both typechecks. The rebuilt bundled plugin also passes the complete native 2.0.7 fixture with UI, including 241-message history search/counts/batch cleanup and 1,501-message outline/distant-window/restore parity. The new features introduce no demonstrated need to raise the technical minimum.

Start a maintained preparation register from the merged cross-runtime
implementation in #695. Separate the client/plugin dependency versions,
authenticated daemon support policy and CodeNomad release decision so a
future minimum is chosen from the actual post-beta publication contract.

Map legacy retirement candidates to their current files while preserving
the shared connection seam, lifecycle/authorization guarantees, native
pagination and pruning storage/claim safety. Define isolated historical
data acceptance before removing legacy location identity, with explicit
coverage for same-directory sessions, moved histories, forks and compaction.

Track policy preparation, migration certification, implementation cleanup
and release gates as small reviewable increments. Link the new register
from the index and compatibility audit. Current dependencies, supported
runtimes and production behavior are unchanged; implementation work remains
open. Validate document links, repository paths and whitespace only.
@pascalandr

Copy link
Copy Markdown
Contributor Author

Implementation and qualification are published in #728 (33730ac): client/plugin pinned together to 2.0.11, authenticated server.info routing, legacy step timestamps, hidden Forms values and visible tool-settlement reconciliation. Isolated native proxy/pruning/location acceptance passes on 2.0.11, 2.0.5, 2.0.3 and beta-19271; current automation/heartbeat, environment and forks also pass. The exact evidence and remaining platform boundaries are in dev-docs/OPENCODE_2_0_11_QUALIFICATION.md. This supplies dependency/runtime alignment for this register while retaining existing compatibility; minimum-runtime policy and retirement remain separate decisions. Published #723 at 5b988ec also passes its native history fixture on 2.0.11 with unchanged 2.0.4 dependencies; rerun after the branches converge.

@pascalandr

Copy link
Copy Markdown
Contributor Author

Support policy is now decided and implemented in the guidance/CI update c338279 in #728: qualify only the latest stable OpenCode runtime. Each CodeNomad release sets its minimum supported OpenCode version to the latest stable available at the time of that CodeNomad release, records it in release notes, and keeps that floor fixed for the release. Retained compatibility code does not imply older-runtime support. Removed the per-version qualification report; use dev-docs/OPENCODE_V2_COMPATIBILITY.md as the shared reference and PR/CI logs for detailed evidence. This supersedes the pending minimum-policy statement in my earlier comment.

Record that OpenCode V2 is published on the stable channel and make the transition register independently mergeable, with implementation and retirement gates maintained through follow-up PRs.

Specify a shared missing-runtime and required-update screen, optional-update notices, first installation through the existing updater, and bundled Node plus npm for desktops without system tooling. Preserve host/WSL targeting, persistent installation paths, shared service ownership and actual daemon revalidation after installation or explicit restart.

Correct the discovery-route retirement criteria and retain historical-data certification before changing support. Validate whitespace, referenced repository paths and local documentation links; no runtime behavior is changed.
@pascalandr pascalandr changed the title docs(opencode): prepare the post-beta runtime support transition docs(opencode): define stable runtime transition and setup plan Sep 20, 2026
@pascalandr
pascalandr marked this pull request as ready for review September 20, 2026 12:32
Require stable OpenCode >=2.0.11 <3.0.0 from authenticated daemon metadata before functional clients and plugin provisioning. Keep bounded contract recognition, connection-generation fencing and native ownership checks while retiring old request, response and event conversions.

Unify missing and outdated runtime recovery with Preferences. Install exact stable releases through bundled Node/npm into a verified versioned user prefix, preserve custom and WSL selections, and separate installation from explicit shared-service restart through the native-parent starter. Fence stale setup responses, retain pending folder opening and never replay prompts.

Certify isolated 2.0.3-to-2.0.11 history migration with executable hashes, untouched seed storage, paginated messages, forks, compaction checkpoints, location moves and pending inbox data. Add minimum/latest cross-platform migration and installation gates, packaged npm closure checks, real Solid recovery regressions and supported-contract authority tests.

Validated server/UI types, focused unit and reducer suites, browser captures, actual packaging-prepared Node 24.20.0 installation without system Node, and native location, automation and pruning fixtures. Document packaged-desktop, WSL, broader historical-state and remote-CI evidence as remaining release gates.
@pascalandr pascalandr changed the title docs(opencode): define stable runtime transition and setup plan feat(opencode): add managed setup and stable runtime admission Sep 20, 2026
Keep activation explicit after optional upgrades while reconnecting backend authority to the newly selected executable. Supported running daemons remain usable and new workspaces can open when restart is deferred. Recheck executable selection and execution-host eligibility before mutating the shared service.

Publish verified installations with immutable, exclusive version receipts. Concurrent older installs cannot downgrade a newer selection, and same-version Windows publishers no longer replace an open receipt. Continue reading previous current markers.

Cover the gatekeeper findings with real manager/shared-service ownership regressions, browser recovery tests, and concurrent installer tests. Extend native migration to beta and stable seeds, same-version Forms durability controls and historical provider connections. Provide the POSIX shell explicitly in the no-system-Node fixture, fixing Linux/macOS installation CI isolation.
Ensure a wedged migration reports a failure instead of retaining a native fixture indefinitely. Apply a whole-run deadline and per-request cancellation through the generated client, bound startup/version probes, and reject repeated pagination cursors.

Escalate termination only for the child spawned by the fixture, with bounded graceful/forced waits and explicit failure if termination cannot complete. Keep cleanup in finally blocks and add workflow timeout backstops.

Gatekeeper re-review reports no remaining findings in acceptance/CI paths. Three failure-guard regressions pass; native historical migrations pass again on Windows and Linux with the guards enabled.
Resolve the authenticated daemon's discovery root through the selected distro and translate its canonical path for Windows filesystem access. Mounted drives and Linux aliases now use accessible host paths while plugin import URLs and presence paths remain Linux-native.

Preserve existing outside-root storage and migrate canonically inside-root storage without modifying older backend leases. Carry the surviving installation claim's ownership fence through asynchronous translation, validate outputs under one deadline, and encode POSIX file URLs without corrupting literal percent sequences.

Native, mounted and aliased WSL fixtures verified provisioning, heartbeat stability, explicit reload, restart and reconnect. Nineteen path/installation/lifecycle regressions pass; independent gatekeeper re-review reports no remaining path-handling findings. Native watcher limitations require separate explicit configuration reload recovery.
Expose informed native configuration reload in the existing setup and preferences card for installed plugins that remain unavailable on mounted or aliased discovery roots. All ten locales explain that this rebuilds every loaded location, cancels pending permissions and Forms, and closes terminals/background commands. Reads, installation and ordinary connect never invoke reload.

Admit the authenticated daemon, provision through current connection authority, and recheck executable/host selection immediately before the bounded native reload. Serialize daemon-wide actions by updater/shared-service authority rather than mutable executable path; coalesce only the same action and captured selection.

Add strict exclusive action-route tests, real manager reconnect/reload coverage, cross-selection in-flight races and browser explicit-intent regression. Gatekeeper re-review reports no remaining recovery findings. Final server suite passes 616 tests with two skips; six browser regressions and server/UI typechecks pass.
Exercise the real Windows-to-WSL service lifecycle and plugin provisioning through native, mounted and aliased discovery roots. Use guarded fixture-owned registrations, unique service ports and fully isolated environments; record actual watcher behavior, measured lease heartbeats, explicit reload, restart and cleanup.

Characterize reload with a held synthetic provider stream and native pending Form, Shell and PTY. Verify one successful provider request without replay and record native resource teardown. Update all locale descriptions to explicitly include terminals and background commands.

Bound the whole fixture, native requests, predicates and cleanup independently. Handle detached event-consumer failures immediately while preserving awaited failure reporting. Seven guard regressions and final real aliased reload-safety acceptance pass; autonomous gatekeeper re-review reports no remaining fixture findings.
…llation

Use action-neutral setup failure copy in all ten locales. Connection, restart or configuration reload can fail after installation has already succeeded, so the recovery card must not claim that the installed version is unchanged.

Add a browser regression that installs successfully, fails first activation, retains the installed-version state and connects on retry without reinstalling. All seven setup browser regressions pass.
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/35519160535

Artifacts expire in 7 days.
Artifacts:

  • pr-696-550e0a4311046b7350db4cf024545eb045dbc45d-tauri-macos
  • pr-696-550e0a4311046b7350db4cf024545eb045dbc45d-electron-macos
  • pr-696-550e0a4311046b7350db4cf024545eb045dbc45d-tauri-windows
  • session-pruning-plugin-macos-latest
  • session-pruning-plugin-windows-latest
  • session-pruning-plugin-ubuntu-latest
  • pr-696-550e0a4311046b7350db4cf024545eb045dbc45d-tauri-macos-arm64
  • pr-696-550e0a4311046b7350db4cf024545eb045dbc45d-tauri-linux
  • pr-696-550e0a4311046b7350db4cf024545eb045dbc45d-electron-windows
  • pr-696-550e0a4311046b7350db4cf024545eb045dbc45d-electron-linux

Do not treat a newer CLI's stopped status as proof that its older shared daemon is absent. Resolve native service metadata read-only through the selected execution host, match the channel's credential/configuration unambiguously, and authenticate historical metadata routes before admitting the registered endpoint. Repeat discovery inside ensure before starting.

Fail closed for malformed or oversized records, ambiguous identity, authentication failures, timeouts and existing WSL registrations with forwarding errors. Distinguish fresh configuration with no native registration, preserve the shared loopback policy including 127.0.0.2, and translate mounted/aliased WSL metadata through the selected distro.

Add lifecycle regressions and bounded, isolated packaged desktop acceptance. Both rebuilt Electron and Tauri retain an actual 2.0.3 daemon through installation until explicit restart, then activate 2.0.11 and resume the pending folder. Normal installation/reload and all three WSL modes pass. Final gatekeeper review reports no actionable findings; full server suite passes 621 tests with two skips.
Record completed historical migrations, bounded installation/reload fixtures, canonical WSL provisioning, cross-selection service-action fencing and packaged Electron/Tauri acceptance. Document the native watcher and reload semantics, read-only old-daemon registration fallback, final evidence roots and reproducible isolated commands.

Close local review gates after every actionable finding was corrected and independently re-reviewed. Record the final 621-pass server suite and seven browser regressions while keeping final-head remote CI distinct from earlier green test jobs.
Replace the arbitrary 2.0.11 floor with the 2.0.7 native step-timestamp boundary, keeping 2.0.11 as the separately recommended qualification target. Unlisted, prerelease and custom runtimes negotiate authenticated API requirements; preserve complete CLI labels so unknown builds neither fail solely by name nor enable unintended automatic upgrades.

Finish retiring pre-2.0.4 location/worktree/credential/Form serialization and obsolete catalog events while preserving internal identity, import/cursor authorization, pruning claims and connection fences. Remove the unused global package-manager installer and clean generated server output before packaging so deleted modules cannot survive incremental builds.

Distinguish missing setup, technical incompatibility and optional updates in the shared UI, including minimum rationale and optional restart wording. Retain a usable daemon through older discovery CLIs, check reload capability independently, and suppress installation when bundled npm is unavailable.

Validated 622 server tests, 7 browser scenarios, real reducers and fixture guards, production native suites on 2.0.7 and 2.0.10, and synthetic 2.0.3-to-2.0.7 history migration. Independent gatekeeper re-review closed the production version-parser finding. CI now qualifies the source-defined minimum and latest; rebuilt desktop acceptance is recorded separately.
Rebuilt desktop acceptance exposed a blocked recovery action after dismissing setup during an initial folder open. Mount the persistent recovery entry through a body portal so the root-contained folder loading overlay cannot intercept its pointer events. Opening setup still removes the entry and preserves the dialog's modal behavior.

Exercise the real loading-overlay class with the full app stylesheet and normal Playwright clicks; all seven setup scenarios and UI typecheck pass. Independent gatekeeper review found no remaining issue. Record successful Windows and native Linux beta/2.0.3 migrations to the corrected 2.0.7 minimum.
Record successful packaged Electron and Tauri runs at 781c3a4 for a compatible 2.0.10 daemon retained after installing 2.0.11 and a retired 2.0.3 daemon restarted only by explicit action. Both scenarios resume the requested folder, exercise recovery over its loading overlay, and verify that retired generated modules are absent.

Link final evidence and inspected captures, confirm isolated fixture cleanup, and keep completed local/native acceptance distinct from unconfirmed remote CI.
Integrate dev at 306c2ba, including full-history search, cached global timeline navigation and README updates. Preserve the new RPC/client methods alongside managed setup, explicit restart/reload and the technically justified OpenCode 2.0.7 minimum.

Correct the incoming standalone plugin manifest to include navigation-scope, outline-index and outline-preview. Both the existing packed-entrypoint regression and independent gatekeeper review identified the omitted dependencies; the corrected package resolves outside the source checkout.

Validate 643 server tests (2 skipped), 154 UI store/reducer tests, 29 browser scenarios and both typechecks. The rebuilt bundled plugin passes the complete isolated native 2.0.7 suite with rendered UI, including 241-message history cleanup and 1501-message global navigation/restore parity. Record pre-merge evidence in the compatibility register.
@pascalandr

Copy link
Copy Markdown
Contributor Author

Pre-merge integration review

Updated PR #696 with dev@306c2ba4 in merge commit 8517fb236580cd9fe18b206953dfadc4fbe1c140 before the user-authorized administrator merge.

Validation on the integrated tree:

  • 643 server tests passed; 2 skipped.
  • 154 UI store/reducer tests passed.
  • 29 browser tests passed, covering setup, full-history search and global navigation.
  • Server and UI typechecks passed.
  • Rebuilt bundled plugin passed the real OpenCode 2.0.7 native suite with UI, including 241-message search/counts/cleanup and 1,501-message structural index/distant navigation/restore parity.
  • Independently packed plugin, installed with its dependencies outside the checkout, passed the same new history/navigation and existing pruning/proxy/location native checks on 2.0.7. No additional missing modules. Evidence: p696p-c71c97/native-2.0.7.log, tarball SHA-256 6D36DC97A96F0FCCAA0D4627A22D6A8A9D65AE76F9F57523B96A50434ACBCE12. Private processes and ports were confirmed closed.
  • Independent gatekeeper findings are closed. Final fetch confirms dev remains at the integrated 306c2ba4; the exact reviewed PR head is 8517fb236580cd9fe18b206953dfadc4fbe1c140.

Evidence is retained in the approved temporary opencode directory: 696-merge-server-final.log, 696-merge-ui-stores.log, 696-merge-native207.log, and codenomad-pruning-native-VD53eb. All native checks use private fixture services/data, not the shared user daemon.

@pascalandr
pascalandr merged commit 05e9342 into dev Sep 20, 2026
14 of 29 checks passed
@pascalandr
pascalandr deleted the prep/opencode-v2-post-beta branch September 20, 2026 22:33
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