Architecture decision records
Each status below is copied from the ADR body's own ## Status line, which is
the authority; ADR bodies are never edited after acceptance. The one exception
is ADRs 0012 to 0015: their bodies still read "Proposed" although they are built,
so the column records the real status and the Status notes
below give the evidence.
| ADR | Title | Status |
|---|---|---|
| 0001 | inbound-receiving as the owner of the inbound dock workflow | Accepted (2026-10-08); permissive defaults superseded by 0011 |
| 0002 | Aggregates and invariants | Accepted (2026-10-08); the DockAppointment aggregate amended by 0019 |
| 0003 | Local copies, consumed contracts and the handover to inventory-storage | Accepted (2026-10-08); permissive mode superseded by 0011; third local copy added by 0019 |
| 0004 | CloudEvents envelope and type catalogue | Accepted (2026-10-08); per-key ordering amended by 0007; the dockappointment types retired by 0019; their rows marked retired by 0022 |
| 0005 | MCP server adoption (read-only, unauthenticated, additive) | Accepted (2026-10-08); in-memory fallback superseded by 0011 |
| 0006 | Analytics read side: analytics stream, projector and receiving performance report over a separate analytical database | Accepted (2026-10-08) |
| 0007 | Outbox relay attempt cap (OUTBOX_MAX_ATTEMPTS) | Accepted (2026-10-12) |
| 0008 | The analytics projector sets up telemetry; every backend Deployment sets ENVIRONMENT | Accepted (2026-10-12) |
| 0009 | The W3C trace context crosses the outbox to Kafka | Accepted (2026-10-12) |
| 0010 | Housekeeping sweeper for the append-only tables | Accepted (2026-10-12) |
| 0011 | Postgres and Kafka are the only runtime | Accepted (2026-10-19); supersedes the in-memory, log and permissive statements of 0001, 0003 and 0005 |
| 0012 | Hierarchical ASN with SSCC cartons and carton-aware receiving | Accepted - implemented (the ADR body still reads "Proposed (2026-10-23)"; see Status notes); additive, no existing contract changes meaning |
| 0013 | Carton receiving amendments: no site, case scans count cases, local PackagingView | Accepted - implemented (the ADR body still reads "Proposed (2026-10-24)"; see Status notes); amends 0012 |
| 0014 | Carton discrepancies: CartonOverLimit, mixed-carton audit count, label data | Accepted - implemented (the ADR body still reads "Proposed (2026-10-24)"; see Status notes); extends 0012 and 0013 |
| 0015 | Carton discrepancies are part of the receipt read model | Accepted - implemented (the ADR body still reads "Proposed (2026-10-24)"; see Status notes); amends 0014 |
| 0016 | A2A inbound adapter (read-only, unauthenticated, additive) | Accepted (2026-10-29) |
| 0017 | Fleet REST API guideline cutover (noun routes, keyed POSTs, 409 reuse, keyset paging) | Accepted (2026-11-01); decision 2's replay of stored refusals narrowed by 0027 |
| 0018 | Agent authority levels and complete MCP surface (every tool/skill L1, stateless handler, receipt resource, receiving SOP prompt) | Accepted (2026-11-02) |
| 0019 | The DockAppointment moves to dock-scheduling (410 appointment-moved, local copy fed by dock-scheduling events, republish-appointments backfill) | Accepted (2026-11-05); amends 0002, 0003, 0004; point 2 amended by 0020; point 5 and Rollout step 4 amended by 0022 |
| 0020 | The appointment copy follows reschedules and door reassignments (DockAppointmentRescheduled, DockAppointmentDoorReassigned; open receipts keep their door) | Accepted (2026-11-09); amends 0019 |
| 0021 | Dock-to-stock KPI from yard arrival and inventory stow facts (VisitCheckedIn and ContainerStowed local copies, ReceiptStowCompleted, report fields) | Accepted (2026-11-09); extends 0003, 0006, 0019 |
| 0022 | Stage E removes the backfill command, the legacy encoders and Replay (the four dockappointment types retired from the contract; the deprecated GETs and 410 routes stay) | Accepted (2026-11-10); amends 0019, 0004 |
| 0023 | Receiving advice at close with the standard discrepancy vocabulary (ReceivingAdviceIssued, W13 and CBV codes, IncorrectProduct and Hold, advice SLA and ReceivingAdviceOverdue) | Accepted (2026-11-10); extends 0004, 0010, 0012, 0014, 0021 |
| 0024 | GS1 logistic-label receiving: validation at the scan (LabelNonCompliant), the destination rule (WrongDestination, RECEIVING_SITE_GLNS), earliest best-before on mixed pallets, receiver-assigned SSCC (AssignSscc, RECEIVER_GS1_COMPANY_PREFIX) | Accepted (2026-11-10); extends 0004, 0012, 0013, 0014, 0023 |
| 0025 | ASN timeliness from the visit-arrival copy (AsnLateForArrival at OpenReceipt, registered_at, the per-supplier asn_timeliness report block) and flat S-O-I ASN receiving by content-GTIN scan (MissingContentGtin) | Accepted (2026-11-11); extends 0004, 0021, 0012, 0014, 0023, 0024 |
| 0026 | Receiving tolerance policy: ReceivingPolicy at (owner, supplier) grain, auto-accept within band, override with reason between band and hard stop, 409 above (ReceivingPolicyDeclared, OverTolerance/UnderTolerance, the tolerance report block) | Accepted (2026-11-13); extends 0002, 0004, 0017, 0023, 0025 |
| 0027 | Idempotency replay classes: every problem type is FINAL, OUTCOME or RETRYABLE on its catalogue entry; a RETRYABLE refusal is not stored and its key is released | Accepted (2026-11-19); narrows 0017 |
Status notes
ADRs 0012 to 0015 were never re-statused after they were built. Their bodies are
immutable, so the status is recorded here: Accepted - implemented, checked
against origin/develop on 2026-11-13. Paths are under internal/adapters/outbound/postgres/migrations/.
| ADR | Evidence |
|---|---|
| 0012 | PR #56 (the ADR) and PR #57 feature/carton-receiving (the implementation), both merged 2026-10-24. Migration 0003_cartons_and_packaging.up.sql (asn_cartons, asn_carton_contents, receipt_cartons). apis/openapi.yaml: registerAsn (cartons on the ASN), getAsnCartons (GET /asns/{asnNumber}/cartons), receiveScan (POST /receipts/{receiptId}/scans). apis/asyncapi.yaml: ReceiptCartonReceived. |
| 0013 | Implemented with PR #57. Migration 0003_cartons_and_packaging.up.sql (pack_levels, the local PackagingView; internal/adapters/outbound/postgres/packaging.go). apis/openapi.yaml: receiveScan with the SSCC, CASE_GTIN and EACH_GTIN scan kinds. |
| 0014 | PR #58 feature/carton-discrepancies, merged 2026-10-24. apis/openapi.yaml: CartonDiscrepancyKind (includes CartonOverLimit and MixedCartonContentMismatch), countedContents on a scan, getCartonLabel (GET /receipts/{receiptId}/cartons/{lpn}/label). apis/asyncapi.yaml: CartonDiscrepancyRaised. Chart and env: CARTON_MAX_GROSS_WEIGHT_G, CARTON_MAX_LONGEST_SIDE_MM (charts/inbound-receiving/templates/configmap.yaml). |
| 0015 | PR #60 feature/receipt-carton-discrepancies, merged 2026-10-24. Migration 0004_receipt_carton_discrepancies.up.sql (receipt_carton_discrepancies). apis/openapi.yaml: getReceipt (GET /receipts/{receiptId}) returns cartonDiscrepancies (ReceiptCartonDiscrepancy). |
ADR 0017 (fleet REST API guideline cutover) is not covered by this note.