Before the first release: delivery-promise
The first merge to main runs docker-publish and release. Two services built from
this template (pick-face-replenishment, task-interleaving) each needed a rework because
packaging was missing or wrong when that moment came. Work through this list on a feature
branch, before the first develop → main PR. Delete a row only when the service
really does not have that part, and say so in the PR.
new-service.sh already generated Dockerfile and .dockerignore for you (verbatim from
the fleet reference). The chart is NOT generated: it is shaped by what the service runs
(consumer groups, MCP, analytics, frontend), so copy the closest sibling's
charts/<repo>/ and adapt it. References on origin/develop:
IQVO/pick-face-replenishment (Kafka consumers, MCP, analytics, frontend) and
IQVO/task-interleaving.
| # | Item | Done when | Guarded by |
|---|---|---|---|
| 1 | Real runtime only. cmd/api wires Postgres and Kafka; the in-memory adapters (internal/adapters/outbound/memory) are test doubles. No *_MODE/permissive fallback, no default that boots "healthy" without DATABASE_URL or KAFKA_BROKERS. | cmd/** has no import of the memory package; the binary exits at boot on missing DATABASE_URL, KAFKA_BROKERS or a consumer group id. | TestRuntimeBinaryHasNoInMemoryAdapters (internal/architecture/runtime_no_memory_fitness_test.go). The boot-error behaviour has no generic sensor: cover it in cmd/api tests and in the chart test (row 8). |
| 2 | No Go file at the repo root. The godog runner and steps live in features/ (package features_test, Paths: "."), binaries in cmd/<name>/, everything else in internal/. | ls *.go at the root prints nothing; make bdd still finds TestFeatures. | TestNoGoFilesAtRepoRoot (internal/architecture/no_go_files_at_root_fitness_test.go). |
| 3 | Dockerfile builds every cmd/*. Generated; it builds api, mcp and a2a into one image, ENTRYPOINT ["./api"] and EXPOSE 8080 8090 8093 (the chart overrides the command for the mcp and a2a Deployments). | docker build . succeeds locally; docker run --rm <image> /app/api starts (or exits with the intended config error). | docker-publish builds the image on push to main; there is no separate trivy-scan job in ci.yml. |
| 4 | .dockerignore excludes docs, charts, harness, tests output. Generated. | Build context is small; .git, .claude/, docs/, charts/ are not sent. | none: review once. |
| 5 | ✅ Helm chart charts/delivery-promise/ with Chart.yaml name: delivery-promise. The chart directory name, the Chart.yaml name and the helm package file name in the release job must all be delivery-promise. | helm lint charts/delivery-promise and helm template with the required values both pass. | helm-lint (PRs) and the release job (packages delivery-promise-<version>.tgz). |
| 6 | ✅ DATABASE_URL comes from a Secret (secretKeyRef, chart secret.yaml or database.existingSecret), never from the ConfigMap or a literal. | helm template shows secretKeyRef for DATABASE_URL; the ConfigMap has no DSN. | chart test (row 8). |
| 7 | ✅ Pod hardening and shutdown room. runAsNonRoot, readOnlyRootFilesystem: true, allowPrivilegeEscalation: false, capabilities.drop: [ALL]; terminationGracePeriodSeconds greater than the sum of the binary's shutdown bounds (drain delay + HTTP + consumers + relay). | Values and Deployment carry all of it; the chart refuses a grace period below the sum. | chart test (row 8). |
| 8 | ✅ Chart tests in charts/delivery-promise/tests/ (render_test.sh, test_service_selectors.py): envFrom ConfigMap mounted, mandatory values refuse to render, every env var cmd/api reads is rendered, no *_MODE, Secret for the DSN, hardening, grace period, every Service selects exactly one Deployment. Copy and adapt the reference tests. | bash charts/delivery-promise/tests/render_test.sh prints PASS. | chart-tests job runs every tests/*.sh and test_*.py. It only warns when the directory is empty, so an absent test passes CI: the checklist is the guard. |
| 9 | ✅ Consumer group ids are chart values, stable and service-prefixed, never derived from the pod name. | Each *_CONSUMER_GROUP is rendered from config.* and refuses to render empty. | chart test (row 8); kafka-testing-and-consumers.md rule. |
| 10 | Optional CI jobs match the service. web (needs web/), docs-api-drift (needs docs/ and apis/openapi.yaml), api-lint (needs apis/*.yaml and the spectral rulesets): delete a job and its docker-publish needs: entry if the service has no such part, or add the part. | No job in ci.yml is permanently red or skipped for a missing directory. | first PR's CI run. Today ci.yml has web and api-lint and no docs-api-drift; the documentation site builds in .github/workflows/docs.yml. |
| 11 | Repository secrets DOCKERHUB_USERNAME, DOCKERHUB_TOKEN exist on the repo; GHCR push is allowed for the Actions token. | A dry-run of docker-publish on a throwaway branch, or ask the repo admin. | none. |
| 12 | govulncheck is clean before the PR to main (CI vuln job installs @latest; make vuln runs the same command). | make vuln exits 0. | vuln job (a docker-publish prerequisite). |
Tick this list in the PR that adds Dockerfile/chart wiring, and keep the file: it is the
service's packaging record. Reference for the three failures this list prevents: a runtime that
can run without Postgres/Kafka (row 1), Go files at the root (row 2), a release that fails on
the first push to main because packaging was never built (rows 3-8).
Status (2026-10-23)
Rows 5-9 are done (the work landed from feature/chart; the rows are re-checked against the chart on develop as of the docs-site refresh):
| # | Evidence |
|---|---|
| 5 | charts/delivery-promise/Chart.yaml name: delivery-promise; helm lint charts/delivery-promise -f ci/default-values.yaml and -f ci/optional-templates-values.yaml pass (Helm v4.3.1; ct lint passes too); helm template renders with the three required values; helm-lint CI job restored (PRs only, no hashFiles); the release job packages delivery-promise-<version>.tgz. |
| 6 | DATABASE_URL is a secretKeyRef to database.existingSecret or the chart's own -database Secret; MIGRATIONS_DATABASE_URL is an optional secretKeyRef; the ConfigMap holds no DSN (asserted in render_test.sh). |
| 7 | runAsNonRoot, readOnlyRootFilesystem: true, allowPrivilegeEscalation: false, capabilities.drop: [ALL], seccompProfile: RuntimeDefault; terminationGracePeriodSeconds 60, refused unless greater than drain delay + HTTP 10 s + consumer, sweeper and relay 10 s each (bounds read from cmd/api/config.go by the test). |
| 8 | bash charts/delivery-promise/tests/render_test.sh prints PASS (envFrom mount, every variable cmd/api reads is rendered and no ConfigMap key is dead, no *_MODE, Secret DSN, hardening, grace period, refusals); python3 charts/delivery-promise/tests/test_service_selectors.py prints PASS; both run in the chart-tests job. |
| 9 | config.consumerGroup renders DELIVERY_PROMISE_CONSUMER_GROUP (this binary has ONE consumer group for its eight topics) and refuses to render empty. |
Row 11 (registry secrets) stays open: ask the repo admin; the secrets cannot be seen or created from here.