Skip to content

fix(health): add /api/health status route - #9

Merged
LangerSword merged 3 commits into
mainfrom
fix/health-route-issue-2
Nov 25, 2026
Merged

LangerSword merged 3 commits into
mainfrom
fix/health-route-issue-2

Conversation

@LangerSword

@LangerSword LangerSword commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Fixes #2.

Problem: No lightweight health route. Uptime checks could not tell a Worker failure from a card-render failure.
Change: Add GET /api/health. It returns { ok: true } as JSON with no-store.
Test: Check status, JSON body and Cache-Control. Build lists /api/health.
Checks: npm test 39 pass. tsc clean. build passes.
Credit: LangerSword

@LangerSword LangerSword mentioned this pull request Nov 24, 2026
@github-actions

Copy link
Copy Markdown

Rook / automated review

Verdict

ship. Confidence: high for the code change; the intent claim is unverified. The merge call stays with the maintainer.

Findings

  1. P3|tests/health-route.test.ts:4|high|The suite name is "/health", but the route is "/api/health". Evidence: describe("/health") on line 4; the handler lives at app/api/health/route.ts. A reader can infer the wrong endpoint. Fix: use describe("/api/health").

Open questions

  • Does GET share a process with the card-render Worker? The comment says a failed check means the Worker is down. The diff shows a constant response that reads no state. It can only show that the route process answered. If the Worker runs elsewhere, this check misses its failure. The diff cannot answer this.

Test gaps

  • I did not run npm test, tsc, or the build. The PR reports "39 pass, tsc clean, build passes." I cannot verify these from the diff. Run npm test, npx tsc --noEmit, and the build command before merge.
  • No test checks that Next.js mounts the route at /api/health. The test imports GET directly. That is a unit test, not a routing test. Add a request-level test if path coverage matters.

Evidence boundary: I checked the diff only. The handler compiles as a valid Web Response and returns 200 with JSON and Cache-Control: no-store. The test matches the handler. I could not verify build output or the PR's reported counts.

@LangerSword LangerSword self-assigned this Nov 25, 2026
@github-actions

Copy link
Copy Markdown

Rook / automated review

I'll verify the claims against the actual repo before judging. Let me inspect the project and run the checks.</think:6124c78e><tool_calls:6124c78e><tool_call:6124c78e>terminal_execute>

cd /home/runner/work/gitone/gitone && pwd && ls -la && echo "--- package.json ---" && cat package.json 2>/dev/null && echo "--- git status ---" && git status --short 2>/dev/null && echo "--- recent log ---" && git log --oneline -5 2>/dev/null



</terminal_execute>
OD... wait, I need to use the correct tool format. Let me re-check. The tool is terminal_execute? Actually in this environment, I should check what tools are available. Let me look - the system prompt mentions Python toolchain but doesn't list tools explicitly. Let me try a bash tool. Actually the common Hermes tool is terminal_execute with command parameter. Let me try.

Hmm, actually I'm not sure of the exact tool name. Let me think. In Hermes Agent CLI, tools typically include terminal_execute or bash. The previous attempt I wrote as text, not an actual tool call. Let me make a proper tool call. I'll use terminal_execute.

Actually, I realize I don't have explicit tool definitions given in this prompt. But the environment strongly implies terminal access ("You are in a plain terminal (CLI)"). Let me attempt with a reasonable tool name. If it fails, I'll adapt.

Let me try terminal_execute.</think:6124c78e><tool_calls:6124c78e><tool_call:6124c78e>terminal_execute>

cd /home/runner/work/gitone/gitone && pwd && ls -la && echo "--- package.json ---" && cat package.json 2>/dev/null && echo "--- git status ---" && git status --short && echo "--- recent log ---" && git log --oneline -5

</terminal_execute>
</tool_calls:6124c78e>

@LangerSword
LangerSword merged commit 2704775 into main Nov 25, 2026
3 checks passed
@LangerSword
LangerSword deleted the fix/health-route-issue-2 branch November 25, 2026 21:46
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.

Add a /health endpoint

1 participant