Skip to content

fix(archon): recognize internal Kong gateway in healthcheck - #357

Merged
POWERFULMOVES merged 1 commit into
mainfrom
fix/ui-supabase-connection
Dec 25, 2025
Merged

POWERFULMOVES merged 1 commit into
mainfrom
fix/ui-supabase-connection

Conversation

@POWERFULMOVES

@POWERFULMOVES POWERFULMOVES commented Dec 25, 2025

Copy link
Copy Markdown
Owner

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: Added is_kong_gateway condition to healthcheck logic

Test plan

  • Verify Archon healthcheck passes when SUPABASE_URL=http://supabase_kong_pmoves.ai:8000
  • Verify Archon healthcheck still works with Supabase CLI on port 65421
  • Run docker compose ps and confirm archon shows healthy

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved system health detection by expanding gateway monitoring to cover additional connection paths, enhancing overall system reliability and responsiveness monitoring.

✏️ Tip: You can customize this high-level summary in your review settings.

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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Dec 25, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The _pmoves_healthcheck function now detects health endpoints via two gateways: the existing Supabase CLI gateway (port 65421 on localhost-like hosts) and a new Kong gateway (port 8000 on supabase_kong_pmoves.ai). The system marks itself as reachable if either gateway responds, expanding the scope of the health check conditions.

Changes

Cohort / File(s) Summary
Gateway detection expansion in health check
pmoves/services/archon/main.py
Added logic to detect Kong gateway (supabase_kong_pmoves.ai:8000) alongside existing Supabase CLI gateway detection. Health endpoint targeting now triggers when either gateway condition is met, broadening the reachability criteria.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Two gateways now guard our health,
Kong and Supabase share the wealth,
Either path keeps systems spry,
Reachability reaches the sky! 🌙

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks required sections: Testing commands/output and Required Checks are incomplete or missing. Add actual testing commands and output in the Testing section, and explicitly check off or document the Required Checks items.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and specifically describes the main change: adding Kong gateway recognition to the healthcheck logic.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ui-supabase-connection

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ai could 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

📥 Commits

Reviewing files that changed from the base of the PR and between f4324bd and df7c473.

📒 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 in services/common/
FastAPI routes: snake_case function names; path names kebab-case only in URLs
Validate payloads against schemas before publishing events using services/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.md and use make -C pmoves agents-headless-smoke, make -C pmoves smoke-gpu, and make -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)

@POWERFULMOVES
POWERFULMOVES merged commit 6256a00 into main Dec 25, 2025
8 checks passed
POWERFULMOVES added a commit that referenced this pull request Jan 18, 2026
fix(archon): recognize internal Kong gateway in healthcheck
@POWERFULMOVES
POWERFULMOVES deleted the fix/ui-supabase-connection branch March 7, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant