From f0177a4a1726f386e5b8c729cd43a5fab87aad22 Mon Sep 17 00:00:00 2001 From: Ajax Davis Date: Sat, 10 Jan 2026 03:17:14 +1000 Subject: [PATCH] fix: update health checks to use existing public endpoints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace non-existent /api/collections/public and /api/agents/public with /api/stats which is a public endpoint - Remove sync_status check (endpoint doesn't exist) - Update health page labels to match new check names 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/endpoint-health-check.yml | 43 +++++---------------- apps/web/src/app/health/page.tsx | 3 +- 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/.github/workflows/endpoint-health-check.yml b/.github/workflows/endpoint-health-check.yml index a72315b..c55331d 100644 --- a/.github/workflows/endpoint-health-check.yml +++ b/.github/workflows/endpoint-health-check.yml @@ -71,46 +71,25 @@ jobs: echo "❌ Database health check failed with status $HTTP_CODE" fi - - name: Check Public Collections API - id: collections-api + - name: Check Platform Stats API + id: stats-api run: | - echo "Testing: GET /api/collections/public" - RESPONSE=$(curl -s -w "\n%{http_code}" "$BASE_URL/api/collections/public?limit=1" --connect-timeout 10 --max-time 30) + echo "Testing: GET /api/stats" + RESPONSE=$(curl -s -w "\n%{http_code}" "$BASE_URL/api/stats" --connect-timeout 10 --max-time 30) HTTP_CODE=$(echo "$RESPONSE" | tail -n1) BODY=$(echo "$RESPONSE" | sed '$d') echo "HTTP Status: $HTTP_CODE" if [ "${{ inputs.verbose }}" = "true" ]; then - echo "Response: $BODY" + echo "Response: $BODY" | head -c 500 fi - if [ "$HTTP_CODE" -eq 200 ]; then + if [ "$HTTP_CODE" -eq 200 ] && echo "$BODY" | grep -q '"success":true'; then echo "status=pass" >> $GITHUB_OUTPUT - echo "✅ Public collections API check passed" + echo "✅ Platform stats API check passed" else echo "status=fail" >> $GITHUB_OUTPUT - echo "❌ Public collections API check failed with status $HTTP_CODE" - fi - - - name: Check Public Agents API - id: agents-api - run: | - echo "Testing: GET /api/agents/public" - RESPONSE=$(curl -s -w "\n%{http_code}" "$BASE_URL/api/agents/public?limit=1" --connect-timeout 10 --max-time 30) - HTTP_CODE=$(echo "$RESPONSE" | tail -n1) - BODY=$(echo "$RESPONSE" | sed '$d') - - echo "HTTP Status: $HTTP_CODE" - if [ "${{ inputs.verbose }}" = "true" ]; then - echo "Response: $BODY" - fi - - if [ "$HTTP_CODE" -eq 200 ]; then - echo "status=pass" >> $GITHUB_OUTPUT - echo "✅ Public agents API check passed" - else - echo "status=fail" >> $GITHUB_OUTPUT - echo "❌ Public agents API check failed with status $HTTP_CODE" + echo "❌ Platform stats API check failed with status $HTTP_CODE" fi - name: Check MCP HTTP Transport - Initialize @@ -247,8 +226,7 @@ jobs: "checks": { "basic_health": "${{ steps.basic-health.outputs.status }}", "database": "${{ steps.db-health.outputs.status }}", - "collections_api": "${{ steps.collections-api.outputs.status }}", - "agents_api": "${{ steps.agents-api.outputs.status }}", + "stats_api": "${{ steps.stats-api.outputs.status }}", "mcp_http_init": "${{ steps.mcp-http-init.outputs.status }}", "mcp_http_tools": "${{ steps.mcp-http-tools.outputs.status }}", "mcp_sse": "${{ steps.mcp-sse.outputs.status }}", @@ -279,8 +257,7 @@ jobs: echo "|----------|--------|" >> $GITHUB_STEP_SUMMARY echo "| Basic Health | ${{ steps.basic-health.outputs.status == 'pass' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY echo "| Database | ${{ steps.db-health.outputs.status == 'pass' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY - echo "| Collections API | ${{ steps.collections-api.outputs.status == 'pass' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY - echo "| Agents API | ${{ steps.agents-api.outputs.status == 'pass' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY + echo "| Platform Stats | ${{ steps.stats-api.outputs.status == 'pass' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY echo "| MCP HTTP Init | ${{ steps.mcp-http-init.outputs.status == 'pass' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY echo "| MCP HTTP Tools | ${{ steps.mcp-http-tools.outputs.status == 'pass' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY echo "| MCP SSE | ${{ steps.mcp-sse.outputs.status == 'pass' && '✅ Pass' || '❌ Fail' }} |" >> $GITHUB_STEP_SUMMARY diff --git a/apps/web/src/app/health/page.tsx b/apps/web/src/app/health/page.tsx index a42563d..0cc03f2 100644 --- a/apps/web/src/app/health/page.tsx +++ b/apps/web/src/app/health/page.tsx @@ -51,8 +51,7 @@ const statusColors: Record const checkLabels: Record = { basic_health: 'Basic Health', database: 'Database', - collections_api: 'Collections API', - agents_api: 'Agents API', + stats_api: 'Platform Stats', mcp_http_init: 'MCP HTTP Init', mcp_http_tools: 'MCP HTTP Tools', mcp_sse: 'MCP SSE',