feat: correlate bca terminal readback to exact receipt tuple - #60
Conversation
There was a problem hiding this comment.
💡 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} |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
Testing