warehouse-systems fleet · executive briefing

asrs-control

The controller that decides where every container sits in the automated store
eight capabilitys5 events out · 0 in3 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

asrs-control gives the WCS tier a real AS/RS controller; next it needs a consumer, a release and telemetry

1

Store and retrieve requests are accepted or refused at once; progress arrives as 5 Kafka events.

2

The PLC link survives duplicates, lost messages and restarts; its stuck-job limits are written down.

3

It is brand new: unreleased, logs only, one replica, and nothing consumes its events yet.

The ask

Fund the next step: build material-flow-control against it, add telemetry and cut the first release.

why it exists

Automated storage needs one owner for where each container sits

asrs-control is the AS/RS controller bounded context of the WCS tier (Generic, plan WCS-02). It owns where each container sits inside the AS/RS (rack positions per aisle), assigns storage positions by velocity zone with double-deep depth rules, schedules store and retrieve jobs one at a time per aisle unit, presents retrieved containers at output ports in request order…

Today

It owns the rack map, queues store and retrieve jobs one per aisle, and drives the PLC over MQTT telegrams.

The catch

It is a day old: no release, logs only, template guides in place, and its main consumer is not built yet.

what it does

It places, queues, presents and reshuffles containers safely

Store and retrieve requests

A request is accepted or refused at once; events report what happened next.

Smart position assignment

Fast movers get fast positions, with double-deep rules respected.

One job per aisle at a time

The PLC only gets an aisle's next job after the last one finishes.

Ports served in request order

Retrieved containers reach each output port in the order they were asked for.

Hidden reshuffles

Blocking containers are moved first, and those moves never leave the context.

Reliable PLC telegram link

Every telegram is acknowledged, deduplicated and resent if unanswered.

the shared language

A storage map per aisle and a job with exactly one outcome

THE LANGUAGEOF THE DOMAINStorageMapStorageJobEquipmentUnitRackPositionPortVelocityTelegramscheduling.Next
REST7 operations over 7 paths on :8080
Events5 produced, 0 consumed on Kafka (CloudEvents 1.0) over 2…
how it is built

One binary: a pure domain core, with REST in and Postgres and Kafka out

DRIVERS · INBOUNDOUTBOUND · ADAPTERSREST API :80807 operations over 7 pathsDOMAIN COREStorageMapStorageJobEquipmentUnitRackPositionPostgreSQLPostgreSQL onlyKafka producer · 5 eventsstoragejob.ContainerStoredContainerPresentedAtPortTransactional outboxrelay to Kafkacommands inevents inevents outstorage / infra
event traffic · CloudEvents 1.0 on Kafka

It publishes 5 facts on Kafka and listens to nothing there

CONSUMED · BY SOURCE · 0PUBLISHED · BY ENTITY · 53 storagejob1 asrs1 equipmentunitContainerStoredContainerPresentedAtPortStorageJobFailedEquipmentStateChangedAsrsCapacityChangedConsumes nothing: it is a source
how we know it is healthy

Logs and readiness probes are all we can watch today

