e2e: drive asserts building + kit.json; signed callback flips the page to ready (phase-3 plan Task 11) #78

Closed
opened 2026-08-31 05:20:44 +00:00 by ben · 3 comments
Owner

Plan

docs/superpowers/plans/2026-08-31-coa-phase-3.md Task 11.

Deliverable

e2e/playwright.config.ts server env adds BUILD_WEBHOOK_SECRET: 'e2e-secret', COA_SHARED_PUBLIC_URL: 'http://coa-infra.test'; e2e/apply.spec.ts first test extended (plan text): status.json building/build 1/configUrl http://127.0.0.1:3904, kit.json content, then a request.post to /api/build-complete signed with node:crypto HMAC → page shows the five links, no "build pending", outbox has page-ready + installers-ready.

Acceptance

  • make e2e → 2 passed on a clean checkout; nothing written under the repo's communities/.

depends_on

  • build-complete (Task 8), site Done copy (Task 10)

Phase gate

Feature toggles / nav order in builds are phase 4. Never delete or rewrite anything under communities/ (ADR 0002/0003); phase 3 rewrites only kit.json, status.json, index.html. No test reaches the real network, sends real mail, dispatches a real build or provisions a real tenant.

## Plan `docs/superpowers/plans/2026-08-31-coa-phase-3.md` **Task 11**. ## Deliverable `e2e/playwright.config.ts` server env adds `BUILD_WEBHOOK_SECRET: 'e2e-secret'`, `COA_SHARED_PUBLIC_URL: 'http://coa-infra.test'`; `e2e/apply.spec.ts` first test extended (plan text): `status.json` `building/build 1/configUrl http://127.0.0.1:3904`, `kit.json` content, then a `request.post` to `/api/build-complete` signed with `node:crypto` HMAC → page shows the five links, no "build pending", outbox has `page-ready` + `installers-ready`. ## Acceptance - `make e2e` → 2 passed on a clean checkout; nothing written under the repo's `communities/`. ## depends_on - build-complete (Task 8), site Done copy (Task 10) ## Phase gate Feature toggles / nav order in builds are phase 4. Never delete or rewrite anything under `communities/` (ADR 0002/0003); phase 3 rewrites only `kit.json`, `status.json`, `index.html`. No test reaches the real network, sends real mail, dispatches a real build or provisions a real tenant.

This was generated by AI during triage.

Ruled by agent under ADR 0174 (two-way-door doctrine) — veto anytime

Ruling: ready-for-agent. e2e drive asserts building + kit.json; signed callback flips page to ready.

Why this is a two-way door: it is revertible by a later commit or label change, and provable by the tests the plan specifies — which never reach the real network, send real mail, dispatch a real build or provision a real tenant. It is not on the one-way-door list: the credential bytes, real GitHub dispatch/release and live coa-shared tenant are already carved out into the human ticket #79 and the session tickets #80/#81; env-gated defaults keep the wired code inert (noop/static, 503/unconfigured) until those land.

What proves it: make e2e → 2 passed on a clean checkout, callback signed with node:crypto against BUILD_WEBHOOK_SECRET=e2e-secret; nothing written under the repo's communities/.

The ticket body is a complete agent brief (Deliverable / Acceptance / depends_on). The native Forgejo dependency links already mirror the plan's graph, so the swarm ready-list filter holds this ticket until its blockers close.

> *This was generated by AI during triage.* ## Ruled by agent under ADR 0174 (two-way-door doctrine) — veto anytime **Ruling:** `ready-for-agent`. e2e drive asserts building + kit.json; signed callback flips page to ready. **Why this is a two-way door:** it is revertible by a later commit or label change, and provable by the tests the plan specifies — which never reach the real network, send real mail, dispatch a real build or provision a real tenant. It is not on the one-way-door list: the credential bytes, real GitHub dispatch/release and live coa-shared tenant are already carved out into the human ticket #79 and the session tickets #80/#81; env-gated defaults keep the wired code inert (noop/static, 503/unconfigured) until those land. **What proves it:** `make e2e` → 2 passed on a clean checkout, callback signed with `node:crypto` against `BUILD_WEBHOOK_SECRET=e2e-secret`; nothing written under the repo's `communities/`. The ticket body is a complete agent brief (Deliverable / Acceptance / depends_on). The native Forgejo dependency links already mirror the plan's graph, so the swarm ready-list filter holds this ticket until its blockers close.

swarm-claim host=matou-dev-server-01 run=1464
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=1464 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #78 — status success

