Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions docs/GITHUB_RELEASE_WEBHOOK_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

## Status

**Stage:** Phase D complete (2026-07-28). Implementable work is merged; Phase
E (production activation) remains — no GitHub organization webhook, Cloudflare
webhook secret, or live release traffic yet.
**Stage:** Phase E partially activated (2026-07-29). Worker secret installed,
`pegma-dev-api` version `52d03e76-b69a-42c8-9d63-bcb6316e33f3` deployed with
release routes and six-hour recon cron. Controlled signed release deliveries
project into D1; `GET /api/releases` and Stack shell are live. **Remaining:**
create the GitHub organization webhook (API needs `admin:org_hook` scope) and
confirm GitHub's own authenticated `ping` plus a real org delivery.
Comment on lines +8 to +10

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include reconciliation in the remaining activation work

The leading status says the only remaining work is the organization webhook and GitHub-originated delivery, but this document later records that the first scheduled reconciliation success is still unverified (lines 67–69), while Phase E explicitly requires observing scheduled reconciliation (line 462). The matching PROJECT_PLAN.md backlog repeats this omission, so an operator relying on either summary could close Phase E without validating the recovery path; list scheduled reconciliation/backfill verification as remaining work.

AGENTS.md reference: AGENTS.md:L14-L16

Useful? React with 👍 / 👎.


**Phase A reconciliation (2026-07-28):** `@pegma/webhooks` is pinned to
`@pegma/storage-core@0.4.0` (commit `1e5ef0732c3595ea82cb80394cf55cd9a0442318`).
Expand Down Expand Up @@ -44,7 +47,26 @@ stable. Webhook projection invalidates the per-repository recon ETag (with
an epoch so recon cannot restore a stale tag after a concurrent invalidation).
Health detail `githubReleases` exposes configuration, last webhook and recon
times, staleness, and current count. Operator docs cover secret install, org
webhook, redelivery, recon, and rollback. Phase E activation remains.
webhook, redelivery, recon, and rollback.

**Phase E partial activation (2026-07-29):**

- Gates: `npm run check`, `npm test` (108 + 1 D1), `npm run build` on
`origin/main` before deploy.
- Secret: `GITHUB_WEBHOOK_SECRET` installed via Wrangler (not in git/Actions).
- Deploy: Worker version `52d03e76-b69a-42c8-9d63-bcb6316e33f3` on
`pegma.dev/api/*` with crons `* * * * *` and `0 */6 * * *`.
- Smoke: signed `ping` → 204; unsigned POST → 401; health
`githubReleases.ingestionConfigured=true`; `GET /api/releases` schema
`pegma.releases.v1`.
- Controlled deliveries: signed `release` events for allowlisted repos with
real GitHub stable tags projected to D1; duplicate delivery GUID → 204
without change; `currentReleaseCount` 9 after seed.
- Stack page includes same-origin `/stack-releases.js` shell (Pages already
serving Phase C markup).
- **Not done:** organization webhook create (operator console or
`gh auth refresh -h github.com -s admin:org_hook` then org hooks API);
first scheduled recon success marker (next `0 */6 * * *` UTC).

**Goal:** Keep the public release version and release date for Pegma
components current on pegma.dev without a content commit, Pages build, or site
Expand Down
7 changes: 5 additions & 2 deletions docs/PROJECT_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,5 +268,8 @@ with a source link where not. Decide in Phase 3.
`docs/GITHUB_RELEASE_WEBHOOK_PLAN.md`. **Phases A–D (2026-07-28):** vendored
`@pegma/webhooks`, signed release webhook + projection, public
`GET /api/releases` + Stack UI, six-hour reconciliation/backfill, health
details, and operator docs. **Phase E remains:** Worker secret, deploy,
backfill verification, organization webhook, and production smoke.
details, and operator docs. **Phase E partial (2026-07-29):** Worker secret
installed, Worker version `52d03e76-b69a-42c8-9d63-bcb6316e33f3` live,
signed release projection + read API verified. **Remaining:** create the
GitHub organization release webhook and confirm GitHub-originated ping/
delivery (org hook API scope `admin:org_hook`).