Skip to content

fix: emit one Queue terminal response - #233

Merged
smiggleworth merged 1 commit into
mainfrom
fix/queue-terminal-response-order
Sep 3, 2026
Merged

fix: emit one Queue terminal response#233
smiggleworth merged 1 commit into
mainfrom
fix/queue-terminal-response-order

Conversation

@smiggleworth

@smiggleworth smiggleworth commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • give Queue actor replies and ingress timeout replies a shared one-shot terminal-response claim
  • preserve that claim for deferred long-poll receives
  • suppress whichever response loses the race, preventing client FIFO corruption and duplicate delivery

Why

The hosted Destroyer Queue overload scenario exposed a real response-ordering race: a Queue command could complete just as the synchronous domain dispatch wait expired. Ingress emitted an indeterminate timeout and the actor later emitted the normal response for the same request. The extra frame shifted the client per-message-type FIFO, so a later accepted enqueue could appear retryably rejected and be sent again.

Failure evidence: https://github.com/cntryl/fitz-destroyer/actions/runs/33768148936/job/100691408320

Validation

  • cargo fmt --all -- --check
  • cargo test --workspace
  • cargo clippy --locked --workspace --all-targets --all-features -- -D warnings -D clippy::pedantic
  • cargo test api::runtime_ingress::tests::domain_backpressure
  • cargo test domains::queue::sink

The regression was observed red before the dispatcher arbitration was added (two terminal responses) and green afterward (exactly one).

@smiggleworth
smiggleworth merged commit 2fc4c8d into main Sep 3, 2026
1 check passed
@smiggleworth
smiggleworth deleted the fix/queue-terminal-response-order branch September 3, 2026 15:14
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