Structured JSON logs to stdout (log/slog, cmd/api/main.go) plus /healthz and /readyz probes; OpenTelemetry traces and metrics are not wired yet, deferred by ADR 0001 (not evidenced in cmd/ or internal/…

What we watch

  • /readyz checks Postgres, Kafka and every MQTT link; the chart wires /healthz and /readyz as liveness and readiness probes
  • Up telegrams are claimed in processed_telegrams in the effect's transaction, so a duplicate gets the identical ACK, also after a restart

What stops a bad change

  • make check / check-all; coverage gate 90% over domain and application (Makefile COVERAGE_THRESHOLD)
  • PR CI: lint, guide-lint, complexity, file-length, test, bdd, integration (with the pinned emulator), mutation-fast on internal/domain/storagejob…
  • Weekly (Monday 06:00 UTC) mutation over internal/domain and drift jobs
by the numbers

3 recorded decisions and 1 feature file back a young codebase

3
Architecture decisions
#42 of 48 in the fleet
1
DB migrations
#33 of 48 in the fleet
1
BDD feature files
#43 of 48 in the fleet
5
Events published
#21 of 48 in the fleet

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

One-command workflows (make)

helpbuildvetfmtfmt-checklinttestcoverageintegrationbddarch-testmutationmutation-fullvuln
what comes next

Next: honest guides, telemetry, a release and a real consumer

NOW1Replace thetemplateleftovers withReplace the templateleftovers: SPEC.mdstill describeswarehouse-harness-template,the .claude/skillshow-tos carryTEMPLATE NOTEheaders, and the …NEXT2Add traces andmetrics on thefleet standardAdopt the fleetOpenTelemetrystandard that ADR0001 deferred: todaythere are JSON logsonly, no traces andno metricsNEXT3Register ininfra and cutthe firstRegister the servicein warehouse-infra(ADR 0001 calls it alater plan) and cutthe first develop tomain release: thereis no main branchyet, so …LATER4Reconcile jobsleft waiting bylost telegramsBuild thereconciliation ADR0002 names as afollow-up: reconcileACKNOWLEDGED jobsagainst UNIT_STATEor an aislewatchdog, since …LATER5Raise mutationthresholdstoward 99/99Raise the mutationthresholds towardthe fleet 99/99standard:.gremlins.yaml setsefficacy 93 andmutant coverage 92(measured …LATER6Buildmaterial-flow-controlas the firstGet the firstconsumer live:material-flow-controlis designed toconsume all 5 events(ADR 0003, plan 04)but is not evidencedas a repo yet, and …
what could go wrong · and what we do about it

The biggest risk is a job stuck after a lost telegram

Jobs can get stuck after lost telegrams

Stuck jobs after lost telegrams (ADR 0002 known limits): a JOB_DONE lost while asrs-control was down longer than about 8 s…

→

Build the reconciliation ADR 0002 names: check open jobs against unit state or an aisle watchdog.

Very young and not yet released

Very young and unreleased: 42 commits on develop, all on 2026-11-20, no main branch…

→

Register it in warehouse-infra and cut the first release to main.

Exactly one replica by design

Single replica by design: the aisle scheduler is single-writer, so the chart allows exactly one replica and a pod restart pauses every…

→

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

Logs are the only signal

Logs only: no traces or metrics (deferred by ADR 0001), so a slow aisle, a retransmission storm or outbox lag is diagnosed from logs…

→

Adopt the fleet OpenTelemetry standard that ADR 0001 deferred.

the decision we need

Fund the next step: build material-flow-control against it, add telemetry and cut the first release.

WHAT ISIt owns the rack map, queues storeand retrieve jobs one per aisle, anddrives the PLC over MQTT telegrams.THE CATCHIt is a day old: no release, logsonly, template guides in place, andits main consumer is not built yet.WHAT COULD BEA released controller, watched withtraces and metrics, feedingmaterial-flow-control with everystore and retrieve.
Why it matters

asrs-control gives the WCS tier a real AS/RS controller; next it needs a consumer, a release and telemetry

appendix · for the engineers in the room

The fine print: how it is put together

StyleHexagonal (ports and adapters), enforced by arch-go fitness tests: domain packages import nothing internal, one application Service where every write runs in one aisle unit of work…
Layoutcmd/api (composition root: REST, one MQTT link per AS/RS, outbox relay, probes) + internal/domain (layout, storagemap, storagejob, equipment, capacity…
StoragePostgreSQL only (migration 0001: storage_maps, storage_jobs, equipment_units, asrs_capacity, processed_telegrams, outbox_events, idempotency_keys)…
Testing55 of 118 Go files are tests; 90% coverage gate over internal/domain and internal/application; 1 godog feature file with 10 scenarios (depth rule D2, reshuffle, port order, HELD unit…
REST7 operations over 7 paths on :8080: /healthz, /readyz, /asrs/{asrsId}, /asrs/{asrsId}/storage-jobs, /asrs/{asrsId}/storage-jobs/{storageJobId}…
Go 1.27.4chi v5.5.0 RESTpgx v5.13.0 + golang-migrate…kafka-go v0.4.51 + CloudEvents…paho MQTT client v1.5.1yaml.v3 layout filelog/slog JSON logsgodog v0.16.0 BDDtestcontainers-go v0.45.0arch-go v1.7.0gremlins v0.6.0OpenAPI 3.1.0 + AsyncAPI 2.6.0