warehouse-systems fleet · executive briefing

node-performance

Grades every network node on keeping its word, so fast delivery goes to reliable ones
seven capabilitys3 events out · 15 in13 recorded decisions

This project is a domain-driven design study. It is not associated with, endorsed by or affiliated with any company, and it uses no company's code, data, logos or trademarks. All names, figures and examples are illustrative or synthetic. · November 2026

the short version · read this if nothing else

Node Performance turns observed facts into A-D grades that decide who earns same-day and next-day delivery

1

It grades only from observed facts, so a node cannot talk its way into a better score.

2

Its 7-day grade flips fast-tier eligibility, a real lever on delivery speed.

3

Telemetry and gates are on the fleet standard, but alerts dead-end and thresholds can't be tuned.

The ask

Name an owner and consumer for threshold alerts, and validate the tier thresholds before they gate more fast tiers.

why it exists

Fast delivery should go only to nodes that keep their promises

Node Performance measures every node in the retail network against what it declared and what was asked of it — acknowledgement latency, rejections, on-time handover against requiredShipBy, promise-kept rate and inventory feed freshness…

Today

It listens to six producer contexts, keeps 7-day and 30-day scorecards per node, and its grades already gate the fast tiers.

The catch

Its threshold alerts reach no consumer, and the hard-coded 0.90 and 0.95 tier rules were never checked against real volume.

what it does

It turns facts from six producers into a grade and a fast-tier gate

Ingest network facts

Takes in facts from six producers once each, so duplicates never skew a grade.

Rolling scorecards

Keeps a 7-day and a 30-day scorecard per node, recomputed on a schedule.

A-D node grades

Grades handover, rejections and promises kept; thin data stays provisional.

Inbound insight

Shows how timely and accurate inbound receipts are, without grading on them.

Threshold alerts

Raises an alert when a node's metric drops below its threshold.

Fast-tier gate

Turns fast tiers off below 0.90 on-time handover and back on at 0.95 on three days.

who it talks to

Six contexts feed it, two build on what it publishes

LISTENS TO · 15 EVENT TYPESIS HEARD BY · 2 CONTEXTSvendor-connectivity8delivery-promise2node-topology2offer-availability1seller-inbound1shipping-and-tracking1delivery-promise2order-sourcing1nodeperformancebadge = event types on that edge · derived from the CloudEvents types each repo declares
the shared language

A scorecard, a rolling window and a grade are the whole vocabulary

