Containerfile, compose and a kustomize base with a NetworkPolicy #18
Labels
No labels
boundary:crosses
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/messages-mind-mcp#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #6. Records: ADR 0001 (
docs/adr/0001-service-and-read-only-scope.md), ADR 0007 (docs/adr/0007-store-encryption-and-backup.md), ADR 0009 (docs/adr/0009-image-release-and-supply-chain.md).What to build
The deploy shape of the sibling minds, one instance per person, without a backup container.
syncandapion one volume. Tokens, the store key and the Tombstone salt are mounted as files. The fake Feeder stands in for the Source, so the stack runs on any machine.Acceptance criteria
Blocked by
Filed under: operator word "go" sha256:4cd0e21a9a07
⏸ SVD architect gate: dev/messages-mind-mcp#18 containerfile-compose-and-a-kustomize-base-with-a-networkpol
Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity
substrate· dispatch efforthighRun:
20261113T113333Z-8a36bfa4Held because: CLEAN but 9 open risk(s) (4 verification · 5 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
install -m 0400each process's Secret subset into its own memory emptyDir; only the init containers mount the Secret, and this passes PSS restricted. Question: accept the init-copy, or relax kit/secrets.py for fsGroup-readable files in a separate issue (which weakens a control)? Live check:kubectl exec deploy/messagesmind -c api -- stat -c '%a %u %n' /run/secrets/messagesmind/*prints400 10001for read-token, store-key and tombstone-salt only, and the pod becomes Ready. [decision]which docker podmanfinds neither) or in CI (python-slim lane, no engine; .woodpecker may-not-mutate). Check on a host with Docker Compose v2 from a clean clone:docker compose up -d --build && docker compose --profile smoke run --rm smokeprintssmoke=ok messages=<N>with N>0 and exits 0. Secret files in the api container are 0o400 and owned by uid 10001. The api starts with a read-only root filesystem (no fastmcp home-dir write). [verification]grep -rn -i 'bucket|export' srcmatches only face.py's rate-limiter token bucket). The lean keeps the rule with RFC 5737 placeholders and a comment. Question: keep an egress rule nothing uses until the exporter lands, or drop it until then? [decision]kubectl -n messagesmind-example exec deploy/messagesmind -c api -- /app/.venv/bin/python -c "import socket; socket.create_connection(('192.0.2.200', 443), timeout=5)"must time out, and the positive control from -c sync to the Feeder address:port must connect. [verification]docker buildx imagetools inspect ghcr.io/astral-sh/uv:0.12.17, and pin the index digest. If it cannot, dispatch halts instead of falling back to an unpinned tag. A wrong digest surfaces as a build failure in the AC1 host run. [verification]codex-svd rebaselineon README.md before dispatch. [decision]ls /Users/piers/src/mail-mind-mcpreturns Operation not permitted). The lean comes from this repo's contracts and ADRs. Check at the gate or in PR review: compare the label keys, the deploy/kubernetes/{base,overlays} layout and the registry path with the siblings' deploy trees, and record any deliberate divergence in the PR. [verification]Change: Containerfile: build in two stages, both FROM the CI image (.woodpecker/validation.yaml:43, python:3.12-slim-bookworm@sha256:6236…). Install with uv 0.12.17, which is the CI version, from a digest-pinned ghcr.io/astral-sh/uv image. The install is
uv sync --no-dev --no-install-projectwith UV_LOCKED=1, so every package is checked against the hashes in uv.lock and hatchling is never fetched. Copy src/messages_mind_mcp into the venv's site-packages. Run as USER 10001:10001 with ENTRYPOINTpython -m messages_mind_mcp.cli(cli.py:97-98). Two configs give least privilege: sync.toml has [feeder] and no [auth]; api.toml has [auth] and no [feeder] (config.py:160-176, startup.py:52-72). Compose: one-shotsecrets, then the fake Feeder, sync, api (127.0.0.1:8420) and asmokeprofile. Their helpers come from a new tests/compose_stack.py (feeder/secrets/smoke verbs). It follows feeder_fake.py:381-411 for serving and conftest.py:288-289 for the client. It writes synthetic 0400 secrets into per-process named volumes, mounted under image directories that 10001 owns. Kubernetes base: one Deployment with replicas 1 and Recreate, holding sync and api containers. Two non-root init containers copy each process's Secret subset into its own memory emptyDir withinstall -m 0400, because with fsGroup kubelet makes Secret files 0440 and kit/secrets.py:30 refuses group bits. There is a PVC and a Service. The NetworkPolicy allows ingress TCP 8420 and egress only to the Feeder ipBlock:8421 and the bucket ipBlock:443, with RFC 5737 placeholders in the base. The example overlay sets the namespace, a configMapGenerator for the two TOMLs, a digest-pinned image, one JSON6902 replace patch for the CIDRs, and a README with the Secret command and the live NetworkPolicy check. tests/test_deploy.py mirrors tests/test_layout.py:13-44. It checks: no env or envFrom, and no compose environment or env_file (with walker self-checks); no Secret object; every TOML loads through load_config; the kustomize structure; digest pins and non-root; the effective patched NetworkPolicy, including the Feeder URL inside its CIDR; no Mirror copy; probes use /healthz with an allowed Host; and secret generation is owner-only and idempotent. README: edit the CI and Releases-and-deploy sections plus lines 7 and 34, keeping every sentence an existing test reads. pyproject: add yaml to the mypy override.Files:
Containerfile·compose.yaml·deploy/compose/sync.toml·deploy/compose/api.toml·tests/compose_stack.py·deploy/kubernetes/base/kustomization.yaml·deploy/kubernetes/base/messagesmind.yaml·deploy/kubernetes/base/networkpolicy.yaml·deploy/kubernetes/overlays/example/kustomization.yaml·deploy/kubernetes/overlays/example/sync.toml·deploy/kubernetes/overlays/example/api.toml·deploy/kubernetes/overlays/example/README.md·tests/test_deploy.py·README.md·pyproject.tomlDecision: accept the 9 open risk(s) above and dispatch this spec (
svd:go), or park (svd:skip) / re-spec (svd:respec)?Your call (when this issue is held at the gate via
svd:hold):svd:go— approve; Half-B dispatch accepts exactly this spec (open risks accepted)svd:firebesidesvd:go— approve AND authorise the Half-B fire from the phone; never on its ownsvd:skip— park it; dispatch refuses it and the issue stays for a humansvd:respec— discard this spec; the next Half-A run re-produces it with this record as prior-attempt contextSpec:
/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-13-containerfile-compose-and-a-kustomize-base-with-a-networkpol.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-13-containerfile-compose-and-a-kustomize-base-with-a-networkpol.md[feeder]keys, the client limits and the codes in the README #32spec-verify-dispatch Half B for dev/messages-mind-mcp#18 containerfile-compose-and-a-kustomize-base-with-a-networkpol completed integration verify.
abd3005b1acodex-svd ship --run-id 20261113T130908Z-df6acecc --confirm-merge)read_secret_file#42spec-verify-dispatch Half B for dev/messages-mind-mcp#18 containerfile-compose-and-a-kustomize-base-with-a-networkpol completed integration verify.
b116792f9acodex-svd ship --run-id 20261113T215759Z-8c67634f --confirm-merge)