Repository navigation
Read exact execution receipt after uncertain claim - #979
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to handle uncertain claim POST results by reading execution receipts from a new endpoint, /v0/work-items/execution-receipt/read. It adds the necessary deserialization structures, parsing logic, and asynchronous retrieval functions, updating send_claim_to_async to resolve claims using historical receipts while preventing unsafe replays. Comprehensive unit tests and documentation have also been added. The review feedback suggests improving code readability in send_claim_to_async by refactoring a complex chunk-reading loop into a more idiomatic Rust loop with match, and enhancing debuggability in parse_execution_receipt by preserving the JSON deserialization error in the returned error message.
Summary
If the fixed work-item claim request receives an uncertain response, the client now retains its request UUID and makes one bounded read for that exact operation using the same API bearer. A matching historical claim receipt settles the request as committed. Missing history, a malformed or mismatched receipt, or a failed read remains unresolved; the client never replays the claim.
The receipt lookup carries no claim proof. Regression coverage checks exact request binding, matching historical recovery, unresolved history, and the absence of claim replay.
Validation
rustfmton the changed Rust filesgit diff --check