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

fix(cli): elect managed service by port bind#37572
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)

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