feat(opencode): add managed setup and stable runtime admission - #696
Conversation
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.
|
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. |
|
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.
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.
… prep/opencode-v2-post-beta
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.
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/35519160535 Artifacts expire in 7 days.
|
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.
Pre-merge integration reviewUpdated PR #696 with
Validation on the integrated tree:
Evidence is retained in the approved temporary |
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.0policy has been replaced by a technically justified boundary.session.step.started.data.started, consumed directly by the current Solid reducer. Earlier versions require the timestamp fallback removed by this cleanup.+buildmetadata survive the actual executable probe. They do not enable an automatic update/downgrade based on a truncated stable version.Precisely what is removed
catalog.updatedinvalidation. Current resource-specific events remain;session.message.content.updatedis retained because it still belongs to the current durable event union.What remains, and why
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
opencode/pr696-native-207-210/MIGRATION-MINIMUM207.md.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) andcodenomad-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.mdfor exact boundaries, retained responsibilities and evidence locations.Pre-merge refresh against current dev
Integrated
dev@306c2ba4in8517fb23, 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.tsandoutline-preview.tswere 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.