Skip to content

fix(server): bound provider command lane stalls - #124

Merged
tusharbhardwaj-bk merged 1 commit into
bkmainfrom
fix/bkmain-stop-session-hol-blocking
Aug 20, 2026
Merged

fix(server): bound provider command lane stalls#124
tusharbhardwaj-bk merged 1 commit into
bkmainfrom
fix/bkmain-stop-session-hol-blocking

Conversation

@tusharbhardwaj-bk

@tusharbhardwaj-bk tusharbhardwaj-bk commented Aug 20, 2026

Copy link
Copy Markdown

A provider session restart reproduced the same global prompt-queue outage through a second path: any lifecycle command that never returns can hold the single ordered provider-command worker and prevent later turn starts from waking the durable coordinator.

Keep the upstream ordered worker unchanged, but run each command through a 30-second bounded join. A timed-out command releases the lane immediately and receives a detached interruption request, including when its provider finalizer is uninterruptible. The upstream-owned reactor gains only one marked import and one marked call site; the implementation and regression test are additive fork-owned files.

Validation:

  • 59 focused ProviderCommandReactor and lane regression tests pass
  • formatter and fork-marker checks pass
  • targeted lint reports no new errors
  • full server typecheck is delegated to GitHub CI because this shared host crossed its load safety threshold

Implemented with GPT-5.6 Sol in Codex/T3 Code.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

A second recurrence showed that session restart, not only session stop, can hold ProviderCommandReactor's single DrainableWorker indefinitely. Run each provider command in a detached fiber, join it for at most 30 seconds, then release the global lane and request cleanup in the background. Keep upstream divergence to one marked import and one marked call site; the implementation and regression test are fork-owned additive files.

Co-Authored-By: Codex <noreply@openai.com>
@tusharbhardwaj-bk
tusharbhardwaj-bk merged commit 966bcc6 into bkmain Aug 20, 2026
13 checks passed
@github-actions github-actions Bot added size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Aug 20, 2026
@tusharbhardwaj-bk
tusharbhardwaj-bk deleted the fix/bkmain-stop-session-hol-blocking branch August 20, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant