warehouse-systems fleet · executive briefing

node-topology

The single map of every warehouse, lane and delivery area the network depends on
eight capabilitys11 events out · 0 in19 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 Topology is the network's map of record, so eight contexts plan from the same facts

1

It owns the physical facts once, so other contexts copy rather than reinvent them.

2

It only publishes and serves, so it calls no sibling and depends on no one.

3

Its blind spots are an unmeasured outbox, stale event docs and no contract-test job.

The ask

Fund outbox metrics and alerts now, and add a contract-test job so event drift is caught before consumers feel it.

why it exists

Every network decision starts with knowing what nodes and lanes exist

Supporting subdomain of the retail network (logistics tier) and the factual foundation every other network context reads. It registers network nodes (fulfilment centres, cross-docks, returns centres, sortation centres, delivery stations, air hubs), versioned operational profiles with inbound limits, directed ground/air lanes with declared costs and emissions, regions and postal service areas…

Today

It registers six node types, versioned profiles, lanes, regions and service areas, publishes eleven event types and consumes none.

The catch

Nobody can see its outbox backlog, docs still say ten events, and no contract-test job checks what consumers rely on.

what it does

It keeps the network's nodes, lanes and service areas on one record

Node registry

Registers six node types and moves them through active, suspended and retired.

Versioned profiles

Keeps every node profile revision, including what each node can physically take in.

Lane management

Opens and closes ground and air lanes between active nodes, with declared costs.

Regions

Splits the network into named regions everyone reads the same way.

Service areas

Binds postal prefixes to active delivery stations, so every address has a home.

Published events

Announces eleven kinds of change through an outbox, so no update is lost.

who it talks to

It starts the flow: nine build on what it publishes

LISTENS TO · 0 EVENT TYPESIS HEARD BY · 9 CONTEXTSNo upstream events: it starts the floworder-sourcing11delivery-promise9linehaul-transportation7seller-inbound5shipping-and-tracking5vendor-connectivity5+3 more contextsnode-topologybadge = event types on that edge · derived from the CloudEvents types each repo declares
the shared language

Nodes, lanes, regions and service areas are all the vocabulary needed

