Coa app updates — server half: -build.N installers, the latest*.yml feed files, /dl/<slug>/current, CORS on status.json (coa #140) #170

Open
ben wants to merge 0 commits from session/app-updates-spec into main
Owner

Builds coa #140 (spec docs/superpowers/specs/2026-09-30-coa-app-updates-design.md, plan docs/superpowers/plans/2026-09-30-coa-app-updates.md, both in this branch). The server half of Coa app updates: community desktop apps will self-update on Windows/Linux through electron-updater's generic feed at /dl/<slug>/current/, and Mac/Android apps read status.json for an update notice.

Server changes (Tasks 1–3 + the final-review fix):

  • PUT /api/build-upload/:slug/:build/:filename accepts the coa build version shape <matou-app version>-build.<N> in installer names, and exactly two update-feed files, latest.yml and latest-linux.yml (answered {url, feed, bytes}; never listed as assets). Everything else is still refused.
  • On a successful /api/build-complete, InstallerStore.promote points <slug>/current at v<build> — a relative symlink swapped atomically through a .current-* temp link. Prune runs only after a successful promote, so a failed promote never deletes the build current still serves.
  • Dev GET /c/:slug/status.json answers Access-Control-Allow-Origin: * (production gets the same from Caddy — mds PR #23).

Tests: server suite 21 files / 140 tests, tsc --noEmit clean.

Rollout (spec §5, in order): 1. merge + deploy this (coa GOTCHAS 17); 2. merge mds #23 and run the playbook -t coa; 3. merge matou-app #724 and cut a release; 4. merge coa-builds session/coa-app-updates WITH the MATOU_APP_REF bump to that release in the same PR; 5. first updater build on whakatohea-demo. Each step is harmless without the next. Two rulings are owed before step 5 on a re-founded slug (see the final review in the SDD ledger): a slug release resets the build number to 1, and whether pre-feature matou-app refs stay buildable.

🤖 Generated with Claude Code

Builds coa #140 (spec `docs/superpowers/specs/2026-09-30-coa-app-updates-design.md`, plan `docs/superpowers/plans/2026-09-30-coa-app-updates.md`, both in this branch). The server half of **Coa app updates**: community desktop apps will self-update on Windows/Linux through electron-updater's generic feed at `/dl/<slug>/current/`, and Mac/Android apps read `status.json` for an update notice. **Server changes (Tasks 1–3 + the final-review fix):** - `PUT /api/build-upload/:slug/:build/:filename` accepts the coa build version shape `<matou-app version>-build.<N>` in installer names, and exactly two update-feed files, `latest.yml` and `latest-linux.yml` (answered `{url, feed, bytes}`; never listed as assets). Everything else is still refused. - On a successful `/api/build-complete`, `InstallerStore.promote` points `<slug>/current` at `v<build>` — a relative symlink swapped atomically through a `.current-*` temp link. Prune runs only after a successful promote, so a failed promote never deletes the build `current` still serves. - Dev `GET /c/:slug/status.json` answers `Access-Control-Allow-Origin: *` (production gets the same from Caddy — mds PR #23). **Tests:** server suite 21 files / 140 tests, `tsc --noEmit` clean. **Rollout (spec §5, in order):** 1. merge + deploy this (coa GOTCHAS 17); 2. merge mds #23 and run the playbook `-t coa`; 3. merge matou-app #724 and cut a release; 4. merge coa-builds `session/coa-app-updates` WITH the `MATOU_APP_REF` bump to that release in the same PR; 5. first updater build on whakatohea-demo. Each step is harmless without the next. Two rulings are owed before step 5 on a re-founded slug (see the final review in the SDD ledger): a slug release resets the build number to 1, and whether pre-feature matou-app refs stay buildable. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Author
Owner

Pushed 10045f2 (Task 12, Ben's ruling on the final review's I2): the per-community build number now survives a slug release — the installer store keeps a per-slug high-water mark in <installers-root>/.builds.json (installers volume, outside the checkout), startBuild continues from it, removeAll leaves it alone. So a re-founded community's installed apps still see every rebuild as newer. Spec §2 + STATUS amended. Suite 146/146, tsc clean. I3 ruled by Ben: pre-feature matou-app refs are no longer buildable by coa-builds; rollback = manual install.

Pushed `10045f2` (Task 12, Ben's ruling on the final review's I2): the per-community build number now survives a slug release — the installer store keeps a per-slug high-water mark in `<installers-root>/.builds.json` (installers volume, outside the checkout), `startBuild` continues from it, `removeAll` leaves it alone. So a re-founded community's installed apps still see every rebuild as newer. Spec §2 + STATUS amended. Suite 146/146, tsc clean. I3 ruled by Ben: pre-feature matou-app refs are no longer buildable by coa-builds; rollback = manual install.
All checks were successful
ci / seam (pull_request) Successful in 49s
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin session/app-updates-spec:session/app-updates-spec
git switch session/app-updates-spec

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff session/app-updates-spec
git switch session/app-updates-spec
git rebase main
git switch main
git merge --ff-only session/app-updates-spec
git switch session/app-updates-spec
git rebase main
git switch main
git merge --no-ff session/app-updates-spec
git switch main
git merge --squash session/app-updates-spec
git switch main
git merge --ff-only session/app-updates-spec
git switch main
git merge session/app-updates-spec
git push origin main
Sign in to join this conversation.
No reviewers
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.

Dependencies

No dependencies set.

Reference
Matou/coa!170
No description provided.