Skip to content

fix: bind BCA readback to session tuple - #64

Merged
CondorCommodore merged 1 commit into
mainfrom
agent/cos-exact-receipt-readback
Aug 4, 2026
Merged

fix: bind BCA readback to session tuple#64
CondorCommodore merged 1 commit into
mainfrom
agent/cos-exact-receipt-readback

Conversation

@CondorCommodore

Copy link
Copy Markdown
Owner

Summary

  • persist cli_session_id and coord_session_id in BCA reservation payloads
  • bind BCA readback verification to the full session tuple
  • extend focused readback tests to cover the strengthened terminal binding

Verification

  • python3 -m pytest -q tests/test_c2_coord_client.py

@CondorCommodore
CondorCommodore merged commit 40dac8e into main Aug 4, 2026
5 checks passed
@CondorCommodore
CondorCommodore deleted the agent/cos-exact-receipt-readback branch August 4, 2026 01:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +540 to +541
"cli_session_id": envelope["cli_session_id"],
"coord_session_id": envelope["coord_session_id"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +91 to +92
"cli_session_id",
"coord_session_id",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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