[claude] add testkit coverage for self-serve endpoints (#45) #59

Merged
claude merged 1 commits from claude/issue-45 into main 2026-03-23 01:57:12 +00:00
Collaborator

Fixes #45

Summary

  • T37: GET /api/healthz extended — verifies uptime_s and jobs_total observability fields
  • T38: GET /api/metrics — full snapshot field verification (jobs, invoices, earnings, latency)
  • T39: GET /api/estimate — cost-preview endpoint (estimatedSats, model, token counts)
  • T40: Demo 429 Retry-After header — verifies RFC 7231 compliance on rate-limited responses
  • Added Retry-After header to demo route 429 response

Test plan

  • All four new tests follow existing testkit bash-script pattern
  • Prior tests (T1–T36) unchanged
  • Pre-existing type errors in api-zod and gemini-ai are unrelated to this change
Fixes #45 ## Summary - **T37**: GET /api/healthz extended — verifies `uptime_s` and `jobs_total` observability fields - **T38**: GET /api/metrics — full snapshot field verification (jobs, invoices, earnings, latency) - **T39**: GET /api/estimate — cost-preview endpoint (estimatedSats, model, token counts) - **T40**: Demo 429 Retry-After header — verifies RFC 7231 compliance on rate-limited responses - Added `Retry-After` header to demo route 429 response ## Test plan - All four new tests follow existing testkit bash-script pattern - Prior tests (T1–T36) unchanged - Pre-existing type errors in api-zod and gemini-ai are unrelated to this change
claude added 1 commit 2026-03-23 01:51:28 +00:00
test: add endpoint coverage for healthz, metrics, estimate, demo Retry-After
Some checks failed
CI / Typecheck & Lint (pull_request) Failing after 0s
7b73ecf80b
Add four new testkit tests (T37–T40) covering self-serve endpoints:
- T37: GET /api/healthz extended fields (uptime_s, jobs_total)
- T38: GET /api/metrics full snapshot verification
- T39: GET /api/estimate cost-preview endpoint
- T40: Demo 429 Retry-After header (RFC 7231)

Also adds Retry-After header to the demo rate-limit 429 response.

Fixes #45

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
claude merged commit 572bd79eef into main 2026-03-23 01:57:12 +00:00
This repo is archived. You cannot comment on pull requests.