Repository navigation
fix(networks,container-agent): gateway-tier wiring, z890 NATS credential out of source, Ollama Cloud triage - #3490
POWERFULMOVES wants to merge 11 commits into
Conversation
docker-compose.z890.yml carried the NATS password inline as a literal:
- NATS_URL=nats://nats:pmoves@nats-leaf:4222
A plaintext credential in a tracked compose file, readable by anyone with
repo access and copied into every image build context that reads it.
Replace with \. The container's environment now comes from
the machine-scoped env file (env.z890), and when that is unset the agent's
NATS probe is skipped and reported as nats_probe_enabled=false rather than
silently failing.
Operator action on z890: set Z890_NATS_URL in env.z890 to restore the probe.
env.shared.example shipped A0_MCP_SUPABASE_URL=http://kong:8000 to every new node. There is no 'kong' DNS record anywhere in the stack - Kong's only aliases are 'supabase-kong' and 'pmoves-supabase-kong-1' - so every freshly provisioned node inherited an Agent Zero MCP roster pointing at a hostname that cannot resolve. Verified on 4090: 'kong' returns NO-RESOLVE from containers on pmoves_api and NXDOMAIN from containers off it, while 'supabase-kong' resolves to 172.30.1.3.
n8n, n8n-runners and n8n-db were the last three services attached to the legacy cataclysm-net network. Move them onto the documented tiers: n8n -> pmoves_api, pmoves_app, pmoves_data, pmoves_external n8n-runners -> pmoves_api, pmoves_app, pmoves_external n8n-db -> pmoves_data n8n also defaulted SUPABASE_REST_URL and SUPA_REST_URL to http://postgrest:3000. That hostname does not exist (the service is 'supabase-postgrest', with alias 'rest'), so the default was dead. It only appeared to work because env.shared overrides the value; any node without that override got an unroutable URL. Verified after the change on 4090: cataclysm-net has zero attached containers.
Kong listens only on pmoves_api and pmoves_public. Three services that consume
the Supabase REST/Auth API were not on either internal tier, so they could not
resolve 'supabase-kong' at all:
supabase-vector was pmoves_data only. All seven of its log sinks point at
http://analytics:4000/..., and the 'analytics' alias exists
ONLY on pmoves_api. Measured from inside the container:
'analytics -> FAIL'. Database, auth and realtime logs were
being dropped silently.
publisher-discord calls supabase_common.upsert_row() (main.py:261). The write
is wrapped in try/except that only logs a warning, so the
failure was invisible.
tokenism-ui was pmoves_app only, resolving neither supabase-kong nor
postgrest.
Documented basis: DOCKER_NETWORK_HARDENING.md - 'any service that resolves
cross-tier hostnames must dual-attach'; pmoves_api is the API gateway tier.
PMOVES_NETWORKS declarations updated in lockstep, because the services read
that variable to decide which networks they believe they are on - leaving it
stale makes on_network('pmoves_api') return False while Docker has attached it.
tensorzero-ui is deliberately NOT given pmoves_api: topology_policy_manifest.json
requires 'pmoves_app, pmoves_data, pmoves_external' for it, and it has no
Supabase call path.
…llama Cloud triage
The container agent could only ever describe one node. Probe targets were
hardcoded to the 5090/z890 layout (nats-leaf, pmoves-ollama,
host.docker.internal:7422) and its health rule required at least one upstream
to be reachable:
healthy = dns_ok > 0 and nats_ok and upstream_ok > 0
Every laptop or edge node legitimately has no upstream path, so it reported
permanently unhealthy. Both are fixed.
Probe topology is now environment-driven (CA_DNS_TARGETS, CA_LOCAL_SERVICES,
CA_UPSTREAM_SERVICES are JSON), with the old layout as defaults so z890 keeps
working unchanged. Additions:
/config effective probe configuration (no secrets) - makes a node's
monitoring coverage auditable instead of implicit
/analyze routes the diagnostic through Ollama Cloud when
OLLAMA_CLOUD_BASE_URL + OLLAMA_CLOUD_API_KEY are set; returns 503
with an explicit reason otherwise, so an unconfigured deployment
fails visibly rather than silently degrading
Also: NATS_URL no longer defaults to a credentialed URL, POST /diagnostic is
serialised behind a lock, and the heartbeat loop exits cleanly when no NATS
URL is configured instead of spinning on reconnect.
Deployed and verified on laptop-4090: healthy true, dns 7/7, local 5/5,
upstream 2/2, nats connected. First run immediately caught a dead
'supabase-postgrest' probe target in the n8n compose defaults.
Registry: node_affinity corrected from [kvm4-1, kvm2, jetson] to
[z890, laptop-4090] - the entry described itself as deployed on z890 while
claiming three nodes it has never run on.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 1
Please check the settings in the CodeRabbit UI or the
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Docker Hardening ValidationHardening Validation ReportValidated: Thu Nov 19 20:19:20 UTC 2026Services CheckedPMOVES.AI compose hardening ratchet[INFO] Checking: /home/runner/work/PMOVES.AI/PMOVES.AI/pmoves/docker-compose.hardened.yml [INFO] Validating: agent-zero [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: comfy-watcher [INFO] Validating: deepresearch [INFO] Validating: extract-worker [INFO] Validating: ffmpeg-whisper [INFO] Validating: grayjay-plugin-host [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: invidious-companion-proxy [INFO] Validating: jellyfin-bridge [INFO] Validating: langextract [INFO] Validating: media-audio [INFO] Validating: media-video [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: notebook-sync [INFO] Validating: p7-room-orchestrator [INFO] Validating: pdf-ingest [INFO] Validating: pmoves-yt [INFO] Validating: presign [INFO] Validating: publisher-discord [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: supaserch =================================== |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d765170b03
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…efore /analyze, OpenAI-compatible endpoint, profile-gate the 8111 binding, no unregistered Z890_NATS_URL - /analyze serialised the diagnostic report verbatim, including NATS_URL userinfo, into a request to Ollama Cloud. _redact() strips user:password@ from every string. - The documented OLLAMA_CLOUD_BASE_URL (https://ollama.com/v1) is OpenAI-compatible: post to /chat/completions and read choices[0]; a bare host keeps native /api/chat. - container-agent in docker-compose.yml bound 127.0.0.1:8111 unconditionally while gateway-agent (profiles: [agents]) binds 8111 too. Gate it behind profiles: [container-agent]; collision note updated (mutually exclusive by profile). - docker-compose.z890.yml: drop NATS_URL=${Z890_NATS_URL:-}. It overrode env.z890 with an empty value on existing installs and introduced an unregistered secret label. NATS_URL now comes from env_file only; the plaintext credential stays out of source. - Split overlays regenerated (compose-split). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry ratchet), register core/monolith compose files Taken under Known Road compose:pr:3490. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Damage-control disclosure (4090-Claude, 2026-11-19). Some compose edits in this PR were made by a Python script in a non-project clone ( |
Docker Hardening ValidationHardening Validation ReportValidated: Thu Nov 19 21:54:01 UTC 2026Services CheckedPMOVES.AI compose hardening ratchet[INFO] Checking: /home/runner/work/PMOVES.AI/PMOVES.AI/pmoves/docker-compose.hardened.yml [INFO] Validating: agent-zero [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: comfy-watcher [INFO] Validating: deepresearch [INFO] Validating: extract-worker [INFO] Validating: ffmpeg-whisper [INFO] Validating: grayjay-plugin-host [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: invidious-companion-proxy [INFO] Validating: jellyfin-bridge [INFO] Validating: langextract [INFO] Validating: media-audio [INFO] Validating: media-video [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: notebook-sync [INFO] Validating: p7-room-orchestrator [INFO] Validating: pdf-ingest [INFO] Validating: pmoves-yt [INFO] Validating: presign [INFO] Validating: publisher-discord [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: supaserch =================================== |
…alidate Compose Files) Output of scripts/inject_pmoves_networks.py and make compose-split; no hand edits. Normalises the container-agent block to the file's list indentation. Taken under Known Road compose:pr:3490. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Docker Hardening ValidationHardening Validation ReportValidated: Thu Nov 19 21:58:07 UTC 2026Services CheckedPMOVES.AI compose hardening ratchet[INFO] Checking: /home/runner/work/PMOVES.AI/PMOVES.AI/pmoves/docker-compose.hardened.yml [INFO] Validating: agent-zero [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: comfy-watcher [INFO] Validating: deepresearch [INFO] Validating: extract-worker [INFO] Validating: ffmpeg-whisper [INFO] Validating: grayjay-plugin-host [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: invidious-companion-proxy [INFO] Validating: jellyfin-bridge [INFO] Validating: langextract [INFO] Validating: media-audio [INFO] Validating: media-video [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: notebook-sync [INFO] Validating: p7-room-orchestrator [INFO] Validating: pdf-ingest [INFO] Validating: pmoves-yt [INFO] Validating: presign [INFO] Validating: publisher-discord [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: supaserch =================================== |
Docker Hardening ValidationHardening Validation ReportValidated: Thu Nov 19 23:39:34 UTC 2026Services CheckedPMOVES.AI compose hardening ratchet[INFO] Checking: /home/runner/work/PMOVES.AI/PMOVES.AI/pmoves/docker-compose.hardened.yml [INFO] Validating: agent-zero [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: comfy-watcher [INFO] Validating: deepresearch [INFO] Validating: extract-worker [INFO] Validating: ffmpeg-whisper [INFO] Validating: grayjay-plugin-host [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: invidious-companion-proxy [INFO] Validating: jellyfin-bridge [INFO] Validating: langextract [INFO] Validating: media-audio [INFO] Validating: media-video [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: notebook-sync [INFO] Validating: p7-room-orchestrator [INFO] Validating: pdf-ingest [INFO] Validating: pmoves-yt [INFO] Validating: presign [INFO] Validating: publisher-discord [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: supaserch =================================== |
…egenerate docker matrix, stop quoting the removed NATS credential - docker-compose.yml container-agent used mapping-form environment; the repo's _ComposeFile model (node-registry tests + runbook_drift mutation-kill) accepts only the list form. Converted to '- KEY=value'; values unchanged. - configs/topology/docker_matrix.yaml regenerated (build_docker_matrix.py) for the new container-agent service. - app.py comment quoted the user:password default removed in #3139, tripping test_no_hardcoded_nats_credentials. Reworded without the literal. - Networks wiring + split overlays regenerated. Local: test_no_hardcoded_nats_credentials + test_node_registry_deployment 10/10, docker-matrix staleness test 19/19, port ratchet, encoding ratchet, inject_pmoves_networks --check all pass. Taken under Known Road compose:pr:3490. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Docker Hardening ValidationHardening Validation ReportValidated: Fri Nov 20 00:08:34 UTC 2026Services CheckedPMOVES.AI compose hardening ratchet[INFO] Checking: /home/runner/work/PMOVES.AI/PMOVES.AI/pmoves/docker-compose.hardened.yml [INFO] Validating: agent-zero [INFO] Validating: archon [INFO] Validating: channel-monitor [INFO] Validating: comfy-watcher [INFO] Validating: deepresearch [INFO] Validating: extract-worker [INFO] Validating: ffmpeg-whisper [INFO] Validating: grayjay-plugin-host [INFO] Validating: hi-rag-gateway-gpu [INFO] Validating: hi-rag-gateway-v2 [INFO] Validating: hi-rag-gateway-v2-gpu [INFO] Validating: invidious-companion-proxy [INFO] Validating: jellyfin-bridge [INFO] Validating: langextract [INFO] Validating: media-audio [INFO] Validating: media-video [INFO] Validating: mesh-agent [INFO] Validating: nats-echo-req [INFO] Validating: nats-echo-res [INFO] Validating: notebook-sync [INFO] Validating: p7-room-orchestrator [INFO] Validating: pdf-ingest [INFO] Validating: pmoves-yt [INFO] Validating: presign [INFO] Validating: publisher-discord [INFO] Validating: render-webhook [INFO] Validating: retrieval-eval [INFO] Validating: supaserch =================================== |
|
Partial verification at Test plan, item 1 (read-only): Items 2-3 (rebuild container-agent, recreate n8n/Supabase consumers) are not done. The 4090 has a parked no-recreate rule because of compose drift across three checkouts, so this needs the operator or another node. Leaving this PR unmerged until then. |
Opens the pushed-but-unopened branch from 4090-Claw (2026-11-17). Found in a local-work review on the 4090; branch merges cleanly into current main (5 ahead / 8 behind).
Commits
aaa540dbcfix(security): remove the inline NATS credential fromdocker-compose.z890.yml; the URL now comes fromZ890_NATS_URLin the machine env file, and the probe reportsnats_probe_enabled=falsewhen it is unset. Operator action on Z890: setZ890_NATS_URL. The removed value was the default NATS password and remains in history, so rotating it is worth considering.1a6c99464docs(env): correct a dead Kong hostname inenv.shared.example.57cd01aeffix(networks): retirecataclysm-netfor the n8n stack.fa2d360c8fix(networks): attach Supabase API consumers to the gateway tier.d765170b0feat(container-agent): node-agnostic probes, corrected health rule, and an Ollama Cloud triage endpoint (POST /analyze, enabled only whenOLLAMA_CLOUD_BASE_URLandOLLAMA_CLOUD_API_KEYare set).Review notes
pmovesproject is currently split across three checkouts, so roll this out per node deliberately, not through a blanket recreate.:8111) is the older build;/analyzearrives only after a rebuild.Test plan
docker compose configresolves on each node profile (z890, 4090) with no new unset-variable warnings beyondZ890_NATS_URL/healthz,/config,/diagnosticafter rebuild;/analyzereturns the disabled hint when the Ollama Cloud vars are unset🤖 Generated with Claude Code