Before the first release: node-performance
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 | Status | Done when | Guarded by |
|---|---|---|---|---|
| 1 | Real runtime only. cmd/api wires Postgres and Kafka and nothing else; the test doubles under internal/adapters/outbound/memory are never imported by cmd/**. DATABASE_URL, KAFKA_BROKERS and the six *_CONSUMER_GROUP variables are mandatory. | [x] done | cmd/** has no import of the memory or repocontract packages; run(ctx) returns a boot error naming the missing variable before anything opens. | TestRuntimeBinaryHasNoInMemoryAdapters (internal/architecture/runtime_no_memory_fitness_test.go); cmd/api/config_test.go. |
| 2 | No Go file at the repo root. The godog runner is in features/. | [x] done | ls *.go prints nothing; make bdd finds TestFeatures. | TestNoGoFilesAtRepoRoot. |
| 3 | Dockerfile builds every cmd/*. ENTRYPOINT ["./api"] is cmd/api, EXPOSE 8080 is the default HTTP_ADDR. | [x] done | docker build . succeeds. The build stage digest is the one the sibling services pin (the template's older digest ships a Go older than the go 1.27.3 of go.mod). | trivy-scan / docker-publish jobs. |
| 4 | .dockerignore excludes docs, harness, test output. | [x] done | Build context is small. | none: review once. |
| 5 | Helm chart charts/node-performance/ with Chart.yaml name: node-performance; chart directory, Chart.yaml name and the helm package file name must all be node-performance. | [x] done | helm lint charts/node-performance -f charts/node-performance/ci/default-values.yaml, ct lint and helm template with the required values pass; helm package writes node-performance-<version>.tgz. One component by default (api: Deployment, Service, ConfigMap, Secret or database.existingSecret, ServiceAccount; HPA, Ingress and HTTPRoute default off); mcp, a2a and frontend are opt-in components, off by default. | helm-lint (pull requests), release. |
| 6 | DATABASE_URL comes from a Secret, never from the ConfigMap. | [x] done | helm template shows secretKeyRef for DATABASE_URL (from database.url via the chart Secret, or database.existingSecret) and an optional: true one for MIGRATIONS_DATABASE_URL; neither is ever in the ConfigMap; the chart refuses to render with neither source. | render_test.sh (row 8). |
| 7 | Pod hardening and shutdown room. terminationGracePeriodSeconds above the binary's bounds: SHUTDOWN_DRAIN_DELAY (5 s) + HTTP drain (10 s) + consumers and scheduler (10 s) + relay (10 s) = 35 s, so 40 s or more. | [x] done | terminationGracePeriodSeconds: 40 in values and Deployment; the chart refuses less than config.shutdownDrainDelay + 35 s (drain + 10 + 10 + 10 + 5 s margin). Pod: runAsNonRoot, uid 1000, readOnlyRootFilesystem, no privilege escalation, capabilities dropped (ALL), seccomp RuntimeDefault; probes /healthz (liveness, startup) and /readyz (readiness). | render_test.sh (row 8). |
| 8 | Chart tests in charts/node-performance/tests/. Every env var cmd/api reads must be rendered: DATABASE_URL, MIGRATIONS_DATABASE_URL, KAFKA_BROKERS, the six *_CONSUMER_GROUP, HTTP_ADDR, RECOMPUTE_INTERVAL, OUTBOX_RELAY_INTERVAL, OUTBOX_MAX_ATTEMPTS, SHUTDOWN_DRAIN_DELAY, LOG_LEVEL. | [x] done | bash charts/node-performance/tests/render_test.sh prints PASS (every env var scanned from cmd/api/config.go and the Postgres adapter is rendered in the Deployment and, except the two DSNs, in the ConfigMap; no dead ConfigMap key; no *_MODE; refusals); python3 charts/node-performance/tests/test_service_selectors.py prints PASS (the Service selects exactly one Deployment). | chart-tests job (every tests/*.sh and test_*.py), helm-lint. |
| 9 | Consumer group ids are chart values, stable and service-prefixed, never derived from the pod name: VENDOR_CONNECTIVITY_CONSUMER_GROUP, SHIPPING_AND_TRACKING_CONSUMER_GROUP, DELIVERY_PROMISE_CONSUMER_GROUP, OFFER_AVAILABILITY_CONSUMER_GROUP, NODE_TOPOLOGY_CONSUMER_GROUP, SELLER_INBOUND_CONSUMER_GROUP. | [x] done | Each is rendered from config.* (vendorConnectivityConsumerGroup, shippingAndTrackingConsumerGroup, deliveryPromiseConsumerGroup, offerAvailabilityConsumerGroup, nodeTopologyConsumerGroup, sellerInboundConsumerGroup) and the chart refuses to render an empty one, one that is an env expansion such as $(POD_NAME), or one overridden through extraEnv. ci/default-values.yaml uses node-performance-<topic> ids. | render_test.sh (row 8); kafka-testing-and-consumers.md rule. |
| 10 | Optional CI jobs match the service. web runs the web/ suite; docs-api-drift is not in ci.yml (the generated REST reference of the docs site is regenerated by npm run gen-api-docs, see Quickstart); api-lint runs the two Spectral rulesets on apis/openapi.yaml and apis/asyncapi.yaml. | [x] done | No job in ci.yml is permanently red or skipped for a missing directory. | first PR's CI run. |
| 11 | Repository secrets DOCKERHUB_USERNAME, DOCKERHUB_TOKEN; GHCR push allowed for the Actions token. | [ ] ask the repo admin | A dry run of docker-publish on a throwaway branch. | none. |
| 12 | govulncheck is clean before the PR to main. | [x] done | make vuln exits 0 after bumping golang.org/x/crypto to v0.56.0 and github.com/moby/go-archive to v0.3.0 (reached through the testcontainers helpers), the same bump the sibling services use. | vuln job. |
Follow-up left: the repository secrets (row 11). The Helm chart and its tests (rows 5-9) are done. Keep this file: it is the
service's packaging record. It prevents three failures: 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).