✅ close-report gates passed — every claim verified against main; PR #107 (#107) was already merged (a reconcile pass landed it before this close-report ran) and the merge closed this issue via closes #78.

envelope
{
  "issue": 78,
  "status": "success",
  "commits": [
    "fad7fe5a39e73edfb70cb56da960274137fecaeb"
  ],
  "changed_files": [
    "e2e/apply.spec.ts",
    "e2e/playwright.config.ts"
  ],
  "tests": [
    {
      "command": "CI=true make e2e",
      "exit_code": 0
    },
    {
      "command": "pnpm -r typecheck",
      "exit_code": 0
    }
  ],
  "criteria": {
    "playwright.config.ts server env adds BUILD_WEBHOOK_SECRET='e2e-secret', COA_SHARED_PUBLIC_URL='http://coa-infra.test'": "e2e/playwright.config.ts (commit fad7fe5): both keys added to the @coa/server webServer env",
    "apply.spec.ts first test extended: status.json building/build 1/configUrl http://127.0.0.1:3904": "e2e/apply.spec.ts asserts status toMatchObject { state: 'building', build: 1, configUrl: 'http://127.0.0.1:3904' }",
    "kit.json content asserted": "e2e/apply.spec.ts asserts kit toMatchObject { version: 1, slug: 'ngati-example', build: 1, brand: { name: 'Ngāti Example' } } and kit.onboarding.approval { mode: 'endorsements+session', required: 3 }",
    "request.post to /api/build-complete signed with node:crypto HMAC -> page shows five links, no 'build pending', outbox page-ready + installers-ready": "e2e/apply.spec.ts: createHmac('sha256','e2e-secret') signs the body, POST returns 200, Android (APK) link has the asset href, build pending count 0, outbox2 kinds == ['installers-ready','page-ready']",
    "make e2e -> 2 passed on a clean checkout; nothing written under repo communities/": "CI=true make e2e -> 2 passed (11.1s); communities/ holds only .gitkeep after the run, git status clean apart from the two e2e files"
  },
  "summary": "Extended the e2e drive to assert the phase-3 building state + kit.json and a node:crypto-signed build-complete callback flipping the community page to ready with both emails.",
  "reason": "All acceptance clauses met; make e2e -> 2 passed, typecheck green, nothing written under communities/, merged to main via PR #107.",
  "blockers": []
}
**close-report** for #78 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; PR #107 (https://git.matou.nz/Matou/coa/pulls/107) was already merged (a reconcile pass landed it before this close-report ran) and the merge closed this issue via `closes #78`. <details><summary>envelope</summary> ```json { "issue": 78, "status": "success", "commits": [ "fad7fe5a39e73edfb70cb56da960274137fecaeb" ], "changed_files": [ "e2e/apply.spec.ts", "e2e/playwright.config.ts" ], "tests": [ { "command": "CI=true make e2e", "exit_code": 0 }, { "command": "pnpm -r typecheck", "exit_code": 0 } ], "criteria": { "playwright.config.ts server env adds BUILD_WEBHOOK_SECRET='e2e-secret', COA_SHARED_PUBLIC_URL='http://coa-infra.test'": "e2e/playwright.config.ts (commit fad7fe5): both keys added to the @coa/server webServer env", "apply.spec.ts first test extended: status.json building/build 1/configUrl http://127.0.0.1:3904": "e2e/apply.spec.ts asserts status toMatchObject { state: 'building', build: 1, configUrl: 'http://127.0.0.1:3904' }", "kit.json content asserted": "e2e/apply.spec.ts asserts kit toMatchObject { version: 1, slug: 'ngati-example', build: 1, brand: { name: 'Ngāti Example' } } and kit.onboarding.approval { mode: 'endorsements+session', required: 3 }", "request.post to /api/build-complete signed with node:crypto HMAC -> page shows five links, no 'build pending', outbox page-ready + installers-ready": "e2e/apply.spec.ts: createHmac('sha256','e2e-secret') signs the body, POST returns 200, Android (APK) link has the asset href, build pending count 0, outbox2 kinds == ['installers-ready','page-ready']", "make e2e -> 2 passed on a clean checkout; nothing written under repo communities/": "CI=true make e2e -> 2 passed (11.1s); communities/ holds only .gitkeep after the run, git status clean apart from the two e2e files" }, "summary": "Extended the e2e drive to assert the phase-3 building state + kit.json and a node:crypto-signed build-complete callback flipping the community page to ready with both emails.", "reason": "All acceptance clauses met; make e2e -> 2 passed, typecheck green, nothing written under communities/, merged to main via PR #107.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/coa#78
No description provided.