Bounded context canvas
Following the ddd-crew Bounded Context Canvas v5,
filled in from the code of develop.
1. Name
Node Performance (node-performance, module github.com/claudioed/node-performance).
2. Purpose
Measure every node of the retail network against what was asked of it, over rolling 7-day and 30-day windows, from observed facts only, and publish a grade. It keeps the network honest about what a vendor declared: the declaration is what the vendor says, the scorecard is what the network observes (Declared vs Measured).
3. Strategic classification
| Dimension | Value |
|---|---|
| Domain | Supporting (Performance Management), see Core domain chart |
| Business model | Risk reducer |
| Evolution | Custom-built |
| Tier / area | partner, retail network |
4. Domain roles
- Execution context: it computes the grades itself (recompute) and analysis context for the
other contexts, which read the result. Vendors see their own scorecard only through
vendor-connectivity. - It is not a decision context for promises or sourcing: it grades, and
delivery-promise,order-sourcingand people decide. The one decision it takes itself is the fast-tier eligibility flag of a node (FastTierEligibility, ADR 0013), whichdelivery-promisethen applies.
5. Inbound communication
| Message | Kind | From | Collaboration pattern |
|---|---|---|---|
PurchaseOrderIssued, PurchaseOrderAccepted, PurchaseOrderRejected, PurchaseOrderExpired, VendorShipmentConfirmed, InboundReceiptSubmitted, VendorOnboarded, SubmissionProcessed | events | vendor-connectivity | Conformist |
PackageHandedOver | event | shipping-and-tracking | Conformist |
PromiseKept, PromiseBroken | events | delivery-promise | Conformist |
InventoryFeedApplied | event | offer-availability | Conformist |
NodeRegistered, NodeOperationalProfileDeclared | events (no effect) | node-topology | Conformist |
InboundShipmentShipped | event | seller-inbound | Conformist |
GetScorecard (GET /scorecards/{nodeId}) | query | vendor-connectivity | Customer/Supplier, this context is the Supplier |
get_scorecard, list_scorecards_by_grade | MCP queries | agents | Open host, read-only |
node_performance, nodes_by_grade | A2A skills | agents | Open host, read-only |
6. Outbound communication
| Message | Kind | To | Channel |
|---|---|---|---|
NodeScorecardUpdated | event | delivery-promise, order-sourcing | Kafka retailnetwork.node-performance.events |
NodeTierEligibilityChanged | event (two per flip, one per tier) | delivery-promise | Kafka retailnetwork.node-performance.events |
NodeThresholdBreached | event | analytics (no in-organization consumer) | Kafka retailnetwork.node-performance.analytics |
No command and no query leaves the context: it calls no sibling.
7. Ubiquitous language
Scorecard, Window, Observation, Grade, On-time handover rate, Late ack rate, Provisional, Threshold breach, Fast-tier eligibility, Reinstatement streak, Declared vs Measured; see Ubiquitous language.
8. Business decisions
- A scorecard is computed only from observed facts, never from the vendor's declaration.
- A node with fewer than 50 observations in the window is
PROVISIONAL, notA. - Grades are
AtoDby the grading bars over on-time handover, promise-kept and late-ack rates. - A metric that crosses its bound downward between two graded states raises
NodeThresholdBreached. - Only node-attributable broken promises (
LATE,LATE_HANDOVER,VENDOR_REJECT,ACK_EXPIRED) count against the node;LOSTandRETURNEDdo not. - An acknowledgement in the last tenth of its ack window is late; an expired order is always late.
- A
GRADED7d scorecard with an on-time handover rate below 0.90 suspends the node from theSAME_DAYandNEXT_DAYtiers; 0.95 or more on three consecutive distinct UTC days of recompute reinstates it (FastTierEligibility, ADR 0013). A flip is published asNodeTierEligibilityChanged, one event per tier. APROVISIONALresult changes nothing. - This context never changes a node's status in
node-topologyand never changes a promise: it publishes the flag, anddelivery-promisedrops an ineligible node from the candidates of future quotes and estimates only (itsapis/asyncapi.yaml).
9. Assumptions
The numbered assumptions A1 to A23 live in
ADR 0002 and
ADR 0003; the ones that shape behaviour: the
first observation creates both scorecards (A1), a metric with an empty denominator reports its best
value (A5), the instant of a fact is the fact's own timestamp, not the envelope's (A3), the boundary
instant of requiredShipBy is on time, and the read routes take no Idempotency-Key (A21).
10. Verification metrics
| Metric | Where |
|---|---|
nodeperformance.scorecards.recomputed by outcome and reason | Observability |
| Unpublished outbox rows, attempts, consumer lag, DLQ traffic | SQL and Kafka tooling, see the Runbook |
Dashboard warehouse-node-performance and the Kong SLO alerts | warehouse-infra |
| Coverage 90%, mutation efficacy 95 (measured 100) | Testing |
11. Open questions and discrepancies
VendorOnboarded,SubmissionProcessed,NodeRegisteredandNodeOperationalProfileDeclaredare consumed with no effect (inbox row only). The declared profile never enters a metric, so there is no "declared next to measured" read model.- The informational inbound metrics are on REST reads but not on MCP, A2A or the event.
- Inbound accuracy mixes node and seller causes until they are separated (model gap G52).