refactor(env): Phase 5 - Migrate media tier to env-tier-media anchor - #353
POWERFULMOVES wants to merge 1 commit into
Conversation
Migrates 10 media services from legacy env_file to tier-based anchor: - ultimate-tts-studio - flute-gateway - ffmpeg-whisper - media-video - media-audio - channel-monitor - invidious - invidious-companion - grayjay-plugin-host - grayjay-server Also creates env.tier-media.example with media-specific vars. Media tier services handle audio/video processing and connect to internal storage (MinIO) and message bus (NATS), but should NOT have direct access to external LLM API keys. 🤖 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. |
📝 WalkthroughWalkthroughThis change consolidates environment variable loading in the Docker Compose configuration by replacing individual per-service Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pmoves/docker-compose.yml (1)
33-38: Review anchor pattern application, but reconsider expanded profile usage against coding guidelines.The 11 media tier services have been correctly migrated to use the
x-env-tier-mediaanchor pattern, andenv.tier-media.exampleexists. However, the services use multiple custom profiles (orchestration,agents,yt,invidious,grayjay,gpu,tts) that extend beyond the coding guideline specifying only Compose profilesdataandworkersshould be used. Either align the profiles with the guideline or update the guideline to document the extended profile strategy.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
pmoves/docker-compose.ymlpmoves/env.tier-media.example
🧰 Additional context used
📓 Path-based instructions (1)
pmoves/**/docker-compose.yml
📄 CodeRabbit inference engine (pmoves/AGENTS.md)
Use Compose profiles (
data,workers) to scope what runs locally in docker-compose.yml
Files:
pmoves/docker-compose.yml
🧠 Learnings (5)
📚 Learning: 2025-12-07T11:03:53.415Z
Learnt from: CR
Repo: POWERFULMOVES/PMOVES.AI PR: 0
File: pmoves/AGENTS.md:0-0
Timestamp: 2025-12-07T11:03:53.415Z
Learning: Applies to pmoves/**/docker-compose.yml : Use Compose profiles (`data`, `workers`) to scope what runs locally in docker-compose.yml
Applied to files:
pmoves/docker-compose.yml
📚 Learning: 2025-12-15T12:03:17.291Z
Learnt from: CR
Repo: POWERFULMOVES/PMOVES.AI PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T12:03:17.291Z
Learning: Applies to pmoves/env.shared.example : Copy env.shared.example → env.shared and fill in secrets; never commit real secrets in env.shared
Applied to files:
pmoves/env.tier-media.example
📚 Learning: 2025-12-07T11:03:53.415Z
Learnt from: CR
Repo: POWERFULMOVES/PMOVES.AI PR: 0
File: pmoves/AGENTS.md:0-0
Timestamp: 2025-12-07T11:03:53.415Z
Learning: Applies to pmoves/docs/PMOVES.AI PLANS/{JELLYFIN_BRIDGE_INTEGRATION.md,JELLYFIN_BACKFILL_PLAN.md,Enhanced Media Stack with Advanced AudioVideo Analysis/**} : Jellyfin integration runbooks live under `pmoves/docs/PMOVES.AI PLANS/` (see `JELLYFIN_BRIDGE_INTEGRATION.md`, `JELLYFIN_BACKFILL_PLAN.md`, and `Enhanced Media Stack with Advanced AudioVideo Analysis/`)
Applied to files:
pmoves/env.tier-media.example
📚 Learning: 2025-12-07T11:03:53.415Z
Learnt from: CR
Repo: POWERFULMOVES/PMOVES.AI PR: 0
File: pmoves/AGENTS.md:0-0
Timestamp: 2025-12-07T11:03:53.415Z
Learning: Applies to pmoves/**/environment.yml : Preferred Python: Conda 3.11+ (env name: `PMOVES.AI` or `pmoves-ai`); use `environment.yml` at repo root for setup
Applied to files:
pmoves/env.tier-media.example
📚 Learning: 2025-12-07T11:03:07.638Z
Learnt from: CR
Repo: POWERFULMOVES/PMOVES.AI PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-07T11:03:07.638Z
Learning: Applies to **/pmoves/**/*{qwen,gemma,audio,summary}*.py : Integrate Qwen2-Audio provider and add Gemma summaries to PMOVES.YT endpoints
Applied to files:
pmoves/env.tier-media.example
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (python)
🔇 Additional comments (5)
pmoves/env.tier-media.example (2)
1-18: LGTM! Clear security boundaries and credential handling.The header clearly documents that media tier services do not receive external LLM API keys, and MinIO credentials are properly marked as REQUIRED with instructions to populate from env.tier-data.
Based on learnings, this follows the established pattern: copy env.tier-media.example → env.tier-media and fill in secrets; never commit real secrets.
1-6: Documentation inconsistency: 11 services migrated, not 10.The header lists 11 services including pmoves-yt, but the PR summary states "migrated 10 media services" and omits pmoves-yt from the list. The code correctly migrates all 11 services.
pmoves/docker-compose.yml (3)
33-38: LGTM! Media tier anchor correctly isolates credentials.The anchor definition follows the established tier-based pattern and ensures media services receive only media-specific credentials (MinIO, NATS, Whisper, Invidious keys) without access to external LLM API keys stored in env-tier-llm.
412-412: LGTM! Services correctly migrated to media tier anchor.Services ultimate-tts-studio, flute-gateway, ffmpeg-whisper, media-video, and media-audio are properly migrated to use the shared
*env-tier-mediaanchor while maintaining their inline environment configurations.Also applies to: 449-449, 527-527, 553-553, 578-578
602-602: LGTM! Remaining media services successfully migrated.Services pmoves-yt, channel-monitor, invidious-companion, invidious, grayjay-plugin-host, and grayjay-server are correctly migrated to the media tier anchor pattern, completing the Phase 5 consolidation.
Also applies to: 640-640, 1324-1324, 1348-1348, 1391-1391, 1406-1406
| # --------------------------------------------------------------------------- | ||
| # Supabase (internal) | ||
| # --------------------------------------------------------------------------- | ||
| SUPABASE_URL=http://supabase_kong_PMOVES.AI:8000 | ||
| SUPABASE_SERVICE_ROLE_KEY= |
There was a problem hiding this comment.
Mark SUPABASE_SERVICE_ROLE_KEY as REQUIRED.
Line 49 defines SUPABASE_SERVICE_ROLE_KEY but doesn't mark it as REQUIRED, unlike MinIO credentials (lines 16-17) and Invidious keys (lines 61-62). Services like flute-gateway reference this variable, so it should be marked to prevent runtime failures.
🔎 Proposed fix
SUPABASE_URL=http://supabase_kong_PMOVES.AI:8000
-SUPABASE_SERVICE_ROLE_KEY=
+SUPABASE_SERVICE_ROLE_KEY= # REQUIRED: Set from env.tier-data or env.tier-api🤖 Prompt for AI Agents
In pmoves/env.tier-media.example around lines 45 to 49,
SUPABASE_SERVICE_ROLE_KEY is declared but not marked as REQUIRED; update the
file so SUPABASE_SERVICE_ROLE_KEY is explicitly labeled REQUIRED (consistent
with the MinIO and Invidious entries) — add a comment or suffix "REQUIRED" on
the SUPABASE_SERVICE_ROLE_KEY line and/or include a placeholder value comment to
indicate it must be provided by deployers.
|
Superseded by #354 which includes all remaining tier migrations |
Summary
Phase 5 of the 6-tier environment consolidation. Migrates 10 media services from legacy
x-env-legacypattern to<<: *env-tier-mediaanchor.Services Migrated
ultimate-tts-studio- TTS synthesis engineflute-gateway- Voice communication layerffmpeg-whisper- Media transcriptionmedia-video- Video analysis (YOLO)media-audio- Audio analysischannel-monitor- YouTube channel watcherinvidious- YouTube proxyinvidious-companion- Invidious helpergrayjay-plugin-host- Streaming plugin hostgrayjay-server- Streaming serverSecurity Improvement
Media tier services now only receive:
Files Changed
pmoves/docker-compose.yml- Migrated 10 servicespmoves/env.tier-media.example- Created with media-specific varsTesting
Related PRs
🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.