Repository navigation
fix: add native lifecycle-aware health endpoint - #7852
diegosouzapw merged 2 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Code Review
This pull request introduces a new /healthz endpoint to track and expose the server's lifecycle phases (starting, ready, and stopping) using a global state manager. It integrates lifecycle hooks into the Node.js instrumentation startup and graceful shutdown processes, and adds comprehensive unit tests. The reviewer points out a critical issue where the /healthz route handler might be statically optimized and cached by Next.js at build time, and suggests adding export const dynamic = "force-dynamic"; to ensure it is always executed dynamically at runtime.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Addressed the static-optimization finding in |
b5481c9 to
d95c736
Compare
|
Thanks for this — clean, focused implementation that matches what #7848 asked for closely: unauthenticated I ran the PR's test in isolation and it's 3/3 green; the CI red on this PR ( A couple of small optional nits, non-blocking:
None of these block the merge; happy to add them directly if you'd rather not touch the branch again. |
|
Merged — thanks @RaviTharuma! The lifecycle-aware /healthz endpoint is a clean addition and the test coverage made it an easy call. Validated in the local merge-train (14-PR combined tree, full unit suite + vitest green) on tomni-proxmox-113 @ 0fda37bb4fdb26ba1345fd7b4cac44fbe235cda4, then squash-merged. |
* fix: add native health endpoint * fix: keep health endpoint dynamic --------- Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
* fix: add native health endpoint * fix: keep health endpoint dynamic --------- Co-authored-by: Ravi Tharuma <RaviTharuma@users.noreply.github.com>
Summary
GET/HEAD /healthzendpoint503during startup and graceful shutdown, and200only after initializationValidation
node --import tsx/esm --test tests/unit/healthz-route.test.tsnpm run typecheck:coregit diff --checkCloses #7848