Skip to content

Prevent duplicate launchers from starting a second server - #5406

Merged
SawyerHood merged 1 commit into
mainfrom
slopcop/issue-5404
Oct 13, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
slopcop/issue-5404

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

A rejected runtime-record claim only printed a warning. Full-stack startup still spawned a server against the already-served data directory and occupied listener, opening the shared store before failing with EADDRINUSE.

Verified reproduction and root-cause report. The same investigator reproduced the defect in two clean trusted checkouts at b5618353309df57e67794e64ca275dccc88b2d34, with separate temporary stores and ports.

What changed

When another live runtime owns the data directory and the configured local health endpoint is healthy, the launcher returns with exit status 1 before starting either child. Unhealthy-owner and unclaimed-record startup remain reachable. The existing runtime record is preserved. The README documents this behavior.

Only packages/bb-app changes: three files, 112 changed text lines (112 additions, zero deletions). No dependencies, generated files, migrations, stored-data changes, public protocol changes, or new commands/flags.

How you verified

  • Added the launcher-boundary regression before changing production code. On unchanged main it failed in both clean checkouts because the pre-server-start callback ran despite a healthy live owner; both fallback controls passed.
  • After the fix, all three regression cases pass. Only package-artifact presence is substituted; runtime-record I/O and HTTP health checks are real, and no database is mocked.
  • pnpm exec turbo run test typecheck --filter=bb-app: 22 test files, 206 tests, and typecheck pass.
  • pnpm exec turbo run build --filter=bb-app: passes.
  • Real packaged-launcher verification: the duplicate exits 1 without attempting server startup or producing a new server diagnostic; the incumbent stays healthy and its record is unchanged.
  • git diff --check: passes; git diff --numstat origin/main: 112 text lines across three files, no binary changes.

Fixes #5404

AGENT GENERATED

@SawyerHood
SawyerHood merged commit bf912d3 into main Oct 13, 2026
24 checks passed
@SawyerHood
SawyerHood deleted the slopcop/issue-5404 branch October 13, 2026 21:41
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.

bb-app start boots a server against the shared database when another bb already serves the data directory

1 participant