Skip to content

Keep provider startup fallback timer alive - #4864

Merged
SawyerHood merged 1 commit into
mainfrom
slopcop/issue-4862
Oct 5, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
slopcop/issue-4862

Conversation

@bb-slop-cop

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

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

Provider-registration waits use a 30-second fallback timer that does not keep Node alive. Before the server opens its listener, recovery can await that timer with no other referenced handles, allowing a successful process exit before startup completes. The same behavior affects provider-specific registration waits.

Investigation: https://get-bb.github.io/reports/issues/4862.html

What changed

Keep the existing provider-registration fallback timer referenced until readiness or timeout completes. Existing timer cleanup remains unchanged. Add a real child-process regression covering both global and provider-specific waits. No dependency, protocol, schema, persisted-data, permission, packaging, or CLI changes.

Changed-line count: 37 total text lines across 2 files (36 additions, 1 deletion), measured with git diff --numstat origin/main.

How you verified

  • Frozen installs and dependency-aware server builds in two clean checkouts of trusted main at 09ff18a73bd0a8037f43c6ed86c28eb02228089c.
  • Before the fix, the focused regression fails in both checkouts: child processes exit 0 with empty stdout instead of completing their waits.
  • After the fix, pnpm exec turbo run test --filter=@bb/server -- test/providers/provider-registry-liveness.test.ts test/providers/provider-registry.test.ts test/services/periodic-sweeps.test.ts passes all 26 tests.
  • pnpm exec turbo run typecheck --filter=@bb/server passes.
  • git diff --check and binary/changed-line checks pass.
  • Direct lifecycle reproduction uses Linux Node 22; the reporter's macOS desktop bundle and database were not used. The existing 30-second fallback and startup ordering are intentionally retained.

Fixes #4862

AGENT GENERATED

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.

Server never starts: pre-listen startup sweep awaits provider registrations whose 30 s fallback timer is unref'd, so the process exits 0

1 participant