THE LANGUAGEOF THE DOMAINNodeScorecardObservationRollingWindowScorecardGradePROVISIONAL stateFastTierEligibilityAlertThresholdInboundTimeliness
REST2 operations over 2 paths on :8080
MCPMCP server (cmd/mcp, :8090, Streamable HTTP…
A2AA2A agent (cmd/a2a, :8093, JSON-RPC at / and /a2a…
how it is built

One process does the scoring; MCP and A2A only read the results

DRIVERS · INBOUNDOUTBOUND · ADAPTERSREST API :80802 operations over 2 pathsMCP tools :8090MCP server (cmd/mcp, :8090…Kafka consumer · 15 eventsVendorOnboardedPurchaseOrderIssuedDOMAIN CORENodeScorecardObservationRollingWindowScorecardGradePostgreSQLPostgreSQL onlyKafka producer · 3 eventsNodeScorecardUpdatedNodeTierEligibilityChangedTransactional outboxrelay · DLQ on x-dlq-*commands inevents inevents outstorage / infra
event traffic · CloudEvents 1.0 on Kafka

Fifteen event types come in and three go out: scores, flips, alerts

CONSUMED · BY SOURCE · 15PUBLISHED · BY ENTITY · 3vendor-connectivity 8delivery-promise 2node-topology 2offer-availability 1seller-inbound 1shipping-and-tracking 13 scorecard
how we know it is healthy

Traces, metrics and a 90% coverage gate tell us scoring is sound

Fleet observability standard (ADR 0010): OpenTelemetry OTLP/gRPC export to the in-cluster Collector (Jaeger + Prometheus behind it), never blocking…

What we watch

  • Trace continues across Kafka in the traceparent header of each published event and is picked up by consumers
  • Business counter nodeperformance.scorecards.recomputed with outcome/reason attributes
  • HTTP request duration histogram plus one server span and request-log line per call sharing a trace id

What stops a bad change

  • make check (pre-push) and check-fast (Stop hook): fmt, vet, build, lint, unit, handler, BDD
  • Coverage gate >= 90% over internal/domain + internal/application (make coverage, CI test job)
  • golangci-lint and gocyclo gate at 15 (10 informational), blocking file-length check
by the numbers

Thirteen recorded decisions and 15 BDD features back the grading

13
Architecture decisions
#27 of 45 in the fleet
4
DB migrations
#22 of 45 in the fleet
15
BDD feature files
#19 of 45 in the fleet
3
Events published
#26 of 45 in the fleet

Ranked against all 45 briefed repositories (dot = one repository, highest on the left).

One-command workflows (make)

arch-testbddbuildcheckcheck-allcheck-fastcoveragefmtfmt-checkguide-lintharness-testhelpintegrationlint
what comes next

Next, make the alerts land and prove the thresholds are right

NOW1Raise mutationthresholds from 95/95to the 99/99 standardRaise the gremlins thresholdsfrom efficacy 95 /mutant-coverage 95 to the 99/99fleet standard: both domainpackages measured 100%(.gremlins.yaml:28-33)NEXT2Give threshold alertsan owner and a consumerAssign an owner and consumerfor the analytics topic:NodeThresholdBreached has noin-organization consumer, sothreshold alerting dead-ends(docs/docs/ddd/bounded-context-canvas.md:63)LATER3Alert on failedrecomputes, consumerlag and DLQ trafficAdd alerts on recomputeoutcome=failed, consumer lag,DLQ traffic and the unpublishedoutbox tail:observability.md:123 lists themas not covered, runbook.md:208says manual checks onlyLATER4Validate tierthresholds against realvolumeValidate the hard policynumbers (0.90 suspend / 0.95recover, three-distinct-days,50-observation floor) againstreal volume: the fast-tiernumbers are domain constants(ADR 0013:30); no configurationsurface is evidenced in …
what could go wrong · and what we do about it

Our biggest risk is hard-coded thresholds gating fast delivery

Unauthenticated endpoints, by fleet decision

Every REST, MCP and A2A endpoint is unauthenticated by fleet decision; relies on the trusted network boundary

→

A decision, not a gap: relies on the trusted network boundary.

Fifteen events from six producers can drift quietly

Wide consumed-contract fan-in: 15 event types from six producers; tolerant decoding mitigates producer drift but silently ignores…

→

Tolerant decoding absorbs drift, but unknown shapes are silently ignored.

Hard-coded thresholds gate fast tiers with no tuning knob

Hard-coded grading and tier thresholds (constants in the domain) materially gate SAME_DAY/NEXT_DAY eligibility with no configuration…

→

Validate 0.90, 0.95 and the 50-observation floor against real volume first.

One process runs every consumer, scheduler and relay

Single-process composition root runs six Kafka consumers, the recompute scheduler and the outbox relay together…

→

No mitigation on the roadmap yet: this one needs an owner.

the decision we need

Name an owner and consumer for threshold alerts, and validate the tier thresholds before they gate more fast tiers.

WHAT ISIt listens to six producer contexts,keeps 7-day and 30-day scorecardsper node, and its grades alreadygate the fast tiers.THE CATCHIts threshold alerts reach noconsumer, and the hard-coded 0.90and 0.95 tier rules were neverchecked against real volume.WHAT COULD BEBreaches reach someone who acts,failures page us, and fast tiersrest on validated policy numbers.
Why it matters

Node Performance turns observed facts into A-D grades that decide who earns same-day and next-day delivery

appendix · for the engineers in the room

The fine print: how it is put together

StyleHexagonal / ports & adapters, DDD bounded context; layering enforced as an executable fitness test, not a convention
Layoutcmd/{api,mcp,a2a} as independent deployables (composition root with REST + 6 Kafka consumers + recompute scheduler + outbox relay in one process; read-only MCP server…
StoragePostgreSQL only (pgxpool repositories, embedded golang-migrate migrations run at boot…
Testinggo test -race unit + handler suites; godog/Gherkin BDD (15 *.feature); testcontainers Postgres+Kafka integration…
REST2 operations over 2 paths on :8080: /scorecards/{nodeId}, /scorecards
Go 1.27.4chi v5pgx/pgxpoolKafkaCloudEvents 1.0golang-migrateOpenTelemetrymodelcontextprotocol/go-sdka2a-go/v2Helmgodoggremlins