warehouse-systems fleet · executive briefing

product-discovery

Lets shoppers search and browse products with price, stock and buyability in one view
eight capabilitys0 events out · 11 in9 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 Discovery folds three upstream contexts into one searchable view, so shoppers see what they can buy

1

Shoppers get search, product pages and a category tree from just three read routes.

2

Each product carries one purchasable, in-stock and searchable verdict built from every source.

3

It writes nothing and publishes nothing, so it can be rebuilt from its source topics.

The ask

Schedule the rebuild Job as a regular drill, so we know stale views can be repaired on demand.

why it exists

Shoppers need one view of a product, not four sets of facts

Product Discovery is the Supporting-subdomain read side of the storefront: it folds events from offer-availability, product-content and pricing into one ProductView per catalogue item (title, flags, content, category path, list and effective price, stock, purchasable verdict) and one CategoryView with purchasable counts…

Today

It reads eleven event types from offer-availability, product-content and pricing, and serves search, product and category reads.

The catch

Freshness rides entirely on events: a dropped event leaves pages stale until a rebuild Job that is off by default runs.

what it does

Search, product pages and categories come from one read side

Product search

Shoppers search with facets, category suggestions and paging.

Product page view

One call returns everything needed to show a single product.

Category browsing

A browsable tree shows how many buyable products sit in each category.

Availability facts

Item and listing availability flow in from offer-availability.

Content and categories

Descriptions and category versions arrive from product-content.

List and effective prices

Prices arrive from pricing, so the view shows what shoppers pay.

who it talks to

It listens to three contexts and, so far, nobody listens back

LISTENS TO · 11 EVENT TYPESIS HEARD BY · 0 CONTEXTSoffer-availability6product-content3pricing2No downstream consumer yetproductdiscoverybadge = event types on that edge · derived from the CloudEvents types each repo declares
the shared language

A product view and its purchasable verdict are the core ideas

THE LANGUAGEOF THE DOMAINProductViewCategoryViewCatalogItemListingPurchasableInStockEffective priceFacet
REST3 operations over 3 paths on :8080
MCPRead-only MCP server (cmd/mcp, :8090…
A2ARead-only A2A agent (cmd/a2a, :8093): skills…
how it is built

A pure read side: projections behind ports, no write routes

DRIVERS · INBOUNDOUTBOUND · ADAPTERSREST API :80803 operations over 3 pathsMCP tools :8090Read-only MCP server…Kafka consumer · 11 eventsCatalogItemCreatedCatalogItemDiscontinuedDOMAIN COREProductViewCategoryViewCatalogItemListingPostgreSQLPostgreSQL onlycommands inevents inevents outstorage / infra
event traffic · CloudEvents 1.0 on Kafka

Eleven event types keep every product view current

CONSUMED · BY SOURCE · 11PUBLISHED · BY ENTITY · 0offer-availability 6product-content 3pricing 2CatalogItemCreatedCatalogItemDiscontinuedListingAvailabilityChangedListingCreatedListingRestoredListingSuppressedItemPriceChangedItemPriceWithdrawnPublishes nothing: it is a sink
how we know it is healthy

Fleet-standard traces and logs show when folding stalls

OpenTelemetry SDK -> OTLP/gRPC -> in-cluster Collector -> Jaeger (traces) and Prometheus (metrics); stdout JSON logs shipped by Alloy to Loki (fleet observability standard ADR)

What we watch

  • /healthz (liveness) and /readyz (readiness dials Postgres and Kafka) probes per binary
  • Two service counters: discovery.searches.served (outcome served|empty|failed; api, a2a and mcp) and discovery.kafka.poison_messages (consumer…
  • OTLP/gRPC trace + metric export that never blocks the request path (collector outage costs telemetry, not traffic)

What stops a bad change

  • make check / check-all (fmt + vet + golangci-lint + unit + coverage)
  • coverage gate >= 90% on domain + application packages
  • make arch-test (arch-go hexagonal fitness functions)
  • make mutation / mutation-full (gremlins gate, thresholds efficacy 99, mutant-coverage 99: the fleet standard)
by the numbers

Nine decisions and eight BDD features back a small read side

9
Architecture decisions
#34 of 45 in the fleet
1
DB migrations
#32 of 45 in the fleet
8
BDD feature files
#38 of 45 in the fleet
11
Events consumed
#11 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, we drill the rebuild and switch on the agent surfaces

NOW1Run the rebuild Job asa scheduled drillExercise the default-offrebuild Helm Job (ADR 0006) asa scheduledprojection-integrity drillNEXT2Switch the A2A agentand MCP server on in adeploymentSwitch the A2A agent and MCPserver on in a deployment:chart a2a.enabled andmcp.enabled default false(warehouse-infra enables A2A;MCP rollout not evidenced inintegration.md)LATER3Evaluate a dedicatedsearch-engine adapterEvaluate a dedicatedsearch-engine adapter behindthe existing search port as thecatalogue growsLATER4Map tool names to thecommerce protocolcatalog bindingMap the tool names onto theUniversal Commerce Protocolcatalog binding, a later phasewith its own decision (ADR0009)
what could go wrong · and what we do about it

Our biggest risk is product views that go quietly stale

Stale views when events lag or drop

Freshness is wholly event-driven: consumer lag or a dropped upstream event leaves stale ProductViews until the (default-off) rebuild…

→

Exercise the default-off rebuild Job as a scheduled projection-integrity drill.

Postgres search may not keep up with the catalogue

PostgreSQL FTS + pg_trgm is the search engine; catalogue growth may force the dedicated-engine swap the port anticipates

→

Evaluate a dedicated search-engine adapter behind the existing search port.

Unauthenticated endpoints, by fleet decision

Every REST, A2A and MCP endpoint is unauthenticated by decision (fleet-wide auth revert 2026-09-11, TestNoAuthMiddlewareReintroduced)

→

A decision, not a gap: fleet-wide.

More than one pod has not been load-tested

N>1 pods is supported by the row lock and per-key guards but has not been load-tested

→

The row lock and per-key guards support it; a load test would prove it.

the decision we need

Schedule the rebuild Job as a regular drill, so we know stale views can be repaired on demand.

WHAT ISIt reads eleven event types fromoffer-availability, product-contentand pricing, and serves search,product and category reads.THE CATCHFreshness rides entirely on events:a dropped event leaves pages staleuntil a rebuild Job that is off bydefault runs.WHAT COULD BEStale views get fixed by routine,agents search through MCP in thecluster, and a dedicated searchengine can slot in.
Why it matters

Product Discovery folds three upstream contexts into one searchable view, so shoppers see what they can buy

appendix · for the engineers in the room

The fine print: how it is put together

StyleHexagonal (ports and adapters), CQRS read side built as event-carried projections; DDD bounded context, no aggregate
Layoutcmd/{api (REST :8080 + 3 Kafka consumer groups), a2a (agent :8093), mcp (server :8090), rebuild (one-shot Helm Job)}…
StoragePostgreSQL only (projections: products, category_view, listing_items, processed_events; golang-migrate)…
TestingDomain unit tests under a mutation gate, application tests, adapter httptest/Kafka tests, godog BDD (8 feature files), testcontainers integration against real Postgres + Kafka…
REST3 operations over 3 paths on :8080: /products, /products/{catalogItemId}, /categories
Go 1.27chiPostgreSQL + pgx v5KafkaMCP Go SDKa2a-goCloudEvents 1.0OpenTelemetrygodog Cucumber BDDtestcontainers