receipts: assemble im_deliveries at the read edge, not in core's receipt #46

Merged
PerishFire merged 1 commit from protocol-receipt-deliveries into main 2026-07-21 08:14:46 +00:00
Owner

Edge 2 of the downstream split, prerequisite for im's own database. The receipt's im_deliveries was santi embedding a downstream's data via a cross-context join (im_inbox x receipt_transitions) that can't survive im moving to a separate db. The receipt builder now leaves im_deliveries empty; the im projection moves to a standalone im_deliveries_for_receipt method; the api receipt handler merges the two. ReceiptStatus type/route/handler/OpenAPI untouched -> wire byte-identical, only the assembly point moves core->read-edge. Isolates the last santi->im read to one method. 0 faults, core 0, 48 test groups green.

Edge 2 of the downstream split, prerequisite for im's own database. The receipt's im_deliveries was santi embedding a downstream's data via a cross-context join (im_inbox x receipt_transitions) that can't survive im moving to a separate db. The receipt builder now leaves im_deliveries empty; the im projection moves to a standalone im_deliveries_for_receipt method; the api receipt handler merges the two. ReceiptStatus type/route/handler/OpenAPI untouched -> wire byte-identical, only the assembly point moves core->read-edge. Isolates the last santi->im read to one method. 0 faults, core 0, 48 test groups green.
receipts: assemble im_deliveries at the read edge, not in core's receipt
All checks were successful
guard / guard (pull_request) Successful in 5m35s
b89a3707a3
Edge 2 of the downstream split, and a prerequisite for giving im its own
database. The receipt's im_deliveries field is santi embedding a downstream's
data: store::receipt_status built it by joining im_inbox against santi's
receipt_transitions in one query. That cross-context join cannot survive im
moving to a separate database.

So the receipt builder now leaves im_deliveries empty and the im projection
moves to a standalone im_deliveries_for_receipt method; the api receipt handler
composes the wire response by merging the two. The ReceiptStatus type, route,
handler signature, and OpenAPI are untouched, so the wire contract stays
byte-identical -- only the assembly point moves from core to the read edge.
This isolates the one remaining santi->im read (deliveries_for_receipt_in) to a
single method, which is what will point at im's own db under the split.

0 faults, core debt 0, 48 workspace test groups green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PerishFire deleted branch protocol-receipt-deliveries 2026-07-21 08:14:46 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PerishFire/santi!46
No description provided.