fix: bind BCA readback to session tuple - #64
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6d80847f0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "cli_session_id": envelope["cli_session_id"], | ||
| "coord_session_id": envelope["coord_session_id"], |
There was a problem hiding this comment.
Preserve retries across the reservation payload change
When a reservation first submitted by the previous client is retried after rollout, these fields change the POST body while reserve_bca() still sends the same envelope-derived idempotency key. Because the BCA contract rejects same-key/different-payload replays, supervisor recovery will receive a non-201 response and abort instead of recovering the existing reservation; use a backward-compatible read/migration strategy for previously keyed dispatches.
Useful? React with 👍 / 👎.
| "cli_session_id", | ||
| "coord_session_id", |
There was a problem hiding this comment.
Handle existing reservations before requiring new row fields
For a dispatch reserved before this rollout but completed afterward, the persisted reservation and receipt events lack these two newly required row fields. verify_bca_readback() compares event.get(field) against the newly generated correlation tuple and therefore rejects the otherwise valid terminal receipt, preventing in-flight work from being recovered; either migrate/drain existing events or retain an explicitly bounded legacy verification path.
Useful? React with 👍 / 👎.
Summary
Verification