warehouse-systems fleet · executive briefing

product-master

The single source of truth for what each product is, how big it is and how it is packed
eight capabilitys8 events out · 1 in14 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

Product Master owns every SKU's handling, size and packaging, and nine contexts keep copies from its events

1

One SKU record captures handling rules, physical profile and packaging hierarchy.

2

It only publishes: eight event types flow out, nothing flows in, no live calls either way.

3

Operators, agents and the console share the same use cases across REST, MCP and A2A.

The ask

Re-test the reports route through Kong on a running cluster, then promote MCP and A2A to default-on with SLOs.

why it exists

Every warehouse team needs the same answer about a product

Owns SKU-level product master data for the whole fleet: the handling classification (hazmat, fragile, temperature-sensitive, oversized, high value, DOT hazard class), the declared-versus-measured physical profile (unit dimensions and weight), and the packaging hierarchy (EACH -> INNER -> CASE -> PALLET with GS1 GTINs, eaches as the ledger unit)…

Today

It registers SKUs, classifies hazmat or fragile goods, tracks declared versus measured size, and manages GS1 pack levels.

The catch

Reports through the gateway were never re-tested after a 404, the relay cap can strand rows, and the ADR 0013 API cutover is breaking.

what it does

Handling, size and packaging live in one record per SKU

SKU registration

Every product starts with an explicit registration, guarded against races.

Handling classification

Hazmat, fragile, cold-chain and high-value rules are checked on entry.

Physical profile

Declared and measured sizes are kept, with big gaps flagged for stewards.

Packaging and GTINs

Each, inner, case and pallet levels carry validated GS1 GTINs.

Reliable event fan-out

An outbox mints one event per change for integration and analytics.

Data-quality reports

Daily fill-in counts, open discrepancies and coverage show data health.

who it talks to

It starts the flow: eight build on what it publishes

LISTENS TO · 0 EVENT TYPESIS HEARD BY · 8 CONTEXTSNo upstream events: it starts the flowfulfillment-execution3inbound-receiving3wes-work-planning3inventory-storage2pick-face-replenishment2slotting-optimization2+2 more contextsproductmasterbadge = event types on that edge · derived from the CloudEvents types each repo declares
the shared language

One Product aggregate and a shared GS1 kernel carry the language

