Skip to content

feat: correlate bca terminal readback to exact receipt tuple - #60

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

feat: correlate bca terminal readback to exact receipt tuple#60
CondorCommodore merged 1 commit into
mainfrom
agent/cos-receipt-readback-correlation

Conversation

@CondorCommodore

Copy link
Copy Markdown
Owner

Summary

  • verify BCA terminal readback against the exact immutable reservation tuple
  • require correlated chains to preserve the same durable correlation object across reservation and receipt events
  • extend coordinator/tests to pass and enforce the exact expected correlation tuple

Testing

  • ./.venv/bin/ruff check scripts/c2_coord_client.py scripts/cos_assignment_coordinator.py tests/test_c2_coord_client.py tests/test_cos_assignment_coordinator.py
  • python3 -m pytest -q tests/test_c2_coord_client.py tests/test_cos_assignment_coordinator.py tests/test_cos_dispatch_orchestrator.py tests/test_cos_worker_receipt_adapter.py tests/test_cos_bootstrap_supervisor.py

@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: 6ffe6ae42f

ℹ️ 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".

return response if isinstance(response, dict) else {}

def bca_correlation_tuple(self, envelope: dict[str, Any]) -> dict[str, Any]:
correlation = {field: envelope[field] for field in BCA_CORRELATION_FIELDS}

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 Derive correlation fields instead of indexing the envelope

Every real dispatch_task call passes json.loads(envelope.canonical_json()), but a DispatchEnvelope contains coord_session_id rather than session_id and has no payload_digest; the latter is computed only inside reserve_bca. Consequently this comprehension raises KeyError('session_id') after the edge dispatch and worker receipt have already occurred, so terminal readback never runs. Build the correlation tuple using the same session mapping and digest calculation as the reservation payload.

Useful? React with 👍 / 👎.

@CondorCommodore
CondorCommodore merged commit b7766c0 into main Aug 4, 2026
5 checks passed
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