Skip to main content

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.

ADRTitleStatus
0001inbound-receiving as the owner of the inbound dock workflowAccepted (2026-10-08); permissive defaults superseded by 0011
0002Aggregates and invariantsAccepted (2026-10-08); the DockAppointment aggregate amended by 0019
0003Local copies, consumed contracts and the handover to inventory-storageAccepted (2026-10-08); permissive mode superseded by 0011; third local copy added by 0019
0004CloudEvents envelope and type catalogueAccepted (2026-10-08); per-key ordering amended by 0007; the dockappointment types retired by 0019; their rows marked retired by 0022
0005MCP server adoption (read-only, unauthenticated, additive)Accepted (2026-10-08); in-memory fallback superseded by 0011
0006Analytics read side: analytics stream, projector and receiving performance report over a separate analytical databaseAccepted (2026-10-08)
0007Outbox relay attempt cap (OUTBOX_MAX_ATTEMPTS)Accepted (2026-10-12)
0008The analytics projector sets up telemetry; every backend Deployment sets ENVIRONMENTAccepted (2026-10-12)
0009The W3C trace context crosses the outbox to KafkaAccepted (2026-10-12)
0010Housekeeping sweeper for the append-only tablesAccepted (2026-10-12)
0011Postgres and Kafka are the only runtimeAccepted (2026-10-19); supersedes the in-memory, log and permissive statements of 0001, 0003 and 0005
0012Hierarchical ASN with SSCC cartons and carton-aware receivingAccepted - implemented (the ADR body still reads "Proposed (2026-10-23)"; see Status notes); additive, no existing contract changes meaning
0013Carton receiving amendments: no site, case scans count cases, local PackagingViewAccepted - implemented (the ADR body still reads "Proposed (2026-10-24)"; see Status notes); amends 0012
0014Carton discrepancies: CartonOverLimit, mixed-carton audit count, label dataAccepted - implemented (the ADR body still reads "Proposed (2026-10-24)"; see Status notes); extends 0012 and 0013
0015Carton discrepancies are part of the receipt read modelAccepted - implemented (the ADR body still reads "Proposed (2026-10-24)"; see Status notes); amends 0014
0016A2A inbound adapter (read-only, unauthenticated, additive)Accepted (2026-10-29)
0017Fleet 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
0018Agent authority levels and complete MCP surface (every tool/skill L1, stateless handler, receipt resource, receiving SOP prompt)Accepted (2026-11-02)
0019The 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
0020The appointment copy follows reschedules and door reassignments (DockAppointmentRescheduled, DockAppointmentDoorReassigned; open receipts keep their door)Accepted (2026-11-09); amends 0019
0021Dock-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
0022Stage 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
0023Receiving 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
0024GS1 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
0025ASN 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
0026Receiving 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
0027Idempotency replay classes: every problem type is FINAL, OUTCOME or RETRYABLE on its catalogue entry; a RETRYABLE refusal is not stored and its key is releasedAccepted (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/.

ADREvidence
0012PR #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.
0013Implemented 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.
0014PR #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).
0015PR #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.