fix(hub): keep ambiguous queued-message cancels indeterminate - #1750
Merged
Conversation
There was a problem hiding this comment.
Findings
- None.
Summary
Review mode: initial
No issues found in the added or modified lines. Residual risk: repository code was not executed under this review’s security constraints; static review covered the cancel ACK state machine, concurrent consumed/cancel transitions, SSE propagation, and explicit retry/discard handling.
Testing
Not run (automation). GitHub integration check passed; the main test check was pending at review time.
HAPI Bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
not-foundas proof that the CLI consumed the queued promptindeterminate, publishmessages-indeterminate, and return the existingbusyresponseconsumed: trueACKWhy
A client pressing Cancel could cause the hub to stamp
invoked_atand emitmessages-consumedsolely because the CLI did not answer or could not find the queue entry. The client then correctly rendered the server-authoritative row as sent, making Cancel appear to deliver the prompt. Timeout/not-found is ambiguous; it is not evidence of model consumption.Verification
bun test hub/src/sync/messageService.test.ts— 52 passedbun run test:hub— 1,209 passed, 3 skipped, 0 failedbun run typecheck:hub— passedThis pull request was generated with AI assistance (OpenAI Codex) and manually reviewed/tested before submission.