Skip to main content

Configuration reference

The repository builds six binaries from one Go module (and one container image, see the Dockerfile). Each binary is configured only through environment variables, read in its composition root under cmd/ plus the shared telemetry setup in internal/observability/telemetry.go. There is no config file other than the process-path catalogue YAML.

Conventions on this page:

  • Default is the value the binary uses when the variable is unset or empty. Every getenv(key, fallback) helper in this repo treats an empty string the same as unset.
  • Required means the binary refuses to boot without it.
  • The Helm chart (charts/fulfillment-execution) sets most of these for you; the last section maps chart values to variables.

cmd/execution (the OLTP service)​

The main deployable: REST API, the WorkReleased, ProductClassified, InterleavingHintIssued and pack-level Kafka consumers, the optional process-path catalogue consumer, and the transactional-outbox relay.

VariableDefaultRequired?MeaningRead in
HTTP_ADDR:8080noListen address of the REST API (/healthz, /readyz and every route in apis/openapi.yaml).cmd/execution/main.go
LOG_LEVELinfonodebug, info, warn/warning, error (case-insensitive). Anything else means info. Logs are JSON on stdout.cmd/execution/main.go
DATABASE_URL(none)yesPostgres DSN of the OLTP database. Unset is a boot error naming the variable (ADR-0052): there are no in-memory adapters in the binary. The binary runs the migrations, opens a pgxpool (MaxConns 10, statement_timeout 5s) and pings it.cmd/execution/config.go
MIGRATIONS_DATABASE_URLvalue of DATABASE_URLnoDirect (non-PgBouncer, session-mode) DSN used only for the golang-migrate step at boot. The runtime pool always uses DATABASE_URL. See ADR-0031.cmd/execution/main.go
KAFKA_BROKERS(none)yesComma-separated broker list; unset is a boot error naming the variable (no localhost:9092 default). Used by the three consumers, the publishers, the outbox relay, the DLQ writer, the catalogue consumer and /readyz.cmd/execution/config.go
EVENT_PUBLISHERkafkanokafka is the only accepted value (domain events go through outbox_events and the always-on relay; the WorkReleased dead-letter writer is always wired). log or anything else is a boot error.cmd/execution/main.go, internal/composition/publisher.go
OUTBOX_RELAY_INTERVAL1snoGo duration the outbox relay sleeps after a pass that found fewer than 100 rows. A malformed or non-positive value silently falls back to 1s.cmd/execution/main.go (durationEnv)
OUTBOX_MAX_ATTEMPTS20noOutbox relay attempt cap (ADR-0042): a row that has failed this many sends is excluded from the relay's claims, logged once at ERROR (outbox_id, topic, event_type, key) and left in outbox_events for inspection; later rows, including rows with the same key, overtake it. 0 = unlimited (a poison row then blocks the relay forever). A malformed or negative value falls back to 20 with a WARN. Re-arm a row with UPDATE outbox_events SET attempts = 0 WHERE id = ... (see the runbook). Chart value config.outboxMaxAttempts.cmd/execution/main.go (outboxMaxAttempts)
WORK_RELEASED_CONSUMER_GROUP(none)yesStable consumer group of the warehouse.work-planning.events consumer; unset is a boot error. The chart renders fulfillment-execution (the group the binary used before). A brand-new group starts at the latest offset (NewConsumerWithGroup), so events published before its first join are not read.cmd/execution/config.go, internal/adapters/inbound/kafka/consumer.go
PATH_CATALOGUE_SOURCEfilenokafka replays warehouse.process-path-management.events into memory under a per-process consumer group. The HTTP listener starts first: /healthz answers at once, /readyz answers 503 until the replay reaches the startup watermark (60s timeout, then exit), and the WorkReleased consumer starts only afterwards (ADR-0044). Any other value means file. See ADR-0017.cmd/execution/main.go
PATH_CATALOGUE_FILE/etc/fulfillment-execution/process-paths.yamlyes in file modeProcess-path catalogue YAML. A missing or invalid file is a fatal boot error. Ignored in kafka mode.cmd/execution/main.go, internal/adapters/outbound/filecatalog/loader.go
PRODUCT_CLASSIFICATION_MODEkafkanokafka is the only accepted value (unset = kafka, case-insensitive): the local copy of product-master's ProductClassified events (Postgres table product_classification_copy) is fed and read. permissive, off, http and anything else fail the boot. See ADR-0039 and ADR-0052.cmd/execution/classification.go
PRODUCT_CLASSIFICATION_CONSUMER_GROUP(none)yesStable consumer group for warehouse.product-master.events; unset is a boot error. A new group starts at the earliest offset so the copy sees the whole history. The chart and the kind cluster use fulfillment-execution-product-classification.cmd/execution/classification.go
PACK_VIEW_CONSUMER_GROUP(none)yesStable consumer group of the pack-level consumer: a second consumer of warehouse.product-master.events that feeds the local PackView (Postgres table pack_view) from ProductPackLevelDeclared / ProductPackLevelRetired, always on (ADR-0054). Unset is the boot error PACK_VIEW_CONSUMER_GROUP is required; a value equal to PRODUCT_CLASSIFICATION_CONSUMER_GROUP is the boot error PACK_VIEW_CONSUMER_GROUP must differ from PRODUCT_CLASSIFICATION_CONSUMER_GROUP (a shared group would split the topic's partitions between the two consumers). A new group starts at the earliest offset so the PackView fills from history. Chart value config.packViewConsumerGroup (fulfillment-execution-pack-view).cmd/execution/packview.go
INVENTORY_STORAGE_BASE_URL(none)yesBase URL of inventory-storage's REST API. Completing a BREAK_CASE task calls POST <base>/containers/{lpn}/case-breaks (5 s timeout, Idempotency-Key header), so there is no degraded mode without it: unset or blank is the boot error INVENTORY_STORAGE_BASE_URL is required (ADR-0054). Chart value config.inventoryStorageBaseUrl (http://inventory-storage.warehouse-systems.svc.cluster.local:80).cmd/execution/config.go, internal/adapters/outbound/inventorystorage/client.go
PICK_BATCH_MODEoffnoPick-batching rollout gate (ADR-0063): off, shadow or on. Only on forms work batches; with off or shadow the work-batch routes answer 503 batch-mode-off, no batch row is written and no WorkBatch* event is published. Any other value is a boot error (PICK_BATCH_MODE: ...). No chart value: set it through extraEnv.cmd/execution/config.go, cmd/execution/wire_handlers.go
PICK_BATCH_MAXIMUM4noMaximum members of one work batch (a tuning knob, never a boot error). Unset, malformed or non-positive keeps 4. No chart value: set it through extraEnv.cmd/execution/wire_handlers.go, cmd/execution/env.go
TASK_INTERLEAVING_MODEkafkanokafka is the only accepted value; permissive, off and anything else fail the boot. See ADR-0051.cmd/execution/interleaving.go
TASK_INTERLEAVING_CONSUMER_GROUP(none)yesStable consumer group for warehouse.task-interleaving.events; unset is a boot error. A brand-new group starts at the latest offset (hints are short-lived). The chart and the kind cluster use fulfillment-execution-interleaving.cmd/execution/interleaving.go
MIGRATIONS_PATHmigrationsnogolang-migrate source directory (the image ships migrations/).cmd/execution/config.go
LOCATION_ROLE_MODEpermissivenohttp (case-insensitive) makes POST /stations check a locationCode against facility-layout's location role (must be WorkCenter), through a retry + circuit-breaker client. Anything else accepts every locationCode unchecked. See ADR-0024.cmd/execution/main.go
FACILITY_LAYOUT_BASE_URL(unset)only meaningful with LOCATION_ROLE_MODE=httpBase URL of facility-layout's REST API (GET /locations/{locationCode} is called on it). Not validated at boot: a wrong or empty value makes every lookup fail, and RegisterStation then accepts the station unchecked (fail-open).cmd/execution/main.go, internal/adapters/outbound/facilitylayout/client.go
CORS_ALLOWED_ORIGINShttp://localhost:5173,http://localhost:5184noComma-separated browser origins the CORS middleware allows (methods GET/POST/PUT/DELETE, headers Content-Type, Authorization, Idempotency-Key). The defaults are the console shell and this repo's micro-frontend dev servers.internal/adapters/inbound/http/router.go
OTEL_EXPORTER_OTLP_ENDPOINTlocalhost:4317noOTLP/gRPC collector address for traces and metrics. A bare host:port is turned into http://host:port. An unreachable collector is not fatal: telemetry is dropped and a WARN opentelemetry error is logged per failed export.internal/observability/telemetry.go
OTEL_SERVICE_NAMEfulfillment-executionnoservice.name resource attribute, and the server name used by the HTTP span and http.server.request.duration middleware.internal/observability/telemetry.go
SERVICE_VERSIONdevnoservice.version resource attribute (there is no build-time version).internal/observability/telemetry.go
ENVIRONMENTlocalnodeployment.environment.name resource attribute.internal/observability/telemetry.go

Not configurable, but worth knowing: migrations are read from the relative directory migrations (the repo root under go run, /app/migrations in the image); the lease is 5 minutes (usecases.DefaultLeaseDuration); the outbox relay claims at most 100 rows per pass; graceful shutdown is bounded by 10s; boot-time dials (migrations, DB ping, the catalogue broker dial) retry 5 times with waits of 1, 2, 4 and 8 s, i.e. 15 s of backoff plus the attempts' own duration (internal/adapters/outbound/bootretry; the code comment said "~31s" until gap fix D22).

cmd/mcp (the MCP server)​

A second deployable over the same OLTP database. It runs migrations too, but never starts a Kafka consumer, never reads the process-path catalogue and never runs the outbox relay (only cmd/execution drains outbox_events).

VariableDefaultRequired?MeaningRead in
MCP_ADDR:8090noListen address. MCP Streamable HTTP is served at / and /mcp, plus GET /healthz.cmd/mcp/main.go
LOG_LEVELinfonoSame levels as cmd/execution: debug, info, warn/warning, error, case-insensitive (it was case-sensitive here until gap fix D22).cmd/mcp/main.go
DATABASE_URL(none)yesOLTP Postgres DSN; unset is a boot error naming the variable (ADR-0052).cmd/mcp/config.go
MIGRATIONS_DATABASE_URLvalue of DATABASE_URLnoSame split as cmd/execution (ADR-0031).cmd/mcp/config.go
EVENT_PUBLISHERkafkanokafka is the only accepted value: complete_task writes outbox_events rows in its transaction for cmd/execution's relay to publish. Anything else is a boot error.cmd/mcp/main.go
KAFKA_BROKERS(none)yesBroker list; unset is a boot error (no localhost:9092 default).cmd/mcp/config.go
REPORTS_BASE_URL(unset)noBase URL of cmd/fulfillment-reports. When set, the read-only tools get_fulfillment_throughput_report and get_on_time_to_cpt are registered; unset, they are absent from tools/list.cmd/mcp/main.go
OTEL_SERVICE_NAMEfulfillment-execution-mcpnoResource service.name and the HTTP middleware's server name.cmd/mcp/main.go
OTEL_EXPORTER_OTLP_ENDPOINT, SERVICE_VERSION, ENVIRONMENTas abovenoShared telemetry settings.internal/observability/telemetry.go

cmd/a2a (the A2A agent)​

A third driving adapter over the same use cases and the same OLTP database (ADR-0059): the Agent Card at /.well-known/agent-card.json, JSON-RPC at / and /a2a, and GET /healthz. Like cmd/mcp it runs the migrations at boot but never starts a Kafka consumer or the outbox relay. The chart deploys it only when a2a.enabled=true.

VariableDefaultRequired?MeaningRead in
A2A_ADDR:8093noListen address.cmd/a2a/main.go
A2A_AGENT_URL(none)yesAbsolute http(s) URL of this agent's JSON-RPC endpoint, advertised on the Agent Card. Unset is the boot error A2A_AGENT_URL is required; a relative or schemeless value is ... is not an absolute http(s) URL.cmd/a2a/config.go
DATABASE_URL(none)yesOLTP Postgres DSN; unset is a boot error.cmd/a2a/config.go
MIGRATIONS_DATABASE_URLvalue of DATABASE_URLnoSame split as cmd/execution (ADR-0031).cmd/a2a/config.go
KAFKA_BROKERS(none)yesBroker list; unset is a boot error.cmd/a2a/config.go
EVENT_PUBLISHERkafkanokafka is the only accepted value (the complete_task skill writes outbox_events rows for cmd/execution's relay to publish); anything else is a boot error.cmd/a2a/config.go
LOG_LEVELinfonoAs for cmd/execution.cmd/a2a/main.go
OTEL_SERVICE_NAMEfulfillment-execution-a2anoResource service.name.cmd/a2a/main.go
OTEL_EXPORTER_OTLP_ENDPOINT, SERVICE_VERSION, ENVIRONMENTas abovenoShared telemetry settings.internal/observability/telemetry.go

cmd/fulfillment-projector (analytics writer)​

Consumes warehouse.fulfillment.analytics (group fulfillment-analytics, earliest offset for a new group) and writes the analytical database. It is the only writer and owns the analytics migrations (ADR-0012).

VariableDefaultRequired?MeaningRead in
ADMIN_ADDR:8091noAdmin listener; serves only GET /healthz ({"status":"ok"}).cmd/fulfillment-projector/main.go
ANALYTICS_DATABASE_URL(unset)yesRead-write DSN of the analytical database (must differ from the OLTP one). Boot fails with ANALYTICS_DATABASE_URL is required. Pool: MaxConns 5, statement_timeout 10s.cmd/fulfillment-projector/main.go
ANALYTICS_MIGRATIONS_PATHmigrations/analyticsnoDirectory of the analytical golang-migrate files, run at boot against ANALYTICS_DATABASE_URL.cmd/fulfillment-projector/main.go
KAFKA_BROKERS(none)yesBroker list for the analytics consumer; unset is a boot error (KAFKA_BROKERS is required), no localhost:9092 default.cmd/fulfillment-projector/main.go
LOG_LEVELinfonoCase-insensitive, as in cmd/execution.cmd/fulfillment-projector/main.go
OTEL_SERVICE_NAMEfulfillment-projectornoResource service.name.cmd/fulfillment-projector/main.go
OTEL_EXPORTER_OTLP_ENDPOINT, SERVICE_VERSION, ENVIRONMENTas abovenoShared telemetry settings.internal/observability/telemetry.go

cmd/fulfillment-reports (analytics reader)​

Serves GET /reports/throughput and GET /reports/throughput/freshness over a read-only pool (default_transaction_read_only=on, MaxConns 5, statement_timeout 15s). See Throughput report.

VariableDefaultRequired?MeaningRead in
HTTP_ADDR:8092noListen address. The chart overrides it to :8080.cmd/fulfillment-reports/main.go
ANALYTICS_DATABASE_URL(unset)yesDSN of the analytical database; should be a read-only role. The chart feeds it from the secret key ANALYTICS_READER_DATABASE_URL.cmd/fulfillment-reports/main.go
LOG_LEVELinfonoCase-insensitive.cmd/fulfillment-reports/main.go
OTEL_SERVICE_NAMEfulfillment-reportsnoResource service.name. The HTTP middleware reads the same variable but falls back to fulfillment-execution when it is unset, so set it explicitly outside the chart.cmd/fulfillment-reports/main.go, internal/observability/telemetry.go
OTEL_EXPORTER_OTLP_ENDPOINT, SERVICE_VERSION, ENVIRONMENTas abovenoShared telemetry settings.internal/observability/telemetry.go

cmd/sweep (the sweep CronJobs' entrypoint)​

Runs once per CronJob schedule, POSTs one sweep endpoint and exits (ADR-0048). Exit codes: 0 done, 1 gave up or rejected, 2 bad configuration.

VariableDefaultRequired?MeaningRead in
SWEEP_URL(unset)yesEndpoint to POST, e.g. http://<release>:80/task-lease-expirations.cmd/sweep/sweep.go
SWEEP_REQUEST_TIMEOUT15snoPer-attempt bound (connect + request + response), Go duration.cmd/sweep/sweep.go
SWEEP_MAX_ATTEMPTS4noAttempts before giving up; connect errors, timeouts, 429 and 5xx are retried, other non-2xx are not.cmd/sweep/sweep.go
SWEEP_RETRY_BACKOFF1snoFirst backoff; doubles per attempt.cmd/sweep/sweep.go
SWEEP_MAX_BACKOFF8snoBackoff cap.cmd/sweep/sweep.go
SIDECAR_QUIT_URLhttp://127.0.0.1:15020/quitquitquitnoIstio sidecar quit endpoint, POSTed on every exit path; empty disables it.cmd/sweep/sweep.go

Helm values that set these variables​

From charts/fulfillment-execution/values.yaml and the Deployment templates. The api Deployment also mounts the chart ConfigMap (templates/configmap.yaml: HTTP_ADDR, EVENT_PUBLISHER, OUTBOX_MAX_ATTEMPTS, KAFKA_BROKERS, and the OTEL_*/ENVIRONMENT keys when otel.enabled) with envFrom; an explicit env entry wins over the ConfigMap for the same key. Before gap fix D14 the ConfigMap was rendered but mounted by nothing. The mcp, projector, reports and frontend Deployments do not mount it.

Helm valueSetsOn which Deployment
config.httpAddr (:8080)HTTP_ADDRapi (cmd/execution)
config.eventPublisher (kafka, the only accepted value)EVENT_PUBLISHERapi, mcp (mcp.eventPublisher is gone)
config.workReleasedConsumerGroup (fulfillment-execution), config.productClassificationConsumerGroup, config.taskInterleavingConsumerGroup, config.packViewConsumerGroup (fulfillment-execution-pack-view)WORK_RELEASED_CONSUMER_GROUP, PRODUCT_CLASSIFICATION_CONSUMER_GROUP, TASK_INTERLEAVING_CONSUMER_GROUP, PACK_VIEW_CONSUMER_GROUP (all but the first only when extraEnv does not name them: extraEnv wins, so no duplicate env entry)api
config.inventoryStorageBaseUrl (http://inventory-storage.warehouse-systems.svc.cluster.local:80)INVENTORY_STORAGE_BASE_URL (only when extraEnv does not name it)api
config.outboxMaxAttempts (20)OUTBOX_MAX_ATTEMPTSapi
kafka.brokers (kafka:9092, required)KAFKA_BROKERSapi, mcp, projector
database.url / database.existingSecret + existingSecretKey (one is required: the render fails without it)DATABASE_URLapi, mcp
database.migrationsExistingSecretKey (MIGRATIONS_DATABASE_URL, optional: true)MIGRATIONS_DATABASE_URLapi, mcp
otel.enabled, otel.endpoint, otel.serviceNameOTEL_EXPORTER_OTLP_ENDPOINT, OTEL_SERVICE_NAME, SERVICE_VERSION (image tag), ENVIRONMENT (environment)api; the other three get fixed service names fulfillment-execution-mcp, fulfillment-projector, fulfillment-reports
pathCatalogue.enabled, pathCatalogue.mountPathPATH_CATALOGUE_FILE (<mountPath>/process-paths.yaml) and the ConfigMap mountapi
extraEnvanything else, e.g. PRODUCT_CLASSIFICATION_MODE, PATH_CATALOGUE_SOURCE, LOCATION_ROLE_MODE, PICK_BATCH_MODE, PICK_BATCH_MAXIMUMapi
mcp.httpAddr, mcp.logLevel, mcp.eventPublisher, mcp.reportsBaseUrl, mcp.extraEnvMCP_ADDR, LOG_LEVEL, EVENT_PUBLISHER, REPORTS_BASE_URL (derived from the reports Service when analytics.enabled and the value is empty)mcp
analytics.projector.adminAddr, analytics.migrationsPathADMIN_ADDR, ANALYTICS_MIGRATIONS_PATHprojector
analytics.database.*ANALYTICS_DATABASE_URL (projector: key ANALYTICS_DATABASE_URL; reports: key ANALYTICS_READER_DATABASE_URL)projector, reports
analytics.reports.httpAddr (:8080)HTTP_ADDRreports
sweeps.requestTimeoutSeconds (15), sweeps.maxAttempts (4), sweeps.retryBackoffSeconds (1), sweeps.maxBackoffSeconds (8), sweeps.sidecarQuitUrlSWEEP_REQUEST_TIMEOUT, SWEEP_MAX_ATTEMPTS, SWEEP_RETRY_BACKOFF, SWEEP_MAX_BACKOFF, SIDECAR_QUIT_URL (and SWEEP_URL from the release Service); the render fails when the retry budget does not fit sweeps.activeDeadlineSecondssweep CronJobs (cmd/sweep)

CORS_ALLOWED_ORIGINS, LOG_LEVEL (api), OUTBOX_RELAY_INTERVAL, WORK_RELEASED_CONSUMER_GROUP and FACILITY_LAYOUT_BASE_URL have no dedicated chart value: set them through extraEnv. In the warehouse-infra kind cluster, PRODUCT_CLASSIFICATION_MODE=kafka and PRODUCT_CLASSIFICATION_CONSUMER_GROUP=fulfillment-execution-product-classification come from terraform/locals.tf (sync_edge_env); LOCATION_ROLE_MODE is not set there, so the facility-layout check runs permissive in that cluster.