Repository navigation
Wire pegma-dev-api health through @pegma/health - #8
Conversation
Use the shared check/response contract on /health, vendor the pack until npm publish, and register Health on the site. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Pull request overview
This PR wires the pegma-dev-api Cloudflare Worker health endpoints (GET / and GET /health) through @pegma/health, and updates the site/component registry and documentation to reflect the shared health JSON shape and health event names. It also vendors @pegma/health@0.1.0 via a checked-in .tgz until the package is available on npm.
Changes:
- Replace the Worker’s inline health response with
@pegma/healthchecks (process+logging) andtoHealthResponsestatus mapping. - Add a vendored
@pegma/healthtarball dependency (file:worker-vendor/pegma-health-0.1.0.tgz) and document the vendoring workflow. - Register the new Health component in the site registry and update README endpoint documentation.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| worker/src/index.ts | Routes / and /health through @pegma/health and returns the standardized response + status. |
| worker/README.md | Documents the new @pegma/health endpoint behavior and example response body. |
| worker-vendor/README.md | Explains provenance and regeneration steps for the vendored @pegma/health tarball. |
| src/data/components.ts | Adds the health component entry to the Pegma component registry. |
| README.md | Updates top-level docs to reflect @pegma/health usage and emitted health events. |
| package.json | Adds @pegma/health dependency via the vendored tarball. |
| package-lock.json | Locks the vendored @pegma/health artifact and its transitive dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7fb4913fb5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Document only the events this Worker currently emits, distinguish status fail from health.failed, and use the Health Status stage as the fail-soft now line. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
GET /and/healththrough@pegma/health(process + logging sink checks) with shared JSON/health.*events.@pegma/health@0.1.0asworker-vendor/pegma-health-0.1.0.tgzuntil the package is on npm.Test plan
npm ciandnpm run buildsucceednpm run worker:deploy(or CI Worker deploy on merge) succeedsGET https://pegma-dev-api.websitemakers-et-al.workers.dev/healthreturns the@pegma/healthbody withchecks.processandchecks.logginghealth.ok(or degraded/failed) after deploy