session: coa-builds workflow — clone matou-app@tag, fetch kit, build 5, release, HMAC callback (phase-3 plan Task 12) #80

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

Plan

docs/superpowers/plans/2026-08-31-coa-phase-3.md Task 12 (repo matou-collective/coa-builds on GitHub — ADR 0004: a thin build repo, not a fork).

Deliverable

.github/workflows/build.yml exactly as in the plan (jobs kit → desktop matrix mac-x64/mac-arm64/linux/windows + android on ubuntu-latest → release (Release coa-<slug>-v<N>, five assets, signed success callback) + failed (signed failure callback)); MATOU_APP_REF; fixture/kit.json (= FIXTURE_KIT) + fixture/logo.svg; README.

Acceptance

  • gh workflow run build.yml with the fixture kit produces a Release with exactly five assets named ngati-example-<version>-{mac-x64,mac-arm64}.dmg, -linux.AppImage, -win.exe, -android.apk; AppImage smoke step green; the callback body (to https://httpbin.org/post before COA is deployed) parses with BuildCompleteSchema; run URL recorded here.

depends_on

out_of_scope

Apple/Windows signing; auto-update feed.

## Plan `docs/superpowers/plans/2026-08-31-coa-phase-3.md` **Task 12** (repo `matou-collective/coa-builds` on GitHub — ADR 0004: a thin build repo, not a fork). ## Deliverable `.github/workflows/build.yml` exactly as in the plan (jobs `kit` → `desktop` matrix mac-x64/mac-arm64/linux/windows + `android` on ubuntu-latest → `release` (Release `coa-<slug>-v<N>`, five assets, signed success callback) + `failed` (signed failure callback)); `MATOU_APP_REF`; `fixture/kit.json` (= `FIXTURE_KIT`) + `fixture/logo.svg`; README. ## Acceptance - `gh workflow run build.yml` with the fixture kit produces a Release with exactly five assets named `ngati-example-<version>-{mac-x64,mac-arm64}.dmg`, `-linux.AppImage`, `-win.exe`, `-android.apk`; AppImage smoke step green; the callback body (to `https://httpbin.org/post` before COA is deployed) parses with `BuildCompleteSchema`; run URL recorded here. ## depends_on - human doors (Task 18: repo, PAT, `BUILD_WEBHOOK_SECRET`, keystore, tag) - matou-app kit plan Tasks 1–3 and 9 (https://git.matou.nz/Matou/coa/src/branch/main/docs/superpowers/plans/2026-08-31-matou-app-coa-kit.md) ## out_of_scope Apple/Windows signing; auto-update feed.
Author
Owner
matou-app tickets this workflow consumes: https://git.matou.nz/Matou/matou-app/issues/237, https://git.matou.nz/Matou/matou-app/issues/238, https://git.matou.nz/Matou/matou-app/issues/239, https://git.matou.nz/Matou/matou-app/issues/245
Author
Owner

Progress (session, 2026-09-01)

  • Workflow, MATOU_APP_REF, fixture/, README committed to matou-collective/coa-builds main at 803ff5a — https://github.com/matou-collective/coa-builds
  • Callback bodies (success + failure) built exactly as the workflow's jq does parse with BuildCompleteSchema; the openssl dgst -hmac hex equals Node's HMAC and verifySignature accepts it (x-coa-signature: sha256=<hex>).
  • Prove run dispatched: https://github.com/matou-collective/coa-builds/actions/runs/33458744257 — fixture kit served from raw.githubusercontent.com/matou-collective/coa-builds/main/fixture, callback to httpbin. Outcome to follow.

Deviations from the plan text (all toward matou-app's proven .github/workflows/build.yml): Go from backend/go.mod not a pinned 1.21; Android toolchain cached; release APK via scripts/android/build-release-apk.sh when present (kit plan Task 9) else build-aab.sh + gradlew assembleRelease (what matou-app CI does today); kit:apply --no-icons until icons.mjs exists (kit plan Task 2, matou-app #238); success-callback asset URLs derived from the real filenames rather than assumed names (before kit plan Task 3 the artefacts are still matou-<version>-…). MATOU_APP_REF is main until door 18a-v writes v0.5.0.

## Progress (session, 2026-09-01) - [x] Workflow, `MATOU_APP_REF`, `fixture/`, README committed to `matou-collective/coa-builds` `main` at `803ff5a` — https://github.com/matou-collective/coa-builds - [x] Callback bodies (success + failure) built exactly as the workflow's `jq` does parse with `BuildCompleteSchema`; the `openssl dgst -hmac` hex equals Node's HMAC and `verifySignature` accepts it (`x-coa-signature: sha256=<hex>`). - [ ] **Prove run dispatched:** https://github.com/matou-collective/coa-builds/actions/runs/33458744257 — fixture kit served from `raw.githubusercontent.com/matou-collective/coa-builds/main/fixture`, callback to httpbin. Outcome to follow. Deviations from the plan text (all toward matou-app's proven `.github/workflows/build.yml`): Go from `backend/go.mod` not a pinned 1.21; Android toolchain cached; release APK via `scripts/android/build-release-apk.sh` when present (kit plan Task 9) else `build-aab.sh` + `gradlew assembleRelease` (what matou-app CI does today); `kit:apply --no-icons` until `icons.mjs` exists (kit plan Task 2, matou-app #238); success-callback asset URLs derived from the real filenames rather than assumed names (before kit plan Task 3 the artefacts are still `matou-<version>-…`). `MATOU_APP_REF` is `main` until door 18a-v writes `v0.5.0`.
Author
Owner

Prove run 1 — https://github.com/matou-collective/coa-builds/actions/runs/33458744257 (matou-app main @ ff34cad, MATOU_APP_REF=main)

job result note
kit ✅ fixture fetched from raw.githubusercontent.com/…/fixture, slug/build checks, matou-app checkout, artifact
desktop mac-x64 ✅ matou-0.4.1-darwin-x64.dmg (146 MB)
desktop mac-arm64 ✅ matou-0.4.1-darwin-arm64.dmg
desktop windows ✅ matou-0.4.1-win32.exe
desktop linux ❌ smoke step only AppImage built (matou-0.4.1-linux.AppImage, 154 MB); my smoke ran squashfs-root/AppRun without APPDIR → /matou: No such file. Fixed in coa-builds 1fc3d2a (--appimage-extract-and-run).
android ❌ toolchain, npm ci, kit apply, gomobile .aar all green; assembleRelease → AAPT 'org.matou.coa.ngati-example' is not a valid package name. matou-app bug → Matou/matou-app#262 (apply-kit must map -→_ in androidApplicationId).
release skipped (needs all five)
failed ✅ signed failure callback accepted by httpbin: outcome:"failure", slug, build:1, runUrl, "error": "workflow failed: kit=success desktop=failure android=failure release=skipped" — header X-Coa-Signature: sha256=… present. Failure path proven end to end.

Findings for the plan / companion plan

  • electron-builder ${platform} yields darwin/win32, so the installer names are …-darwin-x64.dmg / …-win32.exe, not the -mac-x64.dmg / -win.exe the plan text and @coa/schema FIXTURE_ASSETS assume. If kit plan Task 3 (matou-app #239) wants mac/win, its artifactName must use ${os}. The coa-builds success callback derives asset URLs from the real filenames, so either naming works for COA.
  • MATOU_APP_REF=main builds a kitted app on four platforms today; only Android is blocked, by #262.

Run 2 (smoke fix) queued behind run 1 in the build-ngati-example concurrency group: https://github.com/matou-collective/coa-builds/actions/runs/33459061877 — expected: linux ✅, android ❌ (same #262) until the fix lands, then run 3 for the five-asset Release.

Also filed Matou/matou-app#261 — factor matou-app's build steps into composite actions so coa-builds stops carrying a copy of the recipe (after v0.5.0 + coa #81).

## Prove run 1 — https://github.com/matou-collective/coa-builds/actions/runs/33458744257 (matou-app `main` @ ff34cad, `MATOU_APP_REF=main`) | job | result | note | |---|---|---| | `kit` | ✅ | fixture fetched from `raw.githubusercontent.com/…/fixture`, slug/build checks, matou-app checkout, artifact | | `desktop mac-x64` | ✅ | `matou-0.4.1-darwin-x64.dmg` (146 MB) | | `desktop mac-arm64` | ✅ | `matou-0.4.1-darwin-arm64.dmg` | | `desktop windows` | ✅ | `matou-0.4.1-win32.exe` | | `desktop linux` | ❌ smoke step only | AppImage built (`matou-0.4.1-linux.AppImage`, 154 MB); my smoke ran `squashfs-root/AppRun` without `APPDIR` → `/matou: No such file`. **Fixed** in coa-builds `1fc3d2a` (`--appimage-extract-and-run`). | | `android` | ❌ | toolchain, `npm ci`, kit apply, gomobile `.aar` all green; `assembleRelease` → AAPT `'org.matou.coa.ngati-example'` is not a valid package name. **matou-app bug** → https://git.matou.nz/Matou/matou-app/issues/262 (apply-kit must map `-`→`_` in `androidApplicationId`). | | `release` | skipped | (needs all five) | | `failed` | ✅ | signed failure callback accepted by httpbin: `outcome:"failure"`, `slug`, `build:1`, `runUrl`, "error": "workflow failed: kit=success desktop=failure android=failure release=skipped" — header `X-Coa-Signature: sha256=…` present. Failure path proven end to end. | **Findings for the plan / companion plan** - electron-builder `${platform}` yields `darwin`/`win32`, so the installer names are `…-darwin-x64.dmg` / `…-win32.exe`, not the `-mac-x64.dmg` / `-win.exe` the plan text and `@coa/schema` `FIXTURE_ASSETS` assume. If kit plan Task 3 (matou-app #239) wants `mac`/`win`, its `artifactName` must use `${os}`. The coa-builds success callback derives asset URLs from the real filenames, so either naming works for COA. - `MATOU_APP_REF=main` builds a kitted app on four platforms today; only Android is blocked, by #262. **Run 2** (smoke fix) queued behind run 1 in the `build-ngati-example` concurrency group: https://github.com/matou-collective/coa-builds/actions/runs/33459061877 — expected: linux ✅, android ❌ (same #262) until the fix lands, then run 3 for the five-asset Release. Also filed https://git.matou.nz/Matou/matou-app/issues/261 — factor matou-app's build steps into composite actions so coa-builds stops carrying a copy of the recipe (after `v0.5.0` + coa #81).
Author
Owner

Prove run 2 — https://github.com/matou-collective/coa-builds/actions/runs/33459061877 (coa-builds 1fc3d2a, matou-app main @ ff34cad)

kit ✅ · mac-x64 ✅ · mac-arm64 ✅ · linux ✅ (AppImage smoke green with --appimage-extract-and-run) · windows ✅ · android ❌ same AAPT error (org.matou.coa.ngati-example) · release skipped · failed ✅ (signed failure callback accepted).

So the workflow is proven on everything except the Android package-name bug in matou-app. Fix is up as matou-app PR #263 (Matou/matou-app#263, closes #262; test:script 5/5; default-kit outputs regenerated). Forgejo push-mirrors main to GitHub on commit, so once #263 lands, run 3 with the same inputs should reach release and post the success callback. Waiting on its ci / checks + pr-e2e.

## Prove run 2 — https://github.com/matou-collective/coa-builds/actions/runs/33459061877 (coa-builds `1fc3d2a`, matou-app `main` @ ff34cad) `kit` ✅ · `mac-x64` ✅ · `mac-arm64` ✅ · `linux` ✅ (**AppImage smoke green** with `--appimage-extract-and-run`) · `windows` ✅ · `android` ❌ same AAPT error (`org.matou.coa.ngati-example`) · `release` skipped · `failed` ✅ (signed failure callback accepted). So the workflow is proven on everything except the Android package-name bug in matou-app. Fix is up as **matou-app PR #263** (https://git.matou.nz/Matou/matou-app/pulls/263, `closes #262`; `test:script` 5/5; default-kit outputs regenerated). Forgejo push-mirrors `main` to GitHub on commit, so once #263 lands, run 3 with the same inputs should reach `release` and post the success callback. Waiting on its `ci / checks` + `pr-e2e`.
Author
Owner

matou-app PR #263 merged (374cacf, closes #262; ci / checks 6m31s + pr-e2e 52s green) and Forgejo's push-mirror already carried main to GitHub.

Prove run 3 dispatched: https://github.com/matou-collective/coa-builds/actions/runs/33461616596 — same fixture inputs, MATOU_APP_REF=main now containing the Android fix. Expecting release with five assets + the signed success callback.

matou-app **PR #263 merged** (`374cacf`, `closes #262`; `ci / checks` 6m31s + `pr-e2e` 52s green) and Forgejo's push-mirror already carried `main` to GitHub. **Prove run 3 dispatched:** https://github.com/matou-collective/coa-builds/actions/runs/33461616596 — same fixture inputs, `MATOU_APP_REF=main` now containing the Android fix. Expecting `release` with five assets + the signed success callback.
Author
Owner

✅ Acceptance met — https://github.com/matou-collective/coa-builds/actions/runs/33461616596 (green end to end)

Release coa-ngati-example-v1 — exactly five assets:

key asset bytes
mac-x64 matou-0.4.1-darwin-x64.dmg 153,933,979
mac-arm64 matou-0.4.1-darwin-arm64.dmg 146,810,009
linux-appimage matou-0.4.1-linux.AppImage 154,069,003
windows matou-0.4.1-win32.exe 124,861,996
android ngati-example-0.4.1-android.apk 94,106,699
  • AppImage smoke green (runs the image with --appimage-extract-and-run).
  • APK signed with the COA upload keystore (:app:validateSigningRelease ran, no unsigned warning; versionCode=1 versionName=0.4.1 from the dispatch build + matou-app version).
  • Success callback delivered to httpbin with X-Coa-Signature: sha256=c1040182…; the echoed body was fed to BuildCompleteSchema locally → parses, assets keys exactly mac-x64,mac-arm64,linux-appimage,windows,android.
  • Failure path proven separately in runs 33458744257 / 33459061877 — the failed job posted a valid outcome:"failure" body with runUrl and a job-result error.

Repo state: matou-collective/coa-builds main — build.yml, MATOU_APP_REF (main; door 18a-v writes v0.5.0), fixture/kit.json + logo.svg, README. Recorded in coa 405ceef (STATUS + an As built note on plan Task 12).

Two notes for whoever runs #81:

  1. ngati-example desktop artefacts are still named matou-… because kit plan Task 3 (matou-app #239, artifactBase from the kit) hasn't landed — the callback derives asset URLs from the real filenames, so this is cosmetic, but the community page will show matou-… links until #239 does.
  2. Delete the fixture Release before the next fixture dispatch (gh release delete coa-ngati-example-v1 --cleanup-tag --repo matou-collective/coa-builds) — build=1 can't create an existing tag. It's left in place for now as the #80 evidence.
## ✅ Acceptance met — https://github.com/matou-collective/coa-builds/actions/runs/33461616596 (green end to end) Release **`coa-ngati-example-v1`** — exactly five assets: | key | asset | bytes | |---|---|---| | `mac-x64` | `matou-0.4.1-darwin-x64.dmg` | 153,933,979 | | `mac-arm64` | `matou-0.4.1-darwin-arm64.dmg` | 146,810,009 | | `linux-appimage` | `matou-0.4.1-linux.AppImage` | 154,069,003 | | `windows` | `matou-0.4.1-win32.exe` | 124,861,996 | | `android` | `ngati-example-0.4.1-android.apk` | 94,106,699 | - **AppImage smoke green** (runs the image with `--appimage-extract-and-run`). - **APK signed** with the COA upload keystore (`:app:validateSigningRelease` ran, no unsigned warning; `versionCode=1 versionName=0.4.1` from the dispatch `build` + matou-app version). - **Success callback** delivered to httpbin with `X-Coa-Signature: sha256=c1040182…`; the echoed body was fed to `BuildCompleteSchema` locally → **parses**, `assets` keys exactly `mac-x64,mac-arm64,linux-appimage,windows,android`. - **Failure path** proven separately in runs 33458744257 / 33459061877 — the `failed` job posted a valid `outcome:"failure"` body with `runUrl` and a job-result `error`. Repo state: `matou-collective/coa-builds` `main` — `build.yml`, `MATOU_APP_REF` (`main`; door 18a-v writes `v0.5.0`), `fixture/kit.json` + `logo.svg`, README. Recorded in coa `405ceef` (STATUS + an **As built** note on plan Task 12). Two notes for whoever runs #81: 1. `ngati-example` desktop artefacts are still named `matou-…` because kit plan Task 3 (matou-app #239, `artifactBase` from the kit) hasn't landed — the callback derives asset URLs from the real filenames, so this is cosmetic, but the community page will show `matou-…` links until #239 does. 2. **Delete the fixture Release before the next fixture dispatch** (`gh release delete coa-ngati-example-v1 --cleanup-tag --repo matou-collective/coa-builds`) — `build=1` can't create an existing tag. It's left in place for now as the #80 evidence.
Author
Owner

Deliverable is complete and proven (comment above). Left open deliberately: Forgejo refuses the close with 412 because this issue is registered as blocked by #79, whose doors 18a-v (tag matou-app v0.5.0 → MATOU_APP_REF) and 18b (approve the first real coa_shared run + dispatch) are still open. Close this together with #79; the only coa-builds change those doors imply is writing the tag into MATOU_APP_REF.

Deliverable is complete and proven (comment above). **Left open deliberately**: Forgejo refuses the close with `412` because this issue is registered as blocked by #79, whose doors **18a-v** (tag matou-app `v0.5.0` → `MATOU_APP_REF`) and **18b** (approve the first real `coa_shared` run + dispatch) are still open. Close this together with #79; the only coa-builds change those doors imply is writing the tag into `MATOU_APP_REF`.
Author
Owner

Closing on the phase-3 end-to-end proof (Ben ruled 2026-09-04): deploys live on matou, matou-smoke builds 1–2 + the fresh ngati-example chain all proven (submit → tenant → dispatch → run 33858085607 → Release coa-ngati-example-v1 → ready flip → installers-ready email delivered). Full record: STATUS.md d18adac + the proof comment on #81.

Closing on the phase-3 end-to-end proof (Ben ruled 2026-09-04): deploys live on `matou`, matou-smoke builds 1–2 + the fresh ngati-example chain all proven (submit → tenant → dispatch → run 33858085607 → Release coa-ngati-example-v1 → ready flip → installers-ready email delivered). Full record: STATUS.md d18adac + the proof comment on #81.
ben closed this issue 2026-09-04 21:31:39 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#80
No description provided.