Skip to content

Fail GroupCommitLoop ops instead of hanging when the writer is not running - #11

Open
janbjorge wants to merge 2 commits into
claude/code-review-bugs-vokwlk-08-gcs-no-reloadfrom
claude/code-review-bugs-vokwlk-09-submit-requires-running-loop
Open

janbjorge wants to merge 2 commits into
claude/code-review-bugs-vokwlk-08-gcs-no-reloadfrom
claude/code-review-bugs-vokwlk-09-submit-requires-running-loop

Conversation

@janbjorge

@janbjorge janbjorge commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Stack 9/9, base #10.

Ops submitted before start() or after the writer task died waited forever. Now they raise JQueueError, and a dying writer fails everything still waiting.

Tests: test_submit_before_start_raises_instead_of_hanging, test_broker_used_without_context_manager_raises, test_writer_cancelled_fails_waiting_ops_and_rejects_new_ones fail on base; test_submit_after_start_succeeds passes on both.

JeyBee added 2 commits September 28, 2026 08:29
…nning

_submit() only rejected ops after stop(). Before start() (for example a
BrokerQueue used without "async with"), or after the writer task died,
the op was appended to _pending and its future was awaited forever.
If the writer task was cancelled mid-batch, the in-flight batch and
everything still pending also hung, because _commit_batch only catches
Exception.

- _submit raises JQueueError when the writer task was never started or
  has finished.
- _writer_loop fails the in-flight batch and all pending ops with
  JQueueError when it exits for any reason.

This branch has not been deployed

No deployments
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