From 97b646cdf191813c5b37f421f2ad39beb0e265d1 Mon Sep 17 00:00:00 2001 From: Nathan Rover Date: Tue, 28 Jul 2026 22:34:17 -0400 Subject: [PATCH 1/3] =?UTF-8?q?[docs]=20Mark=20GitHub=20release=20webhook?= =?UTF-8?q?=20Phases=20C=E2=80=93D=20complete;=20Phase=20E=20open.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reconcile plan status with merged PRs #19 and #20. Production secret and organization webhook activation remain. --- docs/GITHUB_RELEASE_WEBHOOK_PLAN.md | 25 ++++++++++++++++++++----- docs/PROJECT_PLAN.md | 10 +++++----- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md b/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md index 6fb0f44..f9df97f 100644 --- a/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md +++ b/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md @@ -2,9 +2,9 @@ ## Status -**Stage:** Phase B complete (2026-07-28). No GitHub organization webhook, -Cloudflare webhook secret, or production activation yet. Phases C–E remain -open. +**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. **Phase A reconciliation (2026-07-28):** `@pegma/webhooks` is pinned to `@pegma/storage-core@0.4.0` (commit `1e5ef0732c3595ea82cb80394cf55cd9a0442318`). @@ -26,8 +26,23 @@ authenticates raw-body HMAC-SHA256, allowlists organization `309286193` and explicit repository IDs, records deliveries in `@pegma/webhooks` (`source: "github"`), and projects current stable releases into the `componentReleases` collection. Draft/prerelease events are acknowledged -without projection. No payload fields cross the release codec. Read API, UI, -reconciliation, secret install, and organization webhook activation remain. +without projection. No payload fields cross the release codec. + +**Phase C reconciliation (2026-07-28):** `GET /api/releases` serves schema +`pegma.releases.v1` for allowlisted catalog slots (empty `current` when +unset), with `max-age=300`, ETag (content-stable), and `nosniff`. The Stack +page loads `/stack-releases.js` same-origin and renders loading, empty, +populated, stale, and unavailable states; repository links remain usable +without JS or when the API fails. + +**Phase D reconciliation (2026-07-28):** Six-hour cron `0 */6 * * *` runs +GitHub reconciliation by numeric repository ID (independent of minute +Identity maintenance). Backfill is the same path; no Webhooks receipt rows. +Authoritative apply converges missed delete/unpublish to GitHub's current +stable. 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. **Goal:** Keep the public release version and release date for Pegma components current on pegma.dev without a content commit, Pages build, or site diff --git a/docs/PROJECT_PLAN.md b/docs/PROJECT_PLAN.md index b1892a6..19aed8c 100644 --- a/docs/PROJECT_PLAN.md +++ b/docs/PROJECT_PLAN.md @@ -265,8 +265,8 @@ with a source link where not. Decide in Phase 3. **Done 2026-07-28, including email activation.** 4. Keep public component release versions current on pegma.dev without a content commit or Pages deploy per release — see - `docs/GITHUB_RELEASE_WEBHOOK_PLAN.md`. **Phase A (2026-07-28):** vendored - `@pegma/webhooks` artifact aligned to Storage Core `0.4.0` and proven over - memory + D1. **Phase B (2026-07-28):** signed GitHub release webhook - handler + current-release projection. Read API, UI, reconciliation, and - activation remain. + `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 + detail, and operator docs. **Phase E remains:** Worker secret, deploy, + backfill verify, organization webhook, and production smoke. From 88c1748e319bb761bbc05c6274bf995e0c47a53e Mon Sep 17 00:00:00 2001 From: Nathan Rover Date: Tue, 28 Jul 2026 22:37:23 -0400 Subject: [PATCH 2/3] Clarify Phase D/E wording from Copilot review. --- docs/GITHUB_RELEASE_WEBHOOK_PLAN.md | 5 +++-- docs/PROJECT_PLAN.md | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md b/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md index f9df97f..5991973 100644 --- a/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md +++ b/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md @@ -36,8 +36,9 @@ populated, stale, and unavailable states; repository links remain usable without JS or when the API fails. **Phase D reconciliation (2026-07-28):** Six-hour cron `0 */6 * * *` runs -GitHub reconciliation by numeric repository ID (independent of minute -Identity maintenance). Backfill is the same path; no Webhooks receipt rows. +GitHub reconciliation by numeric repository ID, separately from the +per-minute Identity maintenance job. Backfill is the same path; no Webhooks +receipt rows. Authoritative apply converges missed delete/unpublish to GitHub's current stable. Health detail `githubReleases` exposes configuration, last webhook and recon times, staleness, and current count. Operator docs cover secret diff --git a/docs/PROJECT_PLAN.md b/docs/PROJECT_PLAN.md index 19aed8c..f6d3b1a 100644 --- a/docs/PROJECT_PLAN.md +++ b/docs/PROJECT_PLAN.md @@ -268,5 +268,5 @@ 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 - detail, and operator docs. **Phase E remains:** Worker secret, deploy, - backfill verify, organization webhook, and production smoke. + details, and operator docs. **Phase E remains:** Worker secret, deploy, + backfill verification, organization webhook, and production smoke. From 175abdbe30b26af8c79aa487bbb510090460a437 Mon Sep 17 00:00:00 2001 From: Nathan Rover Date: Tue, 28 Jul 2026 22:55:41 -0400 Subject: [PATCH 3/3] Note ETag invalidation/epoch follow-up in Phase D reconciliation. --- docs/GITHUB_RELEASE_WEBHOOK_PLAN.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md b/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md index 5991973..1c2e5f4 100644 --- a/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md +++ b/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md @@ -40,10 +40,11 @@ GitHub reconciliation by numeric repository ID, separately from the per-minute Identity maintenance job. Backfill is the same path; no Webhooks receipt rows. Authoritative apply converges missed delete/unpublish to GitHub's current -stable. 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. +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. **Goal:** Keep the public release version and release date for Pegma components current on pegma.dev without a content commit, Pages build, or site