Skip to content

fix(queue): preserve new user work across turn shutdown - #3212

Merged
bobleer merged 3 commits into
GCWing:mainfrom
bobleer:bob/fix-queue-after-stop
Sep 23, 2026
Merged

bobleer merged 3 commits into
GCWing:mainfrom
bobleer:bob/fix-queue-after-stop

Conversation

@bobleer

@bobleer bobleer commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Desktop Stop preserves a recoverable interruption, but the host-owned queue rejected the next prompt with Queue is blocked by interrupted turn recovery. New work could also be accepted after a turn settled and then incorrectly parked by that turn's delayed interrupted/failed outcome.

User submissions now supersede interruption through the existing admission path. Admission records which terminal turn preceded new work, so that turn's delayed cleanup cannot consume it. Held older messages stay intact for explicit retry/removal and no longer deadlock new user work; background work remains held. The host takes queue and receipt locks separately when selecting protected work.

“Send now” on a stopped session can explicitly start the chosen message. Failed admission preserves both the message and the interrupted turn's recovery state, and repeated operation IDs cannot execute twice. Desktop also provides a local copy-to-composer action for an unresolved draft after an owner restart, preserving attachments and context without sending, cancelling, or discarding its receipt.

Validation:

  • Original scheduler reproduced the exact reported error with the new stop/send regression.
  • Entire scheduler test module after integrating latest main: 64 passed, including queue receipt deduplication, caller disconnect, stop/failed-outcome timing, consecutive prompts with held messages, promotion, cancellation, stale targets, background replies and maintenance/deletion.
  • Interrupted/recovery tests: 15 passed, including persisted recovery, generation checks and failure preservation (some overlap with scheduler suite).
  • Desktop queue/state-machine/local-driver tests: 17 passed.
  • Mobile/shared host queue suite: 16 passed, including real Chrome close/reopen with IndexedDB, lost acceptance, host restart, scope fencing and mobile composer/layout tests.
  • Icon integration/startup tests: 17 passed; static icon check passed.
  • Generated API bindings, Web UI type-check, i18n audit (0 warnings), changed-Rust formatting and diff checks passed.

Scope and limits: Desktop and CLI peer adapters and the mobile relay handler were reviewed; they all delegate to the same host queue owner. Runtime tests use real scheduler/persistence with a model fixture, and browser tests simulate host RPC. No packaged desktop, physical phone, live SSH workspace, peer-device or detached-dispatch end-to-end run was performed. Wire and persisted shapes are unchanged; the admission bookkeeping is host-local.

@bobleer bobleer changed the title fix(queue): accept new prompts after manual stop fix(queue): preserve new user work across turn shutdown Sep 23, 2026
@bobleer
bobleer merged commit 2879685 into GCWing:main Sep 23, 2026
13 checks passed
@bobleer
bobleer deleted the bob/fix-queue-after-stop branch September 24, 2026 08:19
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.

1 participant