Skip to content

Wire pegma-dev-api health through @pegma/health - #8

Merged
FlyOverCoderKY merged 2 commits into
mainfrom
wire-pegma-health
Jul 28, 2026
Merged

FlyOverCoderKY merged 2 commits into
mainfrom
wire-pegma-health

Conversation

@FlyOverCoderKY

@FlyOverCoderKY FlyOverCoderKY commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Route Worker GET / and /health through @pegma/health (process + logging sink checks) with shared JSON/health.* events.
  • Vendor @pegma/health@0.1.0 as worker-vendor/pegma-health-0.1.0.tgz until the package is on npm.
  • Register Health in the site component registry and document the endpoint shape.

Test plan

  • npm ci and npm run build succeed
  • npm run worker:deploy (or CI Worker deploy on merge) succeeds
  • GET https://pegma-dev-api.websitemakers-et-al.workers.dev/health returns the @pegma/health body with checks.process and checks.logging
  • Confirm Datadog/Cloudflare still receive health.ok (or degraded/failed) after deploy

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>
Copilot AI review requested due to automatic review settings July 28, 2026 02:14
@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/health checks (process + logging) and toHealthResponse status mapping.
  • Add a vendored @pegma/health tarball 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.

Comment thread worker/README.md Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/data/components.ts Resolved
Comment thread worker/README.md Resolved
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>
@FlyOverCoderKY
FlyOverCoderKY merged commit edf3791 into main Jul 28, 2026
1 check passed
@FlyOverCoderKY
FlyOverCoderKY deleted the wire-pegma-health branch July 28, 2026 02:21
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.

2 participants