[FEATURE] Security Phase 2 - PyTorch 2.6, Docker hardening, env migration - #443
Merged
POWERFULMOVES merged 12 commits intoJan 3, 2026
Merged
Conversation
Phase 2 of env consolidation: API tier migration Changes: - Fix tier anchor syntax (block-style env_file with required: false) - Migrate postgrest, presign, retrieval-eval to <<: *env-tier-api - Create env.tier-api.example with secure defaults API tier services receive data tier URLs and internal credentials only, no external API keys (OPENAI_API_KEY, etc.) Services migrated: - postgrest: PostgREST database gateway - presign: MinIO URL presigner - retrieval-eval: Hi-RAG evaluation service 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Codex Agent <codex-agent@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Phase 3 of env consolidation: LLM tier migration Changes: - Fix tier anchor syntax (block-style env_file with required: false) - Migrate tensorzero-ui to <<: *env-tier-llm - Create env.tier-llm.example with all LLM provider API keys CRITICAL: LLM tier is the ONLY tier with access to external API keys. All other services call TensorZero internally, not providers directly. Services in LLM tier: - tensorzero-gateway: Already using <<: *env-tier-llm - tensorzero-ui: Migrated from legacy env_file - tensorzero-clickhouse: Uses inline env (no API keys needed) - pmoves-ollama: Uses inline env (no API keys needed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Codex Agent <codex-agent@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Completes the 6-tier environment consolidation by migrating: **Agent Tier (10 services):** - mesh-agent, deepresearch, supaserch, consciousness-service - archon-agent-work-orders, botz-gateway, publisher-discord - messaging-gateway, jellyfin-bridge, chat-relay **API Tier Additions (4 services):** - postgrest-cli, hi-rag-gateway, hi-rag-gateway-gpu, hi-rag-gateway-v2-gpu **Worker Tier (6 services) - included in this commit:** - render-webhook, comfy-watcher, pdf-ingest, langextract - notebook-sync, session-context-worker **Media Tier (10 services) - included in this commit:** - ultimate-tts-studio, flute-gateway, ffmpeg-whisper - media-video, media-audio, channel-monitor - invidious, invidious-companion, grayjay-plugin-host, grayjay-server Security improvement: 30 services now use tier-based env_file anchors instead of legacy x-env-legacy pattern. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Codex Agent <codex-agent@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…e pins, required password) (#355) * docs: address PR review comments for env tier consolidation - Add GPU Orchestrator and E2B Runner to services-catalog.md - Add gpu-orchestrator to env.tier-api.example service list - Create learnings file documenting 6-tier env architecture - Add env.tier-*.example files for worker, media, agent tiers Addresses nitpick comments from PRs #349-354. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(gpu): ensure GPU access for all CUDA-enabled services - gpu-orchestrator: Add GPU deploy section + NVIDIA_VISIBLE_DEVICES - ultimate-tts-studio: Add NVIDIA_VISIBLE_DEVICES env var - hi-rag-gateway-gpu: Add NVIDIA_VISIBLE_DEVICES env var - hi-rag-gateway-v2-gpu: Add NVIDIA_VISIBLE_DEVICES env var - media-audio: Change base image to nvidia/cuda:12.4.1-runtime-ubuntu22.04 (was python:3.11-slim which caused silent CPU fallback) This fixes silent CPU fallbacks where PyTorch CUDA packages were installed but the CUDA runtime was not available in the container. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(security): production hardening - health checks and image pinning Critical security and reliability fixes: 1. **POSTGRES_PASSWORD now required** - Changed from insecure default `:-pmoves` to required syntax `${VAR:?error}`. Compose will fail if POSTGRES_PASSWORD is not set (lines 59, 78, 937). 2. **Pinned 8 :latest images to specific versions:** - postgrest/postgrest:latest → v12.2.3 - minio/minio:latest → RELEASE.2024-12-18T13-15-44Z - ollama/ollama:latest → 0.5.4 - tensorzero/gateway:latest → 2024.12.18 - tensorzero/ui:latest → 2024.12.18 - invidious:latest → 2024.12.09 - invidious-companion:latest → 2024.12.20 - grayjay:latest → 2024.11.01 3. **Added health checks to 37 services** (52 total, up from 15): - Data tier: qdrant, meilisearch, minio - API tier: hi-rag-*, retrieval-eval, presign, render-webhook - Worker tier: extract-worker, pdf-ingest, langextract, notebook-sync, ffmpeg-whisper, media-video, media-audio, pmoves-yt, channel-monitor - Agent tier: agent-zero, mesh-agent, deepresearch, supaserch - TensorZero: gateway, ui, ollama - Others: publisher-discord, messaging-gateway, jellyfin-bridge 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(health): address PR review critical issues Fixes critical issues identified by PR review: MinIO: - Change health check from `mc ready local` to curl-based (minio/minio image doesn't include mc binary) NATS: - Add `-m 8222` flag to enable HTTP monitoring port (health check was targeting port that wasn't enabled) Health checks: - comfy-watcher: verify module imports instead of just `import sys` - mesh-agent: verify main module and NATS client availability Missing start_period: - postgres: add 15s start_period - chat-relay: add 30s start_period - n8n-agent: add 30s start_period - invidious-postgres: add 15s start_period All 52 health checks now have start_period defined. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Codex Agent <codex-agent@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Increase Dockerfile hardening from 33/36 (91.7%) to 35/36 (97.2%): - notebook-sync: Add USER pmoves (user creation already existed) - vibevoice-realtime: Add full hardening with UID/GID 65532 Accepted exception: agent-zero uses root for initialization then drops to pmoves via 'su' for the service process. This pattern is required by upstream Agent Zero's prepare.py and /ins/copy_A0.sh. Pattern reference: flute-gateway/Dockerfile 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Normalize Supabase Kong hostnames to lowercase (DNS convention) - Remove duplicate ARCHON_SUPABASE_BASE_URL env var definition - Fix notebook-sync Dockerfile: remove USER directive so entrypoint can run chown/su as root before dropping privileges - Improve deepresearch _get_or_create_counter: use module-level cache to avoid private prometheus_client API dependency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changes: - Archon health check: Add Kong gateway hostname support for internal Docker networking (supabase_kong_pmoves.ai:8000) - UI dashboard: Add /dashboard redirect page to /dashboard/services - Grafana: Fix env var placeholders and job name mismatches in queries - Docs: Add placeholder for Jellyfin service documentation The Archon health check now properly handles both: - Supabase CLI endpoint (host.docker.internal:65421) - Internal Kong gateway (supabase_kong_pmoves.ai:8000) This resolves the 404 errors in Archon health checks when using internal Docker DNS names instead of host.docker.internal. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add pmoves/data/agent-zero/ to gitignore. This directory contains runtime settings (settings.json) that persist via Docker volume mount. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use registry lookup pattern instead of try/except for counter registration. Prevents 'Duplicated timeseries' error when container restarts with existing registry state. Before: try/except around Counter() creation After: REGISTRY._names_to_collectors.get() for existing lookup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add warning log to Supabase health check exception handler - Improve persona fetch error logging with status code and truncated body - Add metrics tracking for non-200 persona fetch responses Closes #322 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Codex Agent <codex-agent@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Merged after rebase to resolve Jellyfin README conflict
- Add volume mount ./data/agent-zero/tmp:/a0/tmp for settings.json Root cause: PMOVES-Agent-Zero/python/helpers/settings.py:162 stores settings at /a0/tmp/settings.json but path was not mounted - Normalize Archon SUPABASE_URL to lowercase supabase_kong_pmoves.ai Root cause: Docker DNS is case-sensitive on some configurations - Fix archon-agent-work-orders health check: /healthz → /health Root cause: Service exposes /health, not /healthz 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
POWERFULMOVES
merged commit Jan 3, 2026
572c073
into
PMOVES.AI-Edition-Hardened
2 of 3 checks passed
POWERFULMOVES
added a commit
that referenced
this pull request
Jan 18, 2026
…tion (#443) * refactor(env): Phase 2 - Migrate API tier to env-tier-api anchor (#350) Phase 2 of env consolidation: API tier migration Changes: - Fix tier anchor syntax (block-style env_file with required: false) - Migrate postgrest, presign, retrieval-eval to <<: *env-tier-api - Create env.tier-api.example with secure defaults API tier services receive data tier URLs and internal credentials only, no external API keys (OPENAI_API_KEY, etc.) Services migrated: - postgrest: PostgREST database gateway - presign: MinIO URL presigner - retrieval-eval: Hi-RAG evaluation service 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Codex Agent <codex-agent@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * refactor(env): Phase 3 - Migrate LLM tier to env-tier-llm anchor (#351) Phase 3 of env consolidation: LLM tier migration Changes: - Fix tier anchor syntax (block-style env_file with required: false) - Migrate tensorzero-ui to <<: *env-tier-llm - Create env.tier-llm.example with all LLM provider API keys CRITICAL: LLM tier is the ONLY tier with access to external API keys. All other services call TensorZero internally, not providers directly. Services in LLM tier: - tensorzero-gateway: Already using <<: *env-tier-llm - tensorzero-ui: Migrated from legacy env_file - tensorzero-clickhouse: Uses inline env (no API keys needed) - pmoves-ollama: Uses inline env (no API keys needed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Codex Agent <codex-agent@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * refactor(env): Phase 6 - Migrate agent tier + API additions (#354) Completes the 6-tier environment consolidation by migrating: **Agent Tier (10 services):** - mesh-agent, deepresearch, supaserch, consciousness-service - archon-agent-work-orders, botz-gateway, publisher-discord - messaging-gateway, jellyfin-bridge, chat-relay **API Tier Additions (4 services):** - postgrest-cli, hi-rag-gateway, hi-rag-gateway-gpu, hi-rag-gateway-v2-gpu **Worker Tier (6 services) - included in this commit:** - render-webhook, comfy-watcher, pdf-ingest, langextract - notebook-sync, session-context-worker **Media Tier (10 services) - included in this commit:** - ultimate-tts-studio, flute-gateway, ffmpeg-whisper - media-video, media-audio, channel-monitor - invidious, invidious-companion, grayjay-plugin-host, grayjay-server Security improvement: 30 services now use tier-based env_file anchors instead of legacy x-env-legacy pattern. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Codex Agent <codex-agent@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * fix(security): GPU access + production hardening (health checks, image pins, required password) (#355) * docs: address PR review comments for env tier consolidation - Add GPU Orchestrator and E2B Runner to services-catalog.md - Add gpu-orchestrator to env.tier-api.example service list - Create learnings file documenting 6-tier env architecture - Add env.tier-*.example files for worker, media, agent tiers Addresses nitpick comments from PRs #349-354. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(gpu): ensure GPU access for all CUDA-enabled services - gpu-orchestrator: Add GPU deploy section + NVIDIA_VISIBLE_DEVICES - ultimate-tts-studio: Add NVIDIA_VISIBLE_DEVICES env var - hi-rag-gateway-gpu: Add NVIDIA_VISIBLE_DEVICES env var - hi-rag-gateway-v2-gpu: Add NVIDIA_VISIBLE_DEVICES env var - media-audio: Change base image to nvidia/cuda:12.4.1-runtime-ubuntu22.04 (was python:3.11-slim which caused silent CPU fallback) This fixes silent CPU fallbacks where PyTorch CUDA packages were installed but the CUDA runtime was not available in the container. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(security): production hardening - health checks and image pinning Critical security and reliability fixes: 1. **POSTGRES_PASSWORD now required** - Changed from insecure default `:-pmoves` to required syntax `${VAR:?error}`. Compose will fail if POSTGRES_PASSWORD is not set (lines 59, 78, 937). 2. **Pinned 8 :latest images to specific versions:** - postgrest/postgrest:latest → v12.2.3 - minio/minio:latest → RELEASE.2024-12-18T13-15-44Z - ollama/ollama:latest → 0.5.4 - tensorzero/gateway:latest → 2024.12.18 - tensorzero/ui:latest → 2024.12.18 - invidious:latest → 2024.12.09 - invidious-companion:latest → 2024.12.20 - grayjay:latest → 2024.11.01 3. **Added health checks to 37 services** (52 total, up from 15): - Data tier: qdrant, meilisearch, minio - API tier: hi-rag-*, retrieval-eval, presign, render-webhook - Worker tier: extract-worker, pdf-ingest, langextract, notebook-sync, ffmpeg-whisper, media-video, media-audio, pmoves-yt, channel-monitor - Agent tier: agent-zero, mesh-agent, deepresearch, supaserch - TensorZero: gateway, ui, ollama - Others: publisher-discord, messaging-gateway, jellyfin-bridge 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(health): address PR review critical issues Fixes critical issues identified by PR review: MinIO: - Change health check from `mc ready local` to curl-based (minio/minio image doesn't include mc binary) NATS: - Add `-m 8222` flag to enable HTTP monitoring port (health check was targeting port that wasn't enabled) Health checks: - comfy-watcher: verify module imports instead of just `import sys` - mesh-agent: verify main module and NATS client availability Missing start_period: - postgres: add 15s start_period - chat-relay: add 30s start_period - n8n-agent: add 30s start_period - invidious-postgres: add 15s start_period All 52 health checks now have start_period defined. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Codex Agent <codex-agent@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * security(dockerfile): Harden notebook-sync and vibevoice-realtime Increase Dockerfile hardening from 33/36 (91.7%) to 35/36 (97.2%): - notebook-sync: Add USER pmoves (user creation already existed) - vibevoice-realtime: Add full hardening with UID/GID 65532 Accepted exception: agent-zero uses root for initialization then drops to pmoves via 'su' for the service process. This pattern is required by upstream Agent Zero's prepare.py and /ins/copy_A0.sh. Pattern reference: flute-gateway/Dockerfile 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(infra): Address PR #345 CodeRabbit review comments - Normalize Supabase Kong hostnames to lowercase (DNS convention) - Remove duplicate ARCHON_SUPABASE_BASE_URL env var definition - Fix notebook-sync Dockerfile: remove USER directive so entrypoint can run chown/su as root before dropping privileges - Improve deepresearch _get_or_create_counter: use module-level cache to avoid private prometheus_client API dependency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(infra): Archon Supabase connectivity and UI dashboard fixes Changes: - Archon health check: Add Kong gateway hostname support for internal Docker networking (supabase_kong_pmoves.ai:8000) - UI dashboard: Add /dashboard redirect page to /dashboard/services - Grafana: Fix env var placeholders and job name mismatches in queries - Docs: Add placeholder for Jellyfin service documentation The Archon health check now properly handles both: - Supabase CLI endpoint (host.docker.internal:65421) - Internal Kong gateway (supabase_kong_pmoves.ai:8000) This resolves the 404 errors in Archon health checks when using internal Docker DNS names instead of host.docker.internal. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore(gitignore): Exclude agent-zero runtime data directory Add pmoves/data/agent-zero/ to gitignore. This directory contains runtime settings (settings.json) that persist via Docker volume mount. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(deepresearch): Prometheus counter double-registration Use registry lookup pattern instead of try/except for counter registration. Prevents 'Duplicated timeseries' error when container restarts with existing registry state. Before: try/except around Counter() creation After: REGISTRY._names_to_collectors.get() for existing lookup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(flute-gateway): add logging to silent exception handlers (#323) - Add warning log to Supabase health check exception handler - Improve persona fetch error logging with status code and truncated body - Add metrics tracking for non-200 persona fetch responses Closes #322 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Codex Agent <codex-agent@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * docs: add comprehensive service documentation (#338) Merged after rebase to resolve Jellyfin README conflict * fix(compose): Agent Zero settings persistence and Archon hostname - Add volume mount ./data/agent-zero/tmp:/a0/tmp for settings.json Root cause: PMOVES-Agent-Zero/python/helpers/settings.py:162 stores settings at /a0/tmp/settings.json but path was not mounted - Normalize Archon SUPABASE_URL to lowercase supabase_kong_pmoves.ai Root cause: Docker DNS is case-sensitive on some configurations - Fix archon-agent-work-orders health check: /healthz → /health Root cause: Service exposes /health, not /healthz 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Codex Agent <codex-agent@example.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
POWERFULMOVES
pushed a commit
that referenced
this pull request
Feb 12, 2026
- Update error modal to show default 'docker compose up --build -d' command - Add better organized note structure with bullet points - Include profile-specific fallback example for existing users - Update README Quick Start to show default command first - Maintain backward compatibility guidance for profile users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rebased PR with 13 commits from `feat/hardened-security-phase2` not yet in hardened.
Changes
Security Hardening
Environment Migration (6-Tier Architecture)
Infrastructure Fixes
Documentation
Testing
```bash
docker compose -p pmoves config --quiet
curl -sf http://localhost:8080/healthz # Agent Zero
curl -sf http://localhost:8091/healthz # Archon
```
Related