Skip to content

Public-safe OrderReadPort for the storefront confirmation (ADR 0026) - #6

Merged
DanMat merged 1 commit into
mainfrom
feat/order-read-port
Sep 3, 2026
Merged

DanMat merged 1 commit into
mainfrom
feat/order-read-port

Conversation

@DanMat

@DanMat DanMat commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

A read counterpart to CartPort so a storefront can render an itemised order confirmation without touching Commerce's tables or its PII.

  • OrderReadPort::get(ref) → an allow-listed projection: reference, status, total, placed_at, lines[{sku_code, qty, unit_price, line_total}].
  • OrderReadAdapter builds it field-by-field over OrderBook::get and never spreads the raw row — so customer_email, internal ids, and stock location can't leak, and a future column can't auto-leak onto a public page.
  • Provided via services() (ADR 0019).

Reviewed via both skills, security-green. Test asserts the projection carries no customer_email/id/location and computes line_total.

Consumed by the storefront confirmation + Aurora receipt (separate PRs).

🤖 Generated with Claude Code

…0026)

Add a read counterpart to CartPort so a storefront can render an itemised order
confirmation without touching Commerce's tables or its PII. `OrderReadPort::get(ref)`
returns an ALLOW-LISTED projection — reference, status, total, placed_at, and lines
{sku_code, qty, unit_price, line_total} — built field-by-field by OrderReadAdapter
over OrderBook::get. It deliberately DROPS customer_email, internal ids, and stock
location: never spreads the raw row, so a future commerce_order column can't leak
onto a public page. Provided via services() (ADR 0019).

Reviewed via both skills (platform + security), security-green. Test asserts the
projection carries no customer_email / id / location and computes line_total.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@DanMat
DanMat merged commit 0a13a51 into main Sep 3, 2026
2 checks passed
@DanMat
DanMat deleted the feat/order-read-port branch September 3, 2026 17:35
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