fix: align HTTP readiness with health-core contract - #754
Conversation
|
Warning Review limit reached
More reviews will be available in 25 minutes and 23 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (11)
✨ 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 |
📊 Benchmark Results❌ Some benchmarks failed
Updated: 2026-06-14T22:21:19.486Z · Commit: ada72c5 |
Summary
Fixes #702.
@croco/transports-httpreadiness now uses the canonical@croco/health-coreaggregate contract./readyand/health/readyreturn{ status: \"up\" | \"down\", results: [...] }, and HTTP 200/503 status codes are derived from that coreup/downstatus.변경 사항
HealthCheckRegistry.check()directly toHealthCheckService.check(), removing the transport-localok/erroraggregate vocabulary,checksserializer, and timeout error normalization.HealthCheckRegistryResultandHealthCheckOptionsas public transport symbols backed by health-core types.Verification
pnpm test --filter=@croco/health-core- passed, 21 tests.pnpm test --filter=@croco/transports-http- passed, 111 tests.pnpm typecheck --filter=@croco/transports-http --filter=@croco/health-core- passed.pnpm --filter @croco/docs build- passed.pnpm check- passed.pnpm changeset-required:check- passed.git diff --check origin/trunk...HEAD- passed.pnpm test- passed, 197 tasks.pnpm typecheck- passed, 196 tasks.testandtypecheckpassed from cache.Self-review
@croco/health-core; endpoint tests cover healthy, empty, failed, timeout, and duplicate-registration paths.{ status: \"ok\" | \"error\", checks: ... }to{ status: \"up\" | \"down\", results: [...] }, so the changeset is markedmajorand the docs call out the new contract.HealthCheckService.Risk
Consumers parsing
/readyor/health/readyresponse bodies must migrate to the health-core shape. Liveness endpoints stay on{ status: \"ok\" }.