fix(archon): recognize internal Kong gateway in healthcheck - #357
Conversation
The Archon healthcheck now correctly identifies the internal Supabase Kong gateway (supabase_kong_pmoves.ai:8000) in addition to Supabase CLI, preventing false unhealthy status when running in containerized mode. 🤖 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. |
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 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: 0
🧹 Nitpick comments (1)
pmoves/services/archon/main.py (1)
628-634: LGTM! The Kong gateway detection logic correctly addresses the healthcheck issue.The fix appropriately expands gateway detection to include the internal Kong gateway, ensuring
/rest/v1/archon_settings?select=*is probed instead of/which returns 404.One optional consideration: the hardcoded hostname
supabase_kong_pmoves.aicould be made configurable via an environment variable (e.g.,ARCHON_KONG_GATEWAY_HOST) for flexibility in different deployment environments. However, given this is a specific Docker compose network configuration, the current approach is reasonable.🔎 Optional: Make Kong gateway host configurable
+ kong_gateway_host = os.environ.get("ARCHON_KONG_GATEWAY_HOST", "supabase_kong_pmoves.ai") is_supabase_cli = host in {"host.docker.internal", "127.0.0.1", "localhost"} and port == 65421 - is_kong_gateway = host == "supabase_kong_pmoves.ai" and port == 8000 + is_kong_gateway = host == kong_gateway_host and port == 8000
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
pmoves/services/archon/main.py
🧰 Additional context used
📓 Path-based instructions (4)
pmoves/services/**/*.py
📄 CodeRabbit inference engine (pmoves/AGENTS.md)
pmoves/services/**/*.py: Keep modules small and single-purpose; share helpers inservices/common/
FastAPI routes: snake_case function names; path names kebab-case only in URLs
Validate payloads against schemas before publishing events usingservices/common/events.py
Files:
pmoves/services/archon/main.py
pmoves/**/*.py
📄 CodeRabbit inference engine (pmoves/AGENTS.md)
Python 3.11+, 4-space indentation, prefer type hints
Files:
pmoves/services/archon/main.py
pmoves/services/{agent-zero,archon}/**/*.py
📄 CodeRabbit inference engine (pmoves/AGENTS.md)
For Agents/Archon full-stack validation, follow the 'All Services Up, Then Tests' section in
pmoves/docs/SMOKETESTS.mdand usemake -C pmoves agents-headless-smoke,make -C pmoves smoke-gpu, andmake -C pmoves verify-all
Files:
pmoves/services/archon/main.py
**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
Use Python 3.11+ with 4-space indentation and prefer type hints in all Python code
Files:
pmoves/services/archon/main.py
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: POWERFULMOVES/PMOVES.AI PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T12:03:17.291Z
Learning: Agents/Archon: for full-stack validation, follow the 'All Services Up, Then Tests' section in pmoves/docs/SMOKETESTS.md and the Archon service guide
📚 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/services/{agent-zero,archon}/**/*.py : For Agents/Archon full-stack validation, follow the 'All Services Up, Then Tests' section in `pmoves/docs/SMOKETESTS.md` and use `make -C pmoves agents-headless-smoke`, `make -C pmoves smoke-gpu`, and `make -C pmoves verify-all`
Applied to files:
pmoves/services/archon/main.py
📚 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: Agents/Archon: for full-stack validation, follow the 'All Services Up, Then Tests' section in pmoves/docs/SMOKETESTS.md and the Archon service guide
Applied to files:
pmoves/services/archon/main.py
⏰ 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). (2)
- GitHub Check: tests (3.11)
- GitHub Check: Analyze (python)
fix(archon): recognize internal Kong gateway in healthcheck
Summary
The Archon healthcheck now correctly identifies the internal Supabase Kong gateway (
supabase_kong_pmoves.ai:8000) in addition to Supabase CLI hosts.Problem: When Archon runs in containerized mode connecting to the internal Kong gateway, the healthcheck would probe the root path
/which returns 404, falsely marking the service as unhealthy.Solution: Added Kong gateway detection alongside the existing Supabase CLI detection, so healthcheck probes the concrete table endpoint
/rest/v1/archon_settings?select=*for both cases.Changes
pmoves/services/archon/main.py: Addedis_kong_gatewaycondition to healthcheck logicTest plan
SUPABASE_URL=http://supabase_kong_pmoves.ai:8000docker compose psand confirm archon shows healthy🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.