Application use cases
The thirteen application services in internal/application/usecases, as they are
on develop: what triggers each one, what it takes, which invariants it
relies on, what it calls and which events it raises. The step-by-step
sequence diagrams are in sequence-diagrams.md; the
event payloads are in
ecosystem/integration.md.
Reads are not use cases here. GET /network-orders,
GET /network-orders/{networkRef}, GET /purchase-orders/{poNumber} (which
first resolves the number through the ports.PurchaseOrderIndex, ADR 0036),
GET /capability-offers and the MCP
tools read the repositories directly (internal/adapters/inbound/http/server.go,
internal/adapters/inbound/mcp/tools.go).
Triggers at a glance
| Use case | Trigger | Cadence / entry point | Wired in |
|---|---|---|---|
ReceiveNetworkDemand | poller (scheduler) | once at start, then every POLL_INTERVAL | cmd/netfulfil/main.go, internal/adapters/inbound/poller/poller.go |
ReconcileSubmittedOrders | ticker | every POLL_INTERVAL | cmd/netfulfil/workers.go |
SweepAcknowledgementDeadlines | ticker | every SWEEP_INTERVAL | cmd/netfulfil/workers.go |
RejectOverdueOrders | ticker | every SWEEP_INTERVAL (its own ticker) | cmd/netfulfil/workers.go |
SweepOrphanedHolds | ticker | every SWEEP_INTERVAL (its own ticker, the same interval as the two passes above); not started when ORPHAN_HOLD_SWEEP_ENABLED=false | cmd/netfulfil/workers.go (runSweepOrphanedHolds), built in cmd/netfulfil/wiring.go (wireOrphanHoldSweep) |
ConfirmNetworkOrderShipment | Kafka (primary) or REST (operator fallback) | a ShipmentConfirmed event on warehouse.outbound-shipping.events, in every mode; or POST /network-orders/{networkRef}/shipment-confirmation | internal/adapters/inbound/kafka/shipment_confirmed_consumer.go, cmd/netfulfil/outbound_shipping.go; internal/adapters/inbound/http/server.go |
DeferShipmentConfirmation | Kafka (fallback of the ShipmentConfirmed consumer) | a ShipmentConfirmed whose order is not ACKNOWLEDGED yet | internal/adapters/inbound/kafka/shipment_confirmed_consumer.go, cmd/netfulfil/outbound_shipping.go (wireDeferShipment) |
ConfirmPendingShipments | ticker | every POLL_INTERVAL, always | cmd/netfulfil/workers.go (runConfirmPending), built in cmd/netfulfil/wiring.go (wireConfirmPending) |
RecomputeCapabilityOffers | ticker | every RECOMPUTE_INTERVAL, always | cmd/netfulfil/capability.go |
DeclareNodeProfiles | worker | live mode only: once at start, then every NETWORK_PROFILE_INTERVAL (0 disables) | cmd/netfulfil/profile.go (wireNodeProfiles, startProfileWorker) |
FeedInventory | worker | live mode only: once at start, then every NETWORK_INVENTORY_INTERVAL (default 5m, 0 disables) | cmd/netfulfil/inventory_feed.go (wireInventoryFeed, startInventoryWorker) |
IntakeInboundShipments | ticker | live mode only: at once, then every INBOUND_INTAKE_INTERVAL (default 30s) | cmd/netfulfil/inbound.go (wireInboundLoop, tick) |
ReturnInboundReceipts | ticker | the same tick as the intake, run before it | cmd/netfulfil/inbound.go (tickReturn) |
Two use cases are driven by Kafka: ConfirmNetworkOrderShipment, by the
ShipmentConfirmed consumer, and DeferShipmentConfirmation, the same consumer's
fallback for an order that is not ACKNOWLEDGED yet. No use case is driven by MCP. Apart from that
consumer, netfulfil runs three more Kafka consumers, and none calls a use
case: two fill the process-path and path-capacity caches that
RecomputeCapabilityOffers and DeclareNodeProfiles read, and, in live mode only,
the receipt consumer writes inbound-receiving's receipt events into a local
projection that ReturnInboundReceipts reads (cmd/netfulfil/inbound.go).
The projector's consumer feeds the analytics store, not a use case.
How Save and Publish commit
Every use case that changes a NetworkOrder saves it and publishes its event
inside atomically(...) (unit_of_work.go). The unit
of work is one Postgres transaction (cmd/netfulfil/wiring.go) and the
publisher writes the outbox_events rows inside that same transaction
(ADR 0003, ADR 0025). Unit tests with fakes run the two calls back to back.
External calls (order-management, the network) are made outside that
scope, in a fixed order explained per use case below.
NetworkOrder lifecycle
Source: internal/domain/networkorder/network_order.go.
ReceiveNetworkDemand
receive_network_demand.go. Turns one unit of network demand into an
answered order.
- Input:
contract.InboundDemandfromNetworkGateway.PollDemand:networkRef,siteId,requiredShipBy,lines[](networkLineRef,networkProductId,quantity). - Steps:
- Idempotency: if an order with this
networkRefexists and is notNEW, or its window has closed, return it unchanged. Nothing is re-answered. An order stillNEWinside its window was recorded but never answered (order-management was down, or the process stopped after the save), so it resumes at step 5 instead (a lineless one is rejectedUNTRANSLATABLE_SKU). - Translate every line's
networkProductIdto a SKU throughProductTranslation. One unknown product rejects the whole order. - Untranslatable: build a lineless order (
ReceiveUntranslatable), save it withNetworkOrderReceived(lineCount: 0), then reject it withUNTRANSLATABLE_SKU(below). No order-management call. - Otherwise build the order (
Receive), save itNEWand publishNetworkOrderReceivedin one scope. FulfillmentPlanner.RaiseHeldOrder:POST /orderswithreleaseOnAllocation: false,allowPartialShipment: false,requiredShipByandIdempotency-Key: netful-raise-<networkRef>, so a retry replays the same order-management order. ApromiseDatemeans feasible,nullmeans not.- Record the hold:
NetworkOrder.RecordHold(id)andSave, right after the raise returns and before any decision (ADR 0024 §1). The order staysNEWbut now names its hold, so a failure from here on leaves something the cancel paths andSweepOrphanedHoldscan find. - Not feasible:
freeHold(DELETE /orders/{id}, then the hold outcomeCANCELLEDis set on the order),Reject, save and publishNetworkOrderRejected(INFEASIBLE_DEADLINE) in one scope, thenSubmitAcknowledgement(ref, false). - Feasible:
Submit(toSUBMITTED),LinkLocalOrder(id)(a no-op, the id is already recorded), save and publishNetworkOrderSubmittedin one scope, thenSubmitAcknowledgement(ref, true). The hold is not released here;ReconcileSubmittedOrdersdoes that once the network settles it.
- Idempotency: if an order with this
- Invariants (domain):
networkRefnot empty; at least one line (ErrNoLines) except for the untranslatable constructor; each line has a line ref, a product id and a positive quantity;acknowledgeByisreceivedAt + 24h(AcknowledgementWindow);SubmitandRejectonly fromNEW(ErrAlreadyAnswered); the hold is recorded only on aNEWorder (RecordHold,ErrAlreadyAnsweredotherwise), idempotent for the same id andErrLocalOrderAlreadyLinkedfor another;LinkLocalOrderonly fromSUBMITTEDon, also idempotent for the same id. - Events:
NetworkOrderReceived, then eitherNetworkOrderSubmittedorNetworkOrderRejected(UNTRANSLATABLE_SKUorINFEASIBLE_DEADLINE). - Failure: any error is returned to the poller, which logs
receive network demand failed, counts it in/inbound-statusfailedand keeps the watermark, so the unit is fetched again. An order savedNEWbefore step 5 failed is found on the next poll and resumed (step 1), as long as its window is open; the raise replays the same order. If the cancel in step 7 fails, the order staysNEWwith its hold recorded: the poller retries inside the window,RejectOverdueOrdersafter it, andSweepOrphanedHoldsafterORPHAN_HOLD_GRACE. A process stop between order-management committing the raise and step 6 is healed inside the window (the re-delivery replays the raise and records the id); only if the window closes first does nothing name the hold, see the runbook.
ReconcileSubmittedOrders
reconcile_submitted_orders.go. Settles orders left SUBMITTED (ADR 0001
§5): a successful submit call is only accepted-for-processing.
- Input: none; it lists
NetworkOrderRepo.ListSubmitted. - Per order:
NetworkGateway.SubmissionStatus(ref):SUCCESS:ConfirmAcknowledgement(toACKNOWLEDGED), save and publishNetworkOrderAcknowledged(v2) in one scope, thenPOST /orders/{localOrderId}/releases.FAILURE:freeHoldfirst (DELETE /orders/{localOrderId}, then the hold outcomeCANCELLEDis recorded), thenReject, save and publishNetworkOrderRejected(SUBMISSION_FAILED). The outcome is saved in the same write as the rejection; before ADR 0024 that write was refused by a database CHECK and the order stayedSUBMITTED.PENDINGor a lookup error: left for the next pass.
- Invariants:
ConfirmAcknowledgementonly fromSUBMITTED(ErrNotSubmitted);RejectfromNEWorSUBMITTED. - Events:
NetworkOrderAcknowledged(...NetworkOrderAcknowledged.v2) orNetworkOrderRejected. - Failure: a failure on one order skips it and the pass continues.
If the release call fails after the
ACKNOWLEDGEDcommit, the order is no longerSUBMITTEDand is not retried (see troubleshooting).
SweepAcknowledgementDeadlines
sweep_acknowledgement_deadlines.go. Reports orders whose 24 h window has
closed unanswered (ADR 0001 §6).
- Input: none; it lists
ListUnanswered(stateNEW, ordered byacknowledge_by). - Rule:
AcknowledgementOverdue(now): stateNEWandnowafteracknowledgeBy. - Effect: publishes
AcknowledgementDeadlineAtRiskfor each overdue order. It never changes the aggregate and has no unit of work, so with the outbox the event row is written on its own. - Events:
AcknowledgementDeadlineAtRisk, again on every pass while the order staysNEWand overdue. - Failure: a publish failure skips that order for this pass.
RejectOverdueOrders
reject_overdue_orders.go. The separate path that actually rejects an order
whose window closed. It never acknowledges late.
- Input: none; same
ListUnansweredlisting and the same overdue rule. - Per overdue order:
freeHold: cancel the recorded hold if it is still open (DELETE /orders/{id}) and record the outcomeCANCELLED, or skip the call when the order has no hold or the orphaned-hold sweep already settled it; thenReject, save and publishNetworkOrderRejected(ACKNOWLEDGEMENT_DEADLINE_MISSED) in one scope. - Events:
NetworkOrderRejected. - Failure: one failing order is skipped; the next pass retries it. Any
non-2xx answer to the cancel (a
404or a409/422included) is a failure here and the order is retried;SweepOrphanedHoldsclassifies those answers and, onceORPHAN_HOLD_GRACEhas passed, records the outcome so this use case can skip the cancel and reject. - Note from the code: since ADR 0024 the hold is recorded on the order when it
is raised, so the cancel branch now fires for an order that stayed
NEW. Before it, the id was written only fromSUBMITTEDon and this branch never found a hold to cancel.
SweepOrphanedHolds
sweep_orphaned_holds.go (ADR 0024, gap OM-0020). Frees an
order-management hold nobody decided. order-management has no timeout on a
held order, so the clock lives here; this is the backstop for
RejectOverdueOrders. Independent of the other two sweeps: none depends on
another having run.
-
Input: none; it lists
NetworkOrderRepo.ListOpenHolds(hold recorded, no outcome, stateNEWorREJECTED). -
Rule (domain,
NetworkOrder.HoldOrphaned(now, grace)): the hold is open, the state isNEWorREJECTED, andnowis strictly afteracknowledgeBy + grace.graceisORPHAN_HOLD_GRACE(default1h).SUBMITTED,ACKNOWLEDGEDandCONFIRMEDare never orphaned. -
Per orphaned hold:
FulfillmentPlanner.CancelHeldOrder(DELETE /orders/{id}) and classify order-management's answer (the planner turns the status into two sentinel errors ininternal/application/contract):Answer Meaning Action 2xx cancelled SettleHold(CANCELLED), save and publishOrphanedHoldCancelled(answerCANCELLED) in one scope404 ( ErrHeldOrderNotFound)the hold no longer exists the same, answerNOT_FOUND409 or 422 ( ErrHeldOrderAlreadyReleased)already released: not an orphan SettleHold(ALREADY_RELEASED), saved, no event, never retriedanything else (5xx, timeout, transport error, open breaker) unknown nothing recorded, counted failed, retried next pass -
Never: changes the order's state (
RejectOverdueOrdersowns that), or reads anything from order-management except the answer to the cancel. -
Events:
OrphanedHoldCancelled, once per freed hold. It is a reported fact, not a state transition. -
Metric:
network_fulfillment.orphaned_holds.sweptbyoutcome(cancelled,already_released,failed), throughports.OrphanHoldMetrics. -
Failure: one bad hold never aborts the pass; the pass result is
Examined,Cancelled,AlreadyReleased,Failed, logged as WARNorphaned holds sweptwhen any of the last three is non-zero. A failed save is retried safely because order-management's cancel is idempotent. With severalnetfulfilreplicas two can both cancel the same hold and both publish the event.
ConfirmNetworkOrderShipment
confirm_network_order_shipment.go. Two triggers reach one use case, so
neither can double-submit (ADR 0014 and its 2026-11-06 addendum):
- Event, primary, every mode:
ShipmentConfirmedConsumer(internal/adapters/inbound/kafka/shipment_confirmed_consumer.go) reads outbound-shipping'sShipmentConfirmedfromwarehouse.outbound-shipping.eventsunderOUTBOUND_SHIPPING_CONSUMER_GROUP(defaultnetwork-fulfillment-outbound-shipping). For eachorders[].order_idit finds theNetworkOrderbylocalOrderId(FindByLocalOrderId) and callsExecuteForShipment(ref, loadId, package_count). Anorder_idthat noNetworkOrdercarries (a local order raised from customer demand) is skipped and logged. - REST, operator fallback:
POST /network-orders/{networkRef}/shipment-confirmationcallsExecute(ref), which isExecuteForShipment(ref, ref, 1).
PackageManifested from fulfillment-execution is not consumed.
- Input: REST:
networkReffrom the path, no body. Event: the load id as the shipment reference and each order'spackage_count(apackage_countof 0 or an absent one means 1, thesinglePackageplaceholder of ADR 0026). - Steps (
ExecuteForShipment): load the order (404 network-order-not-foundon REST if absent); if the(shipment reference, order id)pair is already in theShipmentConfirmationLogor the order is alreadyCONFIRMED, return it (204on REST, no second event, no second network call);CheckConfirmable(the order must beACKNOWLEDGED);NetworkGateway.RequestLabelfor the package count;ConfirmShipment; then, in one scope, save, record the ledger row and publishNetworkOrderShipmentConfirmed; thenNetworkGateway.SubmitShipmentConfirmation. - Invariant:
ConfirmShipmentonly fromACKNOWLEDGED(ErrConfirmBeforeAcknowledge,409 confirm-before-acknowledgeon REST). - Events:
NetworkOrderShipmentConfirmed. - Failure: the label is requested first, so a label failure leaves the order
ACKNOWLEDGEDand the call retryable. If the gateway call fails after the commit the REST route answers500 internal-error; the order is alreadyCONFIRMED, so a retry returns204without calling the gateway again. On the event path a handler error is retried and then the message is dead-lettered towarehouse.outbound-shipping.events.dlqand committed past (handleWithDeadLetter); the REST route closes that gap.ErrConfirmBeforeAcknowledgeis the exception for an order that is stillSUBMITTED: the consumer callsDeferShipmentConfirmation(below) and commits with no dead letter. For aNEWorREJECTEDorder the error is retried and dead-lettered as above. A message that is not a CloudEvent or breaks outbound-shipping's contract is dead-lettered without retry.
DeferShipmentConfirmation
defer_shipment_confirmation.go (ADR 0014 addendum D7). A load can depart while its
order is still SUBMITTED, because the network has not settled the acknowledgement
(a 24 h window). The consumer calls this when ExecuteForShipment fails with
ErrConfirmBeforeAcknowledge, so the shipment is kept and not dead-lettered.
- Input: the
NetworkRefof the order, the shipment reference (the load id) and the package count (0 when the event carries none). - Steps: load the order fresh (
ErrOrderNotFoundif absent), callNoteShipmentBeforeAcknowledge, and save in one unit of work. The first shipment noted wins: the same shipment again, or a different one while one is pending, returns nil without writing (a different one is logged at Warn). A version conflict reloads and retries (withVersionRetry). - Invariant: only a
SUBMITTEDorder is deferred. Any other state returnsErrConfirmBeforeAcknowledge, so the consumer's retry-then-DLQ stays forNEWandREJECTED, and an order settledACKNOWLEDGEDin between is confirmed by the retry. - Events: none.
ConfirmPendingShipments
confirm_pending_shipments.go (ADR 0014 addendum D7). Settles the shipments recorded
by DeferShipmentConfirmation. runConfirmPending runs it every POLL_INTERVAL,
always on (no flag, no variable), next to runReconcile.
- Input: none. It lists up to 100 orders (
ListPendingShipments: those no longerSUBMITTEDfirst, then the oldest noted first). - Steps, per order:
ACKNOWLEDGEDcallsExecuteForShipmentwith the noted shipment reference and package count (the same path, ledger and event as the consumer and the REST route);SUBMITTEDis skipped and keeps its shipment;CONFIRMEDorREJECTEDhas the shipment dropped (DropPendingShipment) and saved. - Result:
ConfirmPendingShipmentsResultcountsExamined,Confirmed,DroppedandFailed. One order's failure is logged and counted and never aborts the pass; the order is tried again on the next tick. - Events:
NetworkOrderShipmentConfirmed, throughExecuteForShipment, once per order.
RecomputeCapabilityOffers
recompute_capability_offers.go (ADR 0001 §8, ADR 0017). Computes what this
context would advertise per SKU at SITE_ID. Always on.
- Input: none; the SKU list is
ProductTranslation.KnownSKUs(every SKU the dictionary maps to). - Per SKU:
physicalAvailable= inventory-storageGET /inventory/{sku}/usable.throughputFeasible= the sum ofRemainingCapacity(pathId, cutoffAt)over the paths eligible for the site's next feasible cutoff (ProcessPathCapability.NextCutoff), counting only paths whose capacity is known. A path is eligible only if itsCycleTimeP95fits the time left to the cutoff; unknown or zero cycle time stays eligible. No schedule, or no known capacity, means "unknown". When every path is ruled out by cycle time for the next cutoff, the pass walks to the following cutoff, and on, up to 7 days ahead (ADR 0031); only no feasible cutoff inside that bound is a proven zero. Resolved once per pass, not per SKU.capabilityoffer.Compute:advertisedQuantity = min(physical, throughputFeasible)with basisTHROUGHPUT_CONSTRAINEDwhen throughput is known and lower, elsephysicalwith basisPHYSICAL.CapabilityOfferRepo.Save(upsert per(sku, siteId)).
- Invariants (
capability_offer.go): SKU and site not empty, quantity not negative, advertised never above physical, basis one of the two. - Events: none. The offer is not sent to the network by this use case: the inventory feed (FeedInventory) reads the persisted offers.
- Failure: an inventory, compute or save error is logged and that SKU is skipped; the pass continues.
DeclareNodeProfiles
declare_node_profiles.go and profile_derivation.go (ADR 0027 part 1). Declares,
per site, how the building operates, so that the network can show it and judge our
acknowledgement deadlines by it. Live mode only; the stub never starts the worker.
- Input: none; the sites are the ones the live gateway converges onto nodes
(
SITE_IDplus the node file's). - Per site: the whole weekly schedule from
ProcessPathCapability.Schedule(cutoffs that share a local time are one cutoff, with their days united);HandlingTime= the longest known, positiveCycleTimeP95among the paths eligible for any cutoff that fits the longest gap of the schedule, rounded UP to whole minutes; each cutoff'sMaxOrders= the sum ofRemainingCapacityover the paths eligible for its next occurrence whose figure is known (0 = unknown), and never below what was last declared for the same slot (ProfileHistory);ThroughputPerDay= the sum of the known ceilings of the busiest weekday. - Never guessed: no schedule (
skipped_no_schedule), no usable cycle time or no capacity figure (skipped_incomplete) is a loggedWARNand nothing is declared. A site with no node yet (contract.ErrSiteNotRegistered) is askipped_no_node, not a failure. - Calls:
NetworkGateway.DeclareNodeProfile, which owns the revision: it only bumps it when theFingerprint(a hash of the content, independent of the order the caches list it in) changed, persists it before the HTTP call, and reconciles the transaction by its persisted id. - Events: none. Metrics:
network_fulfillment.node_profile.declarationsand.revision(observability). - Failure: one site's failure is logged and never stops the others; a
cancelled context stops the pass before the next site; a memory that cannot be
read (
LastDeclared) means the site is left for the next pass rather than declared with a ceiling that might be lowered.
FeedInventory
feed_inventory.go and feed_plan.go (ADR 0027 part 2). Tells the network, per site,
what the site claims it can ship. Live mode only; the stub never starts the worker.
Reads local data only: the persisted CapabilityOffers and the product dictionary.
- Input: none; the sites are the ones the live gateway converges onto nodes
(
SITE_IDplus the node file's). - Per site (
planInventoryFeeds, pure): the site's pass is the set of its offers sharing the newestComputedAt, which is the feed'sAsOf; an offer of an earlier pass is not fresh and is not fed. Only a SKU the site has a listing for (FeedCatalogue.ListedSKUs) is a line (advertisedQuantity,basis; an unknown figure is never an offer). The feed isCompleteonly when every listed SKU has a fresh offer and it fits in one part; abovecontract.MaxFeedLines(5000) it is split into partial parts with the sameAsOf. The fingerprint hashes the complete flag and the lines, not the moment. - Unlisted SKUs: an offer for a SKU with no listing at the site is expected, not an
error: it is not fed and is logged once per process at
INFO. - Calls:
NetworkGateway.SubmitInventoryFeed, which owns delivery: it sends a feed when its fingerprint changed, repeats an unchanged one at most hourly, keeps out of the feed a listing the network refused as not on the node, and reconciles the transaction by its persisted id. - Outcomes (
contract.FeedOutcome):sent,confirmed,pending,unchanged,failed,skipped_no_node(contract.ErrSiteNotRegistered),skipped_no_offers,skipped_no_listings. - Events: none. Metrics: none; logs only (runbook).
- Failure: one site's failure is logged and never stops the others; a cancelled context stops the pass before the next site; offers that cannot be read fail every site for this pass and the next one retries.
IntakeInboundShipments
intake_inbound_shipments.go (ADR 0028). The first half of the inbound loop: it
learns which seller shipments are on their way to our sites and registers an ASN
for each in inbound-receiving. Live mode only; a stub deployment runs no inbound
loop.
- Input: none; the sites are
SITE_IDplus the node file's (networkSites,cmd/netfulfil/inbound.go). - Per site: read the poll cursor,
NetworkGateway.PollInboundShipments(site, cursor), record each shipment (Shipments.Record, with the ASN numberAsnNumberFor(ref):NF-<ref>, orNF-and a hash of the reference when it has characters an ASN number does not allow) and advance the cursor to the newestShippedAt. If a record fails the cursor stays and the next poll returns the shipment again. - Then: for the due shipments (batch of 100)
BuildAsnresolves every GTIN to a SKU through product-master (a GTIN that is not an each GTIN is a data error) andAsnRegistrar.RegisterAsnregisters the ASN in inbound-receiving. - Outcomes: registered;
PENDINGand retried with a backoff of one minute doubling up to one hour (IntakeBackoff), for a GTIN product-master does not know, an SKU inbound-receiving has not caught up with or a transport failure;REJECTED, logged atERRORand never retried, for a data error or an ASN inbound-receiving refuses outright. - Events: none. Failure: one shipment's failure is recorded on its row and never stops the others; the pass returns the errors that could not be recorded.
ReturnInboundReceipts
return_inbound_receipts.go (ADR 0028). The second half of the inbound loop: when
inbound-receiving closes the receipt of an ASN this service registered, it reports
what the dock found to the network, once per shipment. Live mode only.
- Input: none; it lists the due receipts from the local projection
(
ReceiptProjection.DueReceipts) that the receipt consumer fills fromwarehouse.inbound-receiving.events(ReceiptCartonReceived,CartonDiscrepancyRaised,ReceiptClosed). It never calls inbound-receiving. - Per receipt:
BuildReceiptgives each manifest carton the statusRECEIVED,DAMAGEDorMISSING, addsUNEXPECTEDcartons seen at the dock, and turns the other findings into compliance codes; thenNetworkGateway.SubmitInboundReceipt. - Outcomes: sent; retried with the same backoff as the intake; or parked at
ERRORand never retried when the network refuses it (ErrReceiptRefused) or the receipt names no carton. - Events: none. Failure: one receipt's failure never stops the others.