Skip to content

Reconcile daemon interaction waits when sessions reconnect - #6254

Closed
bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-6251
Closed

bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-6251

Conversation

@bb-slop-cop

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

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

Session reopening did not compare surviving daemon provider waits with server interaction state. A failed answer delivery can interrupt the server interaction while its thread remains active, leaving the daemon's provider promise unresolved. Reproduced twice on trusted main: https://get-bb.github.io/reports/issues/6251.html.

What changed

  • Replay outstanding registrations when a daemon session opens, through the existing idempotent endpoint and current session ID.
  • Share terminal-response handling, preserve open waits on transient reconciliation errors, and ignore responses for removed or replaced entries.
  • Return the wait promise immediately so reconciliation can settle an in-flight first registration safely.
  • Keep the repair in the host-daemon subsystem: four files, 308 total changed text lines (283 additions + 25 deletions) against origin/main. No binary, dependency, stored-data, schema, or wire changes; no protocol-version bump is needed because existing endpoint fields and meaning are unchanged.

How you verified

  • Add the daemon reconnect regression before production edits: fails on unchanged 7f3414a707a54519749d098165e3a98ff73a4b88, receiving still waiting instead of the terminal rejection. Repeat the same failure in a second clean checkout; pass after the fix.
  • Additional regression cases cover pending/resolving waits, transient reconciliation errors, late responses, and first-registration races.
  • pnpm exec turbo run test --filter=@bb/host-daemon -- src/app.test.ts src/interactive-request-registry.test.ts src/server-client.test.ts src/server-connection.test.ts src/command-dispatch.test.ts: 107 passed.
  • pnpm exec turbo run build typecheck --filter=@bb/host-daemon: passes.
  • Scoped oxfmt --check and git diff --check: pass. git diff --numstat origin/main: 308 lines across four files, no binaries.
  • A separate report-only test against the real migrated server database confirms failed answer settlement leaves an interrupted interaction and active thread, and registration replay returns rejected. No live provider or production instance is used.
  • The broader daemon suite has two unrelated failures, reproduced identically on unchanged production code in the second checkout: systemd file mode under umask 0077, and server-move disk-free probing returning null. The relevant five suites above pass; the full suite is not claimed green.
  • Linked PR Recheck waiting provider requests with the server after a daemon reconnect #6252 is closed without merge; no linked open PR was present before this replacement.

Fixes #6251

AGENT GENERATED

@ymichael

ymichael commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

superseded by #6870

@ymichael ymichael closed this Nov 3, 2026
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.

Provider stays blocked on a question the server interrupted after a same-instance daemon reconnect

2 participants