diff --git a/docs/AGENT_ASSEMBLY_PLAN.md b/docs/AGENT_ASSEMBLY_PLAN.md index 8a4586f..19e1ae5 100644 --- a/docs/AGENT_ASSEMBLY_PLAN.md +++ b/docs/AGENT_ASSEMBLY_PLAN.md @@ -117,9 +117,9 @@ These constrain every phase below. the same discipline as the compiled roadmap. 7. **Pin exact 0.x versions; say what is unpublished.** - Agents must not compose fiction. Unpublished packages (for example - Support Desk or Webhooks while they remain so) are marked unusable for - production assembly until published. + Agents must not compose fiction. Unpublished packages (for example Support + Desk while it remains so) are marked unusable for production assembly until + published. 8. **Explicit wiring only.** No autodiscovery story in agent docs. The composition root is the map @@ -194,7 +194,7 @@ Named composition intents, for example: - Durable rate limits on expensive auth paths - Transactional mail outbox jobs committed in the caller’s transaction - Append-only audit records inside the caller’s storage transaction -- Inbound webhook receipt ledger (when `@pegma/webhooks` is published) +- Inbound webhook receipt ledger (package published; synthetic fixture pending) - Support queue slice (when Support Desk packages are published) Each recipe records: @@ -292,7 +292,8 @@ Shipped: | `cf-passkey-accounts` | `recipes/cf-passkey-accounts/` | green | | `storage-audit-mail-outbox` | `recipes/storage-audit-mail-outbox/` | green | -P3–P6 remain pending. Deferred D1–D2 still wait on package publication. +P3–P6 remain pending. Deferred D1 waits on a green fixture; D2 still waits on +package publication. **Exit:** catalog recipe entries resolve to green fixtures for P1–P2; `/examples` indexes those recipes and quotes only fixture (or package diff --git a/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md b/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md index 9bdc3ea..03fc9cf 100644 --- a/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md +++ b/docs/GITHUB_RELEASE_WEBHOOK_PLAN.md @@ -2,16 +2,19 @@ ## Status -**Stage:** Phase E activated (2026-07-29). Worker secret installed, +**Stage:** Phase E activated and first real stable publish observed +(2026-07-29). Worker secret installed, `pegma-dev-api` version `52d03e76-b69a-42c8-9d63-bcb6316e33f3` deployed with release routes and six-hour recon cron. Organization release webhook is live; GitHub's authenticated `ping` returned **204**. Controlled release projections -and `GET /api/releases` / Stack shell are live. Optional follow-up: observe a -real stable publish and the first scheduled recon success marker. +and `GET /api/releases` / Stack shell are live. The signed Webhooks `v0.1.0` +release projected at `2026-07-29T21:49:02.667Z` without a site deployment, +proving the production event path. The registry artifact is exact and carries +SLSA provenance. **Phase A reconciliation (2026-07-28):** `@pegma/webhooks` is pinned to `@pegma/storage-core@0.4.0` (commit `1e5ef0732c3595ea82cb80394cf55cd9a0442318`). -pegma.dev vendors that exact `npm pack` artifact under +pegma.dev initially vendored that exact `npm pack` artifact under `vendor/@pegma/webhooks/` with SHA-256 and integrity recorded in `PROVENANCE.md`. Ledger smoke tests exercise `createMemoryStore()` and the production D1 composition (`createSchemaIfMissing: false` over the generic @@ -21,8 +24,8 @@ published `@pegma/health`, `@pegma/rate-limit`, and `@pegma/sessions` pins — pre-existing on `main`, with no newer published releases that declare 0.4.0. Phase A closes the Webhooks/host Store contract gap; republishing those three packages is separate host debt, not a webhook-handler prerequisite. The -vendored package README carries only the MIT copyright line for -RetireGolden, LLC — no consumer-migration or commercial planning text. +temporary vendored bridge was removed after `@pegma/webhooks@0.1.0` published +with matching registry integrity and provenance. **Phase B reconciliation (2026-07-28):** `POST /api/webhooks/github/releases` authenticates raw-body HMAC-SHA256, allowlists organization `309286193` and @@ -134,7 +137,7 @@ Before implementation: assume structural compatibility. 2. Run the Webhooks memory and real-Azurite suites after the pin change, then exercise the exact packed artifact against the D1 adapter in pegma.dev. -3. Because `@pegma/webhooks` is unpublished, consume a byte-reproducible +3. At implementation time, because `@pegma/webhooks` was unpublished, consume a byte-reproducible `npm pack` artifact from an identified Webhooks commit. Record its commit, SHA-256, npm integrity, and reproduction command beside the vendored artifact. Remove this bridge after the first package release. @@ -558,14 +561,16 @@ After activation: operator recovery; - remove any controlled test release or tag used only for activation; - remove the vendored artifact and provenance note after - `@pegma/webhooks` is published and the registry artifact is verified; + `@pegma/webhooks` is published and the registry artifact is verified — + **done 2026-07-29 for exact `0.1.0` with SLSA provenance**; - do not publish Webhooks, cut a release, or create a tag as an incidental implementation step. ## Decisions to confirm before implementation -1. **Phase 3 accounting:** Treat this as partial Webhooks Phase 3 evidence - unless the owner deliberately changes the same-host requirement. +1. **Phase 3 accounting:** On 2026-07-29 the owner accepted the second real + provider, host, cloud, and store as sufficient first-release evidence. + Same-host multi-source operation remains post-release evidence. 2. **Display:** Show current stable versions on the Stack page first; add a separate release-history page only if real demand appears. 3. **Release class:** Stable GitHub releases only; omit drafts and prereleases. diff --git a/docs/PROJECT_PLAN.md b/docs/PROJECT_PLAN.md index 609df91..59368a9 100644 --- a/docs/PROJECT_PLAN.md +++ b/docs/PROJECT_PLAN.md @@ -271,4 +271,7 @@ with a source link where not. Decide in Phase 3. details, and operator docs. **Phase E activated (2026-07-29):** Worker secret installed, Worker version `52d03e76-b69a-42c8-9d63-bcb6316e33f3` live, release projection + read API verified, organization release webhook live - (GitHub authenticated `ping` → 204). + (GitHub authenticated `ping` → 204). **First real stable publish observed + 2026-07-29:** the signed Webhooks `v0.1.0` release projected immediately + without a site deploy; the exact registry package replaced the vendored + bridge. diff --git a/docs/catalog/RECIPE_BACKLOG.md b/docs/catalog/RECIPE_BACKLOG.md index 03e098f..5c8fc13 100644 --- a/docs/catalog/RECIPE_BACKLOG.md +++ b/docs/catalog/RECIPE_BACKLOG.md @@ -84,16 +84,17 @@ deferred). | **capabilityTags** | `static_host` only (not bare `cloudflare` — host-tag alone must not select this scaffold) | | **Fixture** | green — [`recipes/scaffold-cf-minimal/`](../../recipes/scaffold-cf-minimal/) | -## Deferred (unpublished packages) +## Deferred (missing package or fixture) -Do not offer for production assembly until packages are on npm. +Do not offer for production assembly until required packages are on npm and a +CI-tested fixture is green. -### D1 — `inbound-webhook-receipts` (when `@pegma/webhooks` is published) +### D1 — `inbound-webhook-receipts` | | | | --- | --- | | **Intent** | A fictional donation platform (“Copper Plate”) records inbound provider webhook receipts with idempotent dedup, poison quarantine, and retention — receipts hold ids and counters, never payloads. | -| **Blocks** | webhooks unpublished | +| **Blocks** | CI-tested synthetic fixture not yet built | | **Anti-patterns** | Exactly-once claims; storing full payloads in the receipt ledger; ordering guarantees | ### D2 — `support-queue-slice` (when Support Desk packages are published) diff --git a/docs/catalog/example-catalog.json b/docs/catalog/example-catalog.json index 17b10c1..ad85727 100644 --- a/docs/catalog/example-catalog.json +++ b/docs/catalog/example-catalog.json @@ -190,7 +190,7 @@ "antiPatterns": ["Storing full webhook bodies in receipts"], "fixture": { "kind": "pending", - "citation": "docs/catalog/RECIPE_BACKLOG.md#d1--inbound-webhook-receipts-when-pegmawebhooks-is-published", + "citation": "docs/catalog/RECIPE_BACKLOG.md#d1--inbound-webhook-receipts", "status": "none" }, "capabilityTags": ["webhooks_inbound"], diff --git a/evals/assembly-eval.test.ts b/evals/assembly-eval.test.ts index 5ebc61f..7f00bf7 100644 --- a/evals/assembly-eval.test.ts +++ b/evals/assembly-eval.test.ts @@ -39,7 +39,7 @@ const EVAL_NPM: Record = { '@pegma/support-desk-core': '0.1.0', '@pegma/support-desk-application': '0.1.0', '@pegma/support-desk-templates': '0.1.0', - '@pegma/webhooks': null, // unpublished for production assembly + '@pegma/webhooks': '0.1.0', '@pegma/sessions': '0.1.0', '@pegma/mail': '0.1.0', '@pegma/billing-core': null, diff --git a/package-lock.json b/package-lock.json index c1d30e0..8eeec66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "@pegma/support-desk-contracts": "0.1.0", "@pegma/support-desk-core": "0.1.0", "@pegma/support-desk-templates": "0.1.0", - "@pegma/webhooks": "file:vendor/@pegma/webhooks/pegma-webhooks-0.0.0.tgz", + "@pegma/webhooks": "0.1.0", "agents": "^0.20.1", "zod": "^4.4.3" }, @@ -3313,9 +3313,9 @@ } }, "node_modules/@pegma/webhooks": { - "version": "0.0.0", - "resolved": "file:vendor/@pegma/webhooks/pegma-webhooks-0.0.0.tgz", - "integrity": "sha512-d/SvLJqd7CInzsDKLM6goI8yXh08jMBBzpHlvy3TMYyRmmbthJpkurJda3jZ2aGvrqbW/Rx3nAyxf1ZZhB20Zw==", + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@pegma/webhooks/-/webhooks-0.1.0.tgz", + "integrity": "sha512-iCz65n860Ty0bHB6RAChah27Is4dM65cpJLkn0yOFm5RbXRqYO3xwD1a3q+KzqjGZUlppUHebzN186ORNZcp+A==", "license": "MIT", "dependencies": { "@pegma/spine": "0.1.1", diff --git a/package.json b/package.json index fd821b9..6af7633 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@pegma/support-desk-contracts": "0.1.0", "@pegma/support-desk-core": "0.1.0", "@pegma/support-desk-templates": "0.1.0", - "@pegma/webhooks": "file:vendor/@pegma/webhooks/pegma-webhooks-0.0.0.tgz", + "@pegma/webhooks": "0.1.0", "agents": "^0.20.1", "zod": "^4.4.3" }, diff --git a/public/llms.txt b/public/llms.txt index 0c4c0c2..dbcaa3f 100644 --- a/public/llms.txt +++ b/public/llms.txt @@ -49,9 +49,9 @@ reference environment. authorized by permissions. In development. - [Webhooks](https://github.com/pegma-dev/webhooks): @pegma/webhooks — inbound receipt ledger: idempotent dedup, poison quarantine, retention; - at-least-once on purpose. In development and unpublished: Phase 2 is - merged into RetireGolden, with its operational exit awaiting production - Stripe traffic; Phase 3 is gated on a second real provider. + at-least-once on purpose. Published as 0.1.0 from a protected signed + release through trusted-publisher OIDC with provenance; RetireGolden + Stripe and pegma.dev GitHub are the first two real provider integrations. - [Sessions](https://github.com/pegma-dev/sessions): @pegma/sessions — server-side session records: hashed ids, absolute + idle expiry, principal-wide revocation. Published as 0.1.0: Phase 1 is merged, Phase 2 diff --git a/src/data/components.ts b/src/data/components.ts index 932c8dc..17b6bac 100644 --- a/src/data/components.ts +++ b/src/data/components.ts @@ -26,7 +26,7 @@ export interface PegmaComponent { readonly plan?: string; } -export const SNAPSHOT_DATE = '2026-07-28'; +export const SNAPSHOT_DATE = '2026-07-29'; export const components: readonly PegmaComponent[] = [ { @@ -174,7 +174,7 @@ export const components: readonly PegmaComponent[] = [ repo: 'webhooks', title: 'Webhooks', packages: ['@pegma/webhooks'], - status: 'in development', + status: 'published', summary: 'Inbound webhook receipts: idempotent dedup, poison quarantine, retention.', owns: [ @@ -187,7 +187,7 @@ export const components: readonly PegmaComponent[] = [ 'Ordering guarantees — domain logic, deliberately excluded', 'Storing payloads — receipts hold ids and counters, never customer data', ], - now: 'Phase 2 consumer migration is merged; operational exit awaits production Stripe traffic. Phase 3 is gated on a second real provider; unpublished.', + now: '@pegma/webhooks@0.1.0 is published from the protected signed v0.1.0 release through trusted-publisher OIDC with provenance. RetireGolden Stripe and pegma.dev GitHub exercise two real providers, hosts, clouds, and stores; the 0.x API remains unstable.', plan: 'docs/PROJECT_PLAN.md', }, { diff --git a/src/data/recipe-backlog.ts b/src/data/recipe-backlog.ts index 1d98331..dcf7e8b 100644 --- a/src/data/recipe-backlog.ts +++ b/src/data/recipe-backlog.ts @@ -213,7 +213,7 @@ export const RECIPE_BACKLOG: readonly CatalogRecipe[] = [ { id: 'inbound-webhook-receipts', intent: - 'A fictional donation platform (Copper Plate) records inbound provider webhook receipts with idempotent dedup and poison quarantine. Deferred until @pegma/webhooks is published.', + 'A fictional donation platform (Copper Plate) records inbound provider webhook receipts with idempotent dedup and poison quarantine. The package is published; a CI-tested synthetic fixture remains pending.', packages: ['@pegma/webhooks', '@pegma/storage-core', '@pegma/spine'], adapters: [], hostResponsibilities: [ @@ -229,7 +229,7 @@ export const RECIPE_BACKLOG: readonly CatalogRecipe[] = [ fixture: { kind: 'pending', citation: - 'docs/catalog/RECIPE_BACKLOG.md#d1--inbound-webhook-receipts-when-pegmawebhooks-is-published', + 'docs/catalog/RECIPE_BACKLOG.md#d1--inbound-webhook-receipts', status: 'none', }, capabilityTags: ['webhooks_inbound'], diff --git a/src/pages/roadmap.astro b/src/pages/roadmap.astro index 79253d7..19d0f81 100644 --- a/src/pages/roadmap.astro +++ b/src/pages/roadmap.astro @@ -71,10 +71,10 @@ const builtOn = new Date().toISOString().slice(0, 10); contracts are stable enough for 1.0.
  • - Webhooks is evidence-gated. The ledger and RetireGolden consumer migration - are implemented, but Phase 2 remains operationally open until production Stripe traffic is - observed through the package shape. Phase 3 waits for a second real, non-Stripe provider - rather than inventing a synthetic consumer. + Webhooks is released; evidence continues. The signed 0.1.0 + release follows real Stripe use in RetireGolden and GitHub release ingestion on this + Cloudflare/D1 host. Same-host multi-source operation and additional provider-driven + quarantine behavior remain post-release evidence, not stronger delivery guarantees.
  • Consumers pull components into existence. Support Desk supplied the first diff --git a/vendor/@pegma/webhooks/PROVENANCE.md b/vendor/@pegma/webhooks/PROVENANCE.md deleted file mode 100644 index 109c17c..0000000 --- a/vendor/@pegma/webhooks/PROVENANCE.md +++ /dev/null @@ -1,31 +0,0 @@ -# Vendored `@pegma/webhooks` provenance - -`@pegma/webhooks` is unpublished. pegma.dev consumes a byte-reproducible -`npm pack` artifact until the first public package release, then this bridge -is removed. - -| Field | Value | -| --- | --- | -| Package | `@pegma/webhooks@0.0.0` | -| Artifact | `pegma-webhooks-0.0.0.tgz` | -| Source repository | `https://github.com/pegma-dev/webhooks` | -| Exact commit | `1e5ef0732c3595ea82cb80394cf55cd9a0442318` | -| SHA-256 | `2c27d51169c42598b17f95b099cb01b35a8c6cf5bfa42ce1f2c09480746e9521` | -| npm integrity | `sha512-d/SvLJqd7CInzsDKLM6goI8yXh08jMBBzpHlvy3TMYyRmmbthJpkurJda3jZ2aGvrqbW/Rx3nAyxf1ZZhB20Zw==` | -| Storage Core pin inside artifact | `@pegma/storage-core@0.4.0` | - -## Reproduction - -```text -git clone https://github.com/pegma-dev/webhooks.git -cd webhooks -git checkout 1e5ef0732c3595ea82cb80394cf55cd9a0442318 -npm ci -npm pack -w @pegma/webhooks --pack-destination . -Get-FileHash -Algorithm SHA256 .\pegma-webhooks-0.0.0.tgz -# or: shasum -a 256 pegma-webhooks-0.0.0.tgz -``` - -The SHA-256 of the resulting tarball must match the table above. npm records -the sha512 integrity automatically when the dependency is installed from the -local file path. diff --git a/vendor/@pegma/webhooks/pegma-webhooks-0.0.0.tgz b/vendor/@pegma/webhooks/pegma-webhooks-0.0.0.tgz deleted file mode 100644 index a5379a2..0000000 Binary files a/vendor/@pegma/webhooks/pegma-webhooks-0.0.0.tgz and /dev/null differ diff --git a/worker/src/webhooks-ledger.d1.test.ts b/worker/src/webhooks-ledger.d1.test.ts index 9875ea3..9b084d3 100644 --- a/worker/src/webhooks-ledger.d1.test.ts +++ b/worker/src/webhooks-ledger.d1.test.ts @@ -58,7 +58,7 @@ beforeEach(async () => { await env.IDENTITY_DB.prepare('DELETE FROM PEGMA_STORAGE_D1_TX_GUARD').run(); }); -describe('vendored @pegma/webhooks over Cloudflare D1 composition', () => { +describe('published @pegma/webhooks over Cloudflare D1 composition', () => { it('uses createSchemaIfMissing: false like production Identity', async () => { const store = createCloudflareD1Store({ database: env.IDENTITY_DB, diff --git a/worker/src/webhooks-ledger.test.ts b/worker/src/webhooks-ledger.test.ts index a36f343..1437faf 100644 --- a/worker/src/webhooks-ledger.test.ts +++ b/worker/src/webhooks-ledger.test.ts @@ -5,7 +5,7 @@ import type { Logger } from '@pegma/spine'; const logger: Logger = { log: vi.fn() }; -describe('vendored @pegma/webhooks over createMemoryStore', () => { +describe('published @pegma/webhooks over createMemoryStore', () => { it('records begin, markProcessed, and duplicate begin outcomes', async () => { const store = createMemoryStore(); const ledger = createWebhookLedger({