Skip to content

Commit 67917a9

Browse files
committed
fix(release): let a fork publish latest.json, unblocking desktop auto-update
Auto-update was not missing on this fork, it was one file short. The buzz-desktop-latest rolling release already holds the AppImage and Windows installer with their .sig files, BUZZ_UPDATER_ENDPOINT already points at this repo, the .sig files already verify against this fork's own signing key, and the app already polls on mount and every 6h. Only latest.json was never uploaded. assemble-manifest gated on `[ ${#TRIPLES[@]} -ge 3 ]`. Both macOS jobs stay pinned to block/buzz because Block's codesigning service is unreachable here, so they skip, only linux + windows remain, and the job died on "too few platforms (2)" every run. I had written in AGENTS.md not to fix this by lowering the threshold, and this does not. The count was a proxy for "no platform is missing" that could not tell a job that skipped from a job that broke. Asserting on the job results says what was meant, and is *stricter* than what it replaces: `-ge 3` passed when one macOS platform failed -- 3 of 4 succeeded -- publishing a manifest that silently stranded that platform's existing installs. That case now fails. success | skipped -> fine (skipped == structurally not built for this repo) anything else -> attempted and did not deliver, so publishing strands it The remaining count check is a floor for the config error where every platform skips at once, which the result loop alone would pass. Exercised the guard over six result combinations before committing: fork today (2 platforms, publishes), upstream all green (4, publishes), upstream one macOS failed (blocks -- the case the old rule let through), fork with linux broken (blocks), everything skipped (blocks), cancelled windows (blocks). YAML parses. Only this fork is affected: syncs flow upstream -> fork, so the change cannot reach block/buzz's own copy. Untouched, and documented as such: macOS gets no auto-update here, and not because of this guard -- macos-canary.yml passes no BUZZ_UPDATER_*, so build.rs leaves buzz_updater_enabled unset and tauri_plugin_updater is never registered. .deb stays non-updatable per Tauri. Signed-off-by: adrienlacombe <[email protected]>
1 parent 813279d commit 67917a9

2 files changed

Lines changed: 59 additions & 11 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,43 @@ jobs:
989989
add_triple "$RESULT_LINUX" linux-x86_64 "$ARCHIVE_LINUX"
990990
add_triple "$RESULT_WIN" windows-x86_64 "$ARCHIVE_WIN"
991991
992-
[ "${#TRIPLES[@]}" -ge 3 ] || { echo "::error::too few platforms (${#TRIPLES[@]})"; exit 1; }
992+
# FORK-LOCAL PATCH (adrienlacombe/buzz): was a bare `-ge 3`, which this
993+
# fork can never satisfy. Both macOS jobs stay pinned to block/buzz
994+
# because Block's internal codesigning service is unreachable here, so
995+
# they skip and only linux + windows remain. latest.json was therefore
996+
# never published and auto-update was dead on this fork — even though
997+
# every updater archive and .sig was already uploaded to the rolling
998+
# release. One missing file, not a missing feature.
999+
#
1000+
# This is not the lowered threshold that would publish an incomplete
1001+
# manifest as a complete one. The count was a proxy for "no platform is
1002+
# missing"; a proxy that could not tell a job that skipped from a job
1003+
# that broke. Asserting directly on the job results says what was meant,
1004+
# and is *stricter* here than the count it replaces: `-ge 3` passed with
1005+
# one macOS platform failed (3 of 4 succeeded), which silently stranded
1006+
# that platform's installs. Now any attempted platform that did not
1007+
# succeed fails the manifest.
1008+
for entry in \
1009+
"darwin-aarch64:$RESULT_ARM64" \
1010+
"darwin-x86_64:$RESULT_X64" \
1011+
"linux-x86_64:$RESULT_LINUX" \
1012+
"windows-x86_64:$RESULT_WIN"
1013+
do
1014+
platform="${entry%%:*}"
1015+
result="${entry#*:}"
1016+
case "$result" in
1017+
# skipped == structurally not built for this repo (the macOS jobs on
1018+
# a fork). Anything else — failure, cancelled — means it was
1019+
# attempted and did not deliver, so publishing would strand it.
1020+
success | skipped) ;;
1021+
*) echo "::error::$platform was attempted and did not succeed: $result"; exit 1 ;;
1022+
esac
1023+
done
1024+
1025+
# Floor, not the correctness check: catches a config error that skips
1026+
# every platform at once, which the loop above would otherwise pass.
1027+
[ "${#TRIPLES[@]}" -ge 1 ] || { echo "::error::no platforms produced an updater archive"; exit 1; }
1028+
echo "Publishing a manifest for ${#TRIPLES[@]} platform(s)."
9931029
bash desktop/scripts/generate-oss-latest-json.sh "$VERSION" "${TRIPLES[@]}" > latest.json
9941030
cat latest.json
9951031

