Skip to content

fix(cli): elect managed service by port bind - #37572

Merged
opencode-agent[bot] merged 1 commit into
v2from
service-bind-singleton
Jul 17, 2026
Merged

opencode-agent[bot] merged 1 commit into
v2from
service-bind-singleton

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • replace managed service ProcessLock ownership with exclusive binding of the selected service port
  • use mnemonic ports 0xC0DE (49374) for latest, 0xC0DF (49375) for local, and deterministic channel-hashed ports for other release channels, with configured ports taking precedence
  • authenticate and probe exact-port incumbents during bounded startup races while reporting actionable foreign-listener conflicts
  • order registration reassertion generations and bound Effect and Promise client ensure loops

Tests

  • bun test test/service.test.ts --timeout 120000 (packages/cli)
  • bun test test/service.test.ts test/promise-service.test.ts --timeout 30000 (packages/client)
  • bun test test/server-connection.test.ts --timeout 30000 (packages/cli)
  • bun typecheck (packages/cli)
  • bun typecheck (packages/client)

Requested by: @thdxr (Dax Raad via Slack)

@opencode-agent
opencode-agent Bot force-pushed the service-bind-singleton branch from 36c267b to 0e7083b Compare July 17, 2026 23:08
@opencode-agent
opencode-agent Bot merged commit 6ea8247 into v2 Jul 17, 2026
10 checks passed
@opencode-agent
opencode-agent Bot deleted the service-bind-singleton branch July 17, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant