Skip to main content

Before the first release: node-topology

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.

#ItemStatusDone whenGuarded by
1Real 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 and KAFKA_BROKERS are mandatory (this service consumes nothing, so it has no consumer group id).[x] donecmd/** has no import of the memory or repocontract packages; run(ctx) returns a boot error naming DATABASE_URL or KAFKA_BROKERS before anything opens.TestRuntimeBinaryHasNoInMemoryAdapters, TestRuntimeBinaryDoesNotImportTheRepositoryContract; boot errors in cmd/api/config_test.go and cmd/api/run_test.go.
2No Go file at the repo root. The godog runner is in features/.[x] donels *.go prints nothing; make bdd finds TestFeatures.TestNoGoFilesAtRepoRoot.
3Dockerfile builds every cmd/*. ENTRYPOINT ["./api"] is cmd/api, EXPOSE 8080 is the default HTTP_ADDR.[x] donedocker build . succeeds and docker run --rm <image> exits 1 with missing required environment variable: DATABASE_URL (verified). The build stage digest was moved to the one the sibling services pin, because the template's older digest ships Go 1.27.2 while go.mod requires 1.27.3.trivy-scan / docker-publish jobs.
4.dockerignore excludes docs, harness, test output.[x] doneBuild context is small.none: review once.
5Helm chart charts/node-topology/ with Chart.yaml name: node-topology; chart directory, Chart.yaml name and the helm package file name must all be node-topology.[x] donehelm lint charts/node-topology -f charts/node-topology/ci/default-values.yaml passes (0 failed) and helm template renders the api alone by default (ServiceAccount, Secret, ConfigMap, Service, Deployment; HPA, HTTPRoute and Ingress off); mcp.enabled, a2a.enabled and frontend.enabled add the other components (charts/node-topology/ci/all-components-values.yaml renders all of them). helm package produced node-topology-<version>.tgz; the release job packages the same directory. Verified with Helm v4.3.1 locally; CI pins v3.16.4.helm-lint (pull requests), release.
6DATABASE_URL comes from a Secret, never from the ConfigMap.[x] donehelm template shows secretKeyRef on DATABASE_URL (chart Secret from database.url, or database.existingSecret); MIGRATIONS_DATABASE_URL is an optional secretKeyRef (optional: true); no DSN in the ConfigMap.render_test.sh, test_service_selectors.py.
7Pod hardening and shutdown room. terminationGracePeriodSeconds above the binary's bounds: SHUTDOWN_DRAIN_DELAY (5 s) + HTTP drain (10 s) + relay (10 s) = 25 s, so 30 s or more.[x] doneterminationGracePeriodSeconds: 30 in values and Deployment; the chart refuses to render below 30 s or below config.shutdownDrainDelay + 20 s. Also: runAsNonRoot, readOnlyRootFilesystem, allowPrivilegeEscalation: false, capabilities drop ALL, seccomp RuntimeDefault, /healthz liveness and startup, /readyz readiness.render_test.sh, test_service_selectors.py.
8Chart tests in charts/node-topology/tests/. Every env var cmd/api reads must be rendered: DATABASE_URL, MIGRATIONS_DATABASE_URL, KAFKA_BROKERS, HTTP_ADDR, OUTBOX_RELAY_INTERVAL, OUTBOX_MAX_ATTEMPTS, SHUTDOWN_DRAIN_DELAY, LOG_LEVEL.[x] donebash charts/node-topology/tests/render_test.sh prints PASS; so does python3 charts/node-topology/tests/test_service_selectors.py. The env names are scanned from the binary's own constants (cmd/api, postgres/config.go), so a new variable fails the test until the chart renders it; the test also fails on a ConfigMap or Deployment key the binary does not read, and on a *_MODE or *_CONSUMER_GROUP.chart-tests job.
9Consumer group ids are chart values.[x] n/a, assertedThis service consumes no topic, so there is no *_CONSUMER_GROUP; the chart has no such value, and refuses one injected through extraEnv. render_test.sh fails if the chart renders one, or if cmd/api ever starts reading one.render_test.sh.
10Optional CI jobs match the service. web is in ci.yml (the console remote under web/); there is no docs-api-drift job (the REST reference under docs/docs/api-reference/rest is regenerated by hand with npm run gen-api-docs); api-lint runs the two Spectral rulesets on apis/openapi.yaml and apis/asyncapi.yaml.[x] doneNo job in ci.yml is permanently red or skipped for a missing directory.first PR's CI run.
11Repository secrets DOCKERHUB_USERNAME, DOCKERHUB_TOKEN; GHCR push allowed for the Actions token.[ ] ask the repo adminA dry run of docker-publish on a throwaway branch.none.
12govulncheck is clean before the PR to main.[x] donemake vuln exits 0 after bumping golang.org/x/crypto to v0.56.0 and github.com/moby/go-archive to v0.3.0 (GO-2026-6355, GO-2026-6354, GO-2026-6253, reached through the testcontainers helpers).vuln job.

Follow-up left: the repository secrets (row 11). 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).