THE LANGUAGEOF THE DOMAINProductClassification value objectPhysicalProfile value objectPackagingHierarchyShared GS1 kernel
REST17 operations over 15 paths on :8080 (api) plus :8092…
MCPMCP server (cmd/mcp, :8090, Streamable HTTP…
A2AA2A agent on JSON-RPC 2.0 :8093 (cmd/a2a…
how it is built

Three front doors share one set of use cases and no outbound calls

DRIVERS · INBOUNDOUTBOUND · ADAPTERSREST API :808017 operations over 15 pathsMCP tools :8090MCP server (cmd/mcp, :8090…Kafka consumer · 1 eventsyaml; ProductDescriptionChang…DOMAIN COREProductClassification value…PhysicalProfile value…PackagingHierarchyPostgreSQLPostgres OLTPKafka producer · 8 eventsproduct.ProductRegisteredProductDescriptionChangedTransactional outboxrelay · DLQ on x-dlq-*commands inevents inevents outstorage / infra
event traffic · CloudEvents 1.0 on Kafka

Eight product facts keep nine teams aligned without live calls

CONSUMED · BY SOURCE · 0PUBLISHED · BY ENTITY · 88 productnone cross-context - pure…ProductRegisteredProductDescriptionChangedProductClassifiedProductDimensionsDeclaredProductMeasuredProductPackLevelDeclaredProductPackLevelMeasuredConsumes nothing: it is a source
how we know it is healthy

Traces cross the outbox and a registration counter shows activity

OpenTelemetry OTLP/gRPC traces + metrics from api, mcp, reports and projector (the projector: Go runtime metrics, no spans) to the Collector (periodic reader 30 s…

What we watch

  • Tier-2 business counter product_master.products.registered on top of the standard OTel baseline and otelchi RED metrics
  • Projector sets up its own telemetry and every backend Deployment sets ENVIRONMENT (ADR 0008); /reports/freshness exposes projection lag

What stops a bad change

  • make check-fast / check / check-all (fmt-check, vet, build, golangci-lint pinned v2.14.0, test -race)
  • 90% coverage gate; arch-test fitness rules; bdd godog gate
  • mutation (gremlins fast subset, 95/95) blocking on every push; exhaustive mutation-full on schedule
by the numbers

Fourteen decisions and 17 BDD features back the product record

14
Architecture decisions
#24 of 45 in the fleet
3
DB migrations
#26 of 45 in the fleet
17
BDD feature files
#15 of 45 in the fleet
8
Events published
#14 of 45 in the fleet

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

One-command workflows (make)

buildlinttestcoverageintegrationbddarch-testmutationmutation-fullcheck-allcheck-fastguide-lint
what comes next

Next, we verify reports, switch on agents and keep the docs current

NOW1Re-test thereports routethrough KongRe-test the reportsroute through Kongon a runningcluster: a 404 wasrecorded 2026-10-07,the route moved intothis chart (8c22a05,2026-10-13) but …NEXT2Promoteoptional chartcomponents toPromote default-offchart components(mcp, a2a,analytics, frontend- only api isdefault-on) todefault-on with SLOsonce real usage …NEXT3Plan thedeferredINNER-levelINNER-levelreceiving/pickingflows and ananalytics report onproducts without adeclared each GTINare explicitlydeferred from ADR …LATER4Add measurementhistory ifaudit needs itMeasurement history(only the latestmeasurement is kept)is an explicitlydeferred additivetable + ADR if auditof past readingsbecomes a need…LATER5Check externalclients againstthe RESTFleet REST guidelinecutoverfollow-through: ADR0013 (2026-11-01) isbreaking - anyexternal client mustadopt the retirementnoun route, …LATER6Raise mutationgate from 95/95to 99/99,Rebuild theanalytics projectionfrom the earliestretained offset ifpre-stream productsmust appear -currently visibleonly from their…
what could go wrong · and what we do about it

Our biggest risk is a broken reports route and an outbox cap to watch

Unauthenticated endpoints, even for two writes, by decision

REST, MCP (including the two L3 pack-level writes) and A2A are unauthenticated BY DECISION (fleet-wide revert 2026-09-11…

→

A decision, not a gap: fleet-wide; the two MCP pack-level writes are included.

Outbox cap trades ordering for liveness

Outbox relay attempt cap trades ordering for liveness: at the 1s/default-20 settings a broker outage longer than ~20 s excludes head…

→

Excluded rows stay inspectable and operators re-arm them; the version guard keeps consumers safe.

Nine contexts depend on its event payloads

Nine sibling contexts declare local copies of its events: a breaking payload change is a new .v2 type…

→

A breaking payload change becomes a new .v2 type rather than an edit.

Reports via Kong not re-verified

Reports through Kong returned 404 on 2026-10-07; the chart fix has not been re-tested on a running cluster (README) - verify before…

→

Re-test on a running cluster; port-forwarding the reports service is the fallback.

the decision we need

Re-test the reports route through Kong on a running cluster, then promote MCP and A2A to default-on with SLOs.

WHAT ISIt registers SKUs, classifies hazmator fragile goods, tracks declaredversus measured size, and managesGS1 pack levels.THE CATCHReports through the gateway werenever re-tested after a 404, therelay cap can strand rows, and theADR 0013 API cutover is breaking.WHAT COULD BEReports work through the gateway,agent surfaces run by default, andmutation checks reach the 99/99 bar.
Why it matters

Product Master owns every SKU's handling, size and packaging, and nine contexts keep copies from its events

appendix · for the engineers in the room

The fine print: how it is put together

StyleHexagonal / Ports & Adapters (WMS-tier Supporting bounded context); strict inward dependency rule enforced by arch-go fitness tests…
Layoutcmd/{api,mcp,a2a,product-projector,product-reports} + internal/{domain(product, shared/gs1), application(usecases, ports, outbox, idempotency), adapters(inbound http/kafka/mcp/a2a…
StoragePostgres OLTP (3 golang-migrate migrations: products_outbox with UNIQUE(event_id,topic) from day one so the analytics fan-out needed no rework…
Testingtable-driven unit tests with -race; 90% coverage gate on domain+application+analytics (scope single-sourced in the Makefile); godog/Gherkin BDD (17 feature files)…
REST17 operations over 15 paths on :8080 (api) plus :8092 (product-reports, read-only): GET|PUT /products, /products/{sku}…
Go 1.27.4chi HTTP router + go-chi/corspgx/v5 + pgxpool Postgresgolang-migratesegmentio/kafka-gocloudevents/sdk-go v2modelcontextprotocol/go-sdk v1.8.0a2aproject/a2a-go/v2 v2.7.0OpenTelemetry Go SDK v1.47.0Helm chartVite + React Module Federation…