Skip to content

feat(server): allow concurrent hosts - #367

Merged
danyaberezun merged 2 commits into
mainfrom
remove-host-ownership-guard
Sep 1, 2026
Merged

feat(server): allow concurrent hosts#367
danyaberezun merged 2 commits into
mainfrom
remove-host-ownership-guard

Conversation

@rsolmano

Copy link
Copy Markdown
Collaborator

Summary

Allow multiple ThinkRail hosts to start against the same canonical data directory. This removes the startup collision that prevented running bun run dev from the main checkout and feature workspaces at the same time while preserving each launcher's existing port selection and graceful shutdown.

Changes

  • remove the data-directory ownership listener and its startup error types
  • simplify bootHost to retain process signal handling without lease lifecycle wrapping
  • replace second-host refusal coverage with a regression test that boots and health-checks two hosts against one data directory
  • remove the obsolete target-native ownership check from the release workflow
  • update architecture, server, CLI, desktop, and CI specs to record the new policy

Concurrent hosts still have independent in-memory services and event streams. Shared persistence has no cross-process locking or convergence guarantee, so simultaneous writes may be last-writer-wins.

Testing

  • bun run check:deps — passed
  • bun run check:boundaries — passed
  • bun run check:seams — passed
  • bun run lint — passed with 6 pre-existing unused-suppression warnings
  • bun run typecheck — 14/14 tasks passed
  • bun run test — 14/14 package tasks passed; server reported 871 tests passed
  • bun run e2e — 316 tests passed across 8 shards
  • two-process shared-data smoke — both hosts started on distinct ports and returned ok from /health

ThinkRail-Todo: 01a05876-3776-74bb-a5e5-afa59b823d65/t_4ecac6e9b1f0
ThinkRail-Todo: 01a05876-3776-74bb-a5e5-afa59b823d65/t_828bfccc832a
@rsolmano
Rinat S (rsolmano) marked this pull request as draft September 1, 2026 13:35
@rsolmano
Rinat S (rsolmano) marked this pull request as ready for review September 1, 2026 13:35

@jetbrains-air jetbrains-air Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved — ready to merge.

@rsolmano
Rinat S (rsolmano) added this pull request to the merge queue Sep 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Sep 1, 2026
@danyaberezun
danyaberezun added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 8fad922 Sep 1, 2026
6 checks passed
@danyaberezun
danyaberezun deleted the remove-host-ownership-guard branch September 1, 2026 19:02
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.

2 participants