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
11 changes: 6 additions & 5 deletions docs/AGENT_ASSEMBLY_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤏 [nit] Support Desk is not a valid unpublished-package example

Principle 7 was rewritten to cite Support Desk as the remaining example of packages that are unpublished and therefore unusable for production assembly. In this same repository, package-lock.json already resolves @pegma/support-desk-contracts, @pegma/support-desk-core, @pegma/support-desk-application, and @pegma/support-desk-templates from registry.npmjs.org at version 0.1.0. Catalog publishUsability is derived from npm presence, not from hand-written lifecycle prose, so the example contradicts the repository's own dependency truth and will mis-train agents reading this plan.

Suggestion: Replace the Support Desk example with a package that is actually absent from npm (for example @pegma/billing-core), or rephrase to discuss incomplete fixtures / non-green recipes without calling Support Desk unpublished.

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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
25 changes: 15 additions & 10 deletions docs/GITHUB_RELEASE_WEBHOOK_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +17 to 19
production D1 composition (`createSchemaIfMissing: false` over the generic
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion docs/PROJECT_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
9 changes: 5 additions & 4 deletions docs/catalog/RECIPE_BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog/example-catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
2 changes: 1 addition & 1 deletion evals/assembly-eval.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const EVAL_NPM: Record<string, string | null> = {
'@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,
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
6 changes: 3 additions & 3 deletions public/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/data/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [
{
Expand Down Expand Up @@ -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: [
Expand All @@ -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',
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/data/recipe-backlog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -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'],
Expand Down
8 changes: 4 additions & 4 deletions src/pages/roadmap.astro
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ const builtOn = new Date().toISOString().slice(0, 10);
contracts are stable enough for <code>1.0</code>.
</li>
<li>
<strong>Webhooks is evidence-gated.</strong> 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.
<strong>Webhooks is released; evidence continues.</strong> The signed <code>0.1.0</code>
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.
Comment on lines +74 to +77

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Compile the Webhooks roadmap facts from its plan

When the Webhooks project plan advances or corrects this evidence, the compiled status table will update while this hand-written paragraph remains unchanged, allowing the same roadmap page to contradict its source of truth. Move these release/evidence facts into the Webhooks PROJECT_PLAN.md and render the compiled stage here rather than duplicating them in the page.

AGENTS.md reference: AGENTS.md:L28-L30

Useful? React with 👍 / 👎.

</li>
<li>
<strong>Consumers pull components into existence.</strong> Support Desk supplied the first
Expand Down
31 changes: 0 additions & 31 deletions vendor/@pegma/webhooks/PROVENANCE.md

This file was deleted.

Binary file removed vendor/@pegma/webhooks/pegma-webhooks-0.0.0.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion worker/src/webhooks-ledger.d1.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion worker/src/webhooks-ledger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
Loading