Delivery Promise
Derived from network/model/model.yaml. This context's service is built; the model carries its as-built contracts, and identifiers (Err... names, routes, CloudEvents types) are the names the service uses. It also has an analytics read side (delivery-promise ADR 0018): cmd/dp-projector projects this context's own topics into a separate analytical database, and cmd/dp-reports serves the read-only /reports/... routes on :8092. Wave 1 added four promise-quality capabilities (ADR 0020 to ADR 0023): a calibrated quote buffer with an optional confidence, a sweep that flags a promise AT_RISK with reason PREDICTED_LATE, a fast-tier candidate filter fed by NodeTierEligibilityChanged, and an optional capacityBand on offers. The pages below predate them; the model and the contract copies are authoritative.
Delivery Promise (delivery-promise, code DP, tier commerce) tells a
shopper, before and at purchase, the date a package will arrive, and makes that
date true by construction. A delivery offer is quoted only when a feasible
witness path exists now: an ACTIVE fulfillment node with the item, a
pickup cutoff the node can still make, scheduled departures with room, and a
delivery wave at the destination's delivery station. A promise holds
capacity on the node's pickup cutoff (the PromiseBook) until the order is
placed or the hold expires. When the path breaks, the context re-promises to a
later window, never an earlier one. At delivery it judges every promise
kept or broken, including every promise that shares the delivered package's
tracking number. Besides the four classic tiers it can quote the opt-in
CONSOLIDATED tier for a delivery day the shopper chooses. It owns three aggregates (DeliveryOffer, Promise,
PromiseBook), its event-fed read models (plus one local read model fed by its own judgements) and its policies. It makes no
synchronous call to any other context: every input of the promise hot path is
a local read model fed by events.
This context's pages
| Page | What it holds | ddd-crew tool it follows |
|---|---|---|
| Business Context | The business problem, actors, decisions, the real fulfillment networks and what is out of scope | — (narrative) |
| Ubiquitous Language | Every term of this context and the neighbour terms it uses | Bounded Context Canvas (UL section, expanded) |
| Core Domain Chart | Why this is the Core domain | Core Domain Charts |
| Bounded Context Canvas | Purpose, classification, roles, inbound and outbound messages, decisions, metrics, open questions | Bounded Context Canvas v5 |
| Context Map | Every upstream and downstream neighbour, with pattern and channel | Context Mapping |
| Aggregate Design Canvas | DeliveryOffer, Promise, PromiseBook and the read models | Aggregate Design Canvas v1.1 |
| Domain Events | The published and consumed events, with a full CloudEvents envelope | — (CloudEvents catalogue) |
| Domain Message Flow | Quote, checkout, re-promise and judgement scenarios | Domain Message Flow Modelling |
| EventStorming | Process-level boards with hotspots | EventStorming glossary & cheat sheet |
| Use Cases | One section per command use case, with errors and idempotency | — (application layer) |
| Class Diagram | The proposed domain model and the hexagonal ports and adapters | — (UML) |
| Entity Relationship | The proposed Postgres schema | — (UML / ER) |
| Sequence Diagrams | Adapter → use case → aggregate → outbox for every command | — (UML) |
Service and operations
- Service:
IQVO/delivery-promiseondevelop(806d835, 2026-10-26): binariescmd/api(REST) andcmd/mcp(read-only MCP), and the console remote inweb/. - Deployment: wired in warehouse-infra develop: a
terraform/apps.yamlentry (database: true,frontend_remote: delivery_promise_mfe) andhelm-values/delivery-promise.yaml(MCP enabled, gateway path/api/mcp/delivery-promise). The cluster itself was not checked in this refresh. - Observability: service ADR 0009,
Adopt the fleet observability standard, Accepted 2026-10-26. Logs, metrics and traces leave
over OTLP to the otel-collector (
OTEL_EXPORTER_OTLP_ENDPOINT, chart defaultotel-collector.observability.svc.cluster.local:4317;OTEL_SERVICE_NAME). The Tier-2 business counter ispromising.promises.made(unit{promise}, ininternal/adapters/outbound/telemetry/promise_metrics.go), with attributeoutcome=madeorrefusedandreasonon the outcomes that are not a success. The dashboard queries it aspromising_promises_made_totalin warehouse-infra'sterraform/dashboards/contexts/delivery-promise.json, byoutcome.
Elsewhere
- Read-only MCP server (service ADR 0007):
cmd/mcp, a second binary serving Streamable HTTP on:8090with no auth; it sources this context's own reads and nothing that writes. Five tools:get_current_policy,get_delivery_offer,get_promise,list_promise_books,list_promises_by_order. The gateway (Kong) exposes it at/api/mcp/delivery-promise, rewritten to the server's/mcpmount. - Console remote (service ADR 0008):
web/, a Vite + React Module Federation remote — federation containerdelivery_promise_mfe, gateway mount/mfes/delivery-promise/, dev/preview port4013— read-only screens over the existing REST reads, calling only this context's API. - The worked promise example (one cart, one destination, every step of the search with numbers) lives in the promise model. This pack links to it rather than repeating it.
- Decisions this context rests on: ADR 0002: promise and assignment are separate, ADR 0003: declared and measured capability, ADR 0008: capacity held at promise time, ADR 0007: CloudEvents namespace.
- The REST contract (as built, from the service repository):
apis/delivery-promise/openapi.yaml, rendered under the API reference. - Where this context sits among the twelve: the domain context map and the core domain chart.