‎AGENTS.md‎

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ place.
9393
| `.gitattributes` | `*.lock.yml linguist-generated` | Added by `gh aw init` |
9494
| `ci.yml` | mesh-llm rev read from `desktop/src-tauri/Cargo.lock` | Root lock pins `tag=v0.73.1` (`43103c5c`), desktop pins `rev=f455d493`. The step fetches the *desktop* manifest, so the root rev names a checkout never fetched. Upstream is masked by a warm cache — the step is skipped on cache hit |
9595
| `docker.yml` | `PUSH_GATEWAY_IMAGE` override; owner-correct attestation hint | Push-gateway image was hardcoded to `ghcr.io/block/buzz-push-gateway` in nine places, so `GHCR_IMAGE` could not retarget it |
96-
| `release.yml` | `RELEASE_REPO` guard on `setup` + `release-linux`; `BASE` and `BUZZ_UPDATER_ENDPOINT` derive from `github.repository` | Guards were pinned to `block/buzz`; the updater URLs were hardcoded to Block's releases, so a fork verified its artifacts against Block's rolling release and shipped builds polling Block for updates |
96+
| `release.yml` | `RELEASE_REPO` guard on `setup` + `release-linux`; `BASE` and `BUZZ_UPDATER_ENDPOINT` derive from `github.repository`; `assemble-manifest` asserts on job results instead of counting platforms | Guards were pinned to `block/buzz`; the updater URLs were hardcoded to Block's releases, so a fork verified its artifacts against Block's rolling release and shipped builds polling Block for updates. The `-ge 3` platform count was unreachable with both macOS jobs skipped, so `latest.json` was never published — see [Desktop auto-update](#desktop-auto-update-linux--windows--works) |
9797
| `linux-canary.yml`, `windows-canary.yml` | `RELEASE_REPO` guard | Were pinned to `block/buzz` |
9898
| `infra/aws/` | new directory | Terraform deploying the relay to AWS account `618867225791` (`eu-west-3`) on ECS Fargate + RDS + ElastiCache + S3 + EFS, serving `wss://relay.bitcoinmarkets.app`. Upstream deploys via `deploy/charts/buzz` (Helm) and has no Terraform, so this adds only new paths and should never conflict. See [`infra/aws/README.md`](infra/aws/README.md) |
9999
| `.github/workflows/deploy-aws.yml` | new | Continuous deployment of the relay to AWS on every push to `main`. Runs after `docker.yml` via `workflow_run`, authenticates by OIDC (no stored keys), and applies Terraform with the commit's immutable `:sha-<7>` image |
@@ -196,19 +196,31 @@ misconfiguration.
196196
failing. Use `macos-canary.yml` for an unsigned build; notarization needs
197197
either Block's #mdx-ios provisioning or a paid Apple Developer ID wired in
198198
directly.
199-
- **`release.yml`'s `assemble-manifest` job** — downstream of the above. It
200-
asserts `too few platforms` below three, refusing to publish a `latest.json`
201-
that would break macOS auto-update for its consumers. With both macOS jobs
202-
skipped a fork can only ever supply two, so **this job is permanently red
203-
here** and a `v*` tag run will never be fully green. `Setup`, `Release Linux`,
204-
and `Release Windows` all pass and attach real signed artifacts; only the
205-
manifest assembly fails. Do not "fix" it by lowering the threshold — that
206-
publishes an incomplete manifest as though it were complete, which is exactly
207-
what the assertion prevents.
199+
- **macOS auto-update** — follows from the above rather than from the updater.
200+
There is no signed macOS build to serve, and `macos-canary.yml` passes no
201+
`BUZZ_UPDATER_*`, so `build.rs` leaves `buzz_updater_enabled` unset and
202+
`lib.rs:339` never registers `tauri_plugin_updater` at all. An unsigned canary
203+
cannot self-update because the plugin is not compiled into it.
208204
- **Mobile release** — `mobile-release-candidate.yml` is dispatch-only, wants an
209205
exact `block/buzz` main SHA, and hands off to the private
210206
`squareup/sprout-releases` Buildkite pipeline.
211207

208+
### Desktop auto-update (Linux + Windows) — works
209+
210+
Previously listed here as permanently broken. It is not: `assemble-manifest`
211+
asserted `-ge 3` platforms, which a fork cannot reach with both macOS jobs
212+
skipped, so `latest.json` was never published — while every updater archive and
213+
`.sig` was already sitting in the `buzz-desktop-latest` rolling release. One
214+
missing file, not a missing feature. The guard now asserts on job results
215+
instead (see the `release.yml` row above), and `.deb` remains non-updatable by
216+
Tauri constraint (`release.yml:699`), so Linux auto-update is AppImage only.
217+
218+
The rest was already fork-correct: `BUZZ_UPDATER_ENDPOINT` points at this repo's
219+
rolling release, the fork's own throwaway signing keypair produces the `.sig`
220+
files, `desktop/scripts/generate-oss-latest-json.sh` hardcodes no platform, and
221+
the app checks on mount and every 6 h
222+
(`use-updater.ts:23`, `BACKGROUND_UPDATE_CHECK_INTERVAL_MS`).
223+
212224
Known-still-hardcoded upstream, not yet patched here: `helm-chart.yml` has a
213225
`GHCR_CHART_REPO` override but `push-gateway-helm-chart.yml` hardcodes
214226
`CHART_REPO` (`:20`), and `signed-macos-canary.yml:104` still carries the

0 commit comments

Comments
 (0)