fix: update live-connection hint for managed opencode #395
No reviewers
Labels
No labels
backend
bug
chore
duplication
effort:complex
effort:medium
effort:trivial
enhancement
frontend
fullstack
priority:high
ready-for-agent
refactor
security
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dries/ocman!395
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-live-connection-hint"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The composer showed a stale
opencode --port 0message, but ocman now launches and manages the OpenCode instance per project itself. Updated the user-facingLiveConnectionHintand the two doc-comment references.Reshape the ensure seam so all callers get a reachable endpoint + opaque instance instead of a discovered port + tmux name, and drive the managed lifecycle through ocruntime.Runtime instead of lsof discovery. - EnsureProjectOpencodeResult -> {Endpoint, RepoRoot, Runtime, Launched} with a Port() accessor for callers that still thread a raw port. - local.Host holds an injected ocruntime.Runtime (default native tmux) + a singleflight.Group and an in-memory managed-instance registry (persistence is #391). - EnsureProjectOpencode body: singleflight(repoRoot) -> reuse when Probe reports healthy -> else allocate port, Launch, wait-for-Probe. The managed path no longer depends on lsof; health verifies the OpenCode API, not listener presence. - Add HostCaps.OpencodeLaunch, distinct from Tmux, surfaced via /api/capabilities. - Update all callers (worktree create, MCP ensurer, server wiring, remote host + stubs) and reshape the ensure/host tests to a fake-Runtime model (concurrency, reuse, stale-relaunch, health-timeout).Coverage ratchet: ✅ pass
Tolerance: -0.1%. Baseline stored on
gh-pages.