THE LANGUAGEOF THE DOMAINNodeNode Type / SubtypeOperational ProfileInbound LimitsLaneLane Cost / Lane EmissionRegionService Area
REST17 operations over 13 paths on :8080
MCPMCP server (cmd/mcp, :8090, Streamable HTTP…
A2AA2A agent (cmd/a2a, :8093, JSON-RPC at / and /a2a…
how it is built

A hexagonal core writes through an outbox and serves read-only agents

DRIVERS · INBOUNDOUTBOUND · ADAPTERSREST API :808017 operations over 13 pathsMCP tools :8090MCP server (cmd/mcp, :8090…DOMAIN CORENodeNode Type / SubtypeOperational ProfileInbound LimitsPostgreSQLPostgreSQL via pgx with…Kafka producer · 11 eventsnode.NodeRegisteredNodeOperationalProfileDeclaredTransactional outboxrelay · DLQ on x-dlq-*commands inevents inevents outstorage / infra
event traffic · CloudEvents 1.0 on Kafka

Eleven event types tell the network every time its map changes

CONSUMED · BY SOURCE · 0PUBLISHED · BY ENTITY · 115 node4 lane1 region1 serviceareaNodeRegisteredNodeOperationalProfileDeclaredNodeActivatedNodeSuspendedNodeRetiredLaneOpenedLaneClosedLaneCostDeclaredLaneEmissionDeclaredServiceAreaAssignedConsumes nothing: it is a source
how we know it is healthy

Traces, a 90% coverage gate and fitness tests guard the map

OpenTelemetry SDK -> OTLP/gRPC Collector (Jaeger traces, Prometheus metrics) via telemetry.Setup in all three binaries; JSON logs on stdout shipped by Alloy to Loki; SDK diagnostics routed through slog at DEBUG

What we watch

  • W3C traceparent + baggage propagation installed globally in every binary; span context injected into outbox row headers in the write transaction
  • Business metric topology.nodes.registered counter with outcome=registered|rejected and reason (vendor-node-code-taken…
  • http.server.request.duration histogram on all REST/MCP/A2A binaries

What stops a bad change

  • Coverage gate 90% (make coverage)
  • make check = fmt-check + vet + build + lint + test; check-all adds coverage + arch-test + bdd
  • internal/architecture fitness tests fail the build on layering violations
  • Spectral lint of apis/openapi.yaml + apis/asyncapi.yaml against fleet guidelines
by the numbers

Nineteen recorded decisions and 15 BDD features keep it honest

19
Architecture decisions
#15 of 45 in the fleet
9
DB migrations
#10 of 45 in the fleet
15
BDD feature files
#19 of 45 in the fleet
11
Events published
#8 of 45 in the fleet

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

One-command workflows (make)

helpbuildvetfmtfmt-checklinttestcoverageintegrationbddarch-testmutationmutation-fullvuln
what comes next

Next, measure the outbox and fix the gaps in docs and contract tests

NOW1Raise mutationthresholds from95/95 to the 99/99Raise the gremlinsthresholds from efficacy95 / mutant-coverage 95to the 99/99 fleetstandard: everyinternal/domain packagemeasured 100%(.gremlins.yaml:31-35)NEXT2Instrument theoutbox backlog,relay passes andInstrument the outboxbacklog, relay passesand idempotency replays(observability.md:37says no instrumentexists; runbook SQLonly) and add alerts(observability.md:75)NEXT3Publish on theanalytics topiconce a use caseNothing is published onretailnetwork.node-topology.analytics:the model names noanalytics-only event(docs/docs/ecosystem/integration.md:30)LATER4Fix the docs thatstill say tenevents instead ofDocs still say tenevents(docs/docs/api-reference/events.md:5,10;integration.md:52-53)while apis/asyncapi.yamlhas eleven withLaneEmissionDeclaredLATER5Add acontract-test jobto CINo contract-test job inci.yml (not evidenced in.github/workflows/ci.ymljob list); chartdefaults keep mcp, a2a,frontend off
what could go wrong · and what we do about it

Our biggest risk is contract drift that downstream tests may not catch

Unauthenticated endpoints, by fleet decision

Every REST, MCP and A2A endpoint is unauthenticated by fleet decision - safe only inside the trusted network boundary

→

A decision, not a gap: safe only inside the trusted network boundary.

Eight consumers depend on its published language

Eight conformist consumers read the published language (docs/docs/ecosystem/integration.md:50-58)…

→

Drift shows up only through downstream conformance tests; no contract-test job exists.

One database holds both aggregates and the outbox

Single PostgreSQL instance is both the aggregate store and the outbox; saturation couples write latency to event delivery…

→

Instrument outbox backlog and relay passes so saturation shows before delivery slows.

Mutation gate is below the 99/99 fleet standard

Mutation gate thresholds 95/95 sit below the 99/99 fleet standard even though the domain measured 100%

→

The domain measured 100%, so raising the thresholds should be a small step.

the decision we need

Fund outbox metrics and alerts now, and add a contract-test job so event drift is caught before consumers feel it.

WHAT ISIt registers six node types,versioned profiles, lanes, regionsand service areas, publishes elevenevent types and consumes none.THE CATCHNobody can see its outbox backlog,docs still say ten events, and nocontract-test job checks whatconsumers rely on.WHAT COULD BEOutbox delivery is visible on adashboard, docs match the elevenevents, and contract drift fails abuild.
Why it matters

Node Topology is the network's map of record, so eight contexts plan from the same facts

appendix · for the engineers in the room

The fine print: how it is put together

StyleHexagonal / ports-and-adapters with DDD aggregates (Node, Lane, ServiceArea, Region); layering enforced by executable fitness tests
Layoutcmd/api (REST + outbox relay), cmd/mcp, cmd/a2a; internal/domain (shared, node, lane, servicearea, region), internal/application (ports, repository, views, usecases, outbox)…
StoragePostgreSQL via pgx with embedded migrations (9 *.up.sql) and pgtx UnitOfWork; transactional outbox drained by capped relay (OUTBOX_MAX_ATTEMPTS…
TestingUnit + integration against testcontainers Postgres/Kafka (pgtest, kafkatest), godog BDD over features/*.feature (15 files), architecture fitness tests, repocontract tests…
REST17 operations over 13 paths on :8080: /nodes, /nodes/{nodeId}, /nodes/{nodeId}/operational-profile, /nodes/{nodeId}/activations…
Go 1.27.4chi v5pgx v5 / PostgreSQLsegmentio kafka-goCloudEvents 1.0OpenTelemetrymodelcontextprotocol/go-sdka2a-go/v2godog BDDtestcontainersgremlins mutation testingReact/Vite MFE console