Skip to content

Commit 3ce7c8a

Browse files
committed
Merge upstream block/buzz into main, with a real second parent
PR #7 landed upstream's *content* but not its history. gh-aw's create-pull-request safe output ships the agent's work as a git patch (`/tmp/gh-aw/aw-*.patch`, upstream-sync.lock.yml:1040), and a patch cannot carry a merge commit's second parent. So b111a7b arrived with a single parent despite its "Merge remote-tracking branch 'upstream/main'" subject, the merge base stayed at 63496cc, and GitHub kept reporting this fork 23 commits behind while those commits' changes were already in the tree. This is a real `git merge upstream/main`, so the merge base finally advances. Future syncs become incremental instead of re-resolving the same conflicts against a stale base every night. Three files conflicted, all already on the fork-local patch list: - desktop/src-tauri/src/lib.rs — both sides inserted a `mod` after `mod huddle;`: ours `linux_media` via the flattened patch, upstream `key_backup`. Union, alphabetical order kept. - Cargo.lock — `rlp` is fork-local and sits immediately before `rmcp`, which upstream touched. Pure union, checked with `cargo metadata --locked`. - .github/workflows/release.yml — see below. Two regressions the auto-merge introduced silently, both in release.yml, and neither raised as a conflict: 1. `assemble-manifest`'s gate. Upstream block#3568 added `needs.release.result == 'success'` plus the same for `release-macos-x64`. Both jobs are pinned to `block/buzz` and so always report `skipped` here, making the gate unsatisfiable in a fork — the exact failure 67917a9 fixed, where every updater archive and .sig uploaded and only latest.json was missing. Git saw no conflict because our side had *removed* a condition while upstream *added* these. Re-patched to accept either darwin-aarch64 lane and to tolerate `skipped` only for the signed x64 lane, so on block/buzz every lane must still succeed. 2. `release-macos-unsigned` was stranded on the pre-block#3568 release model. Upstream moved every platform lane to handing assemble-manifest a `desktop-release-*` workflow artifact; this lane is fork-local, so neither the restructure nor the `v` -> `desktop-v` tag rename reached it. Left alone it would `gh release upload` to a `v${VERSION}` tag that is no longer created, and its updater archive would never reach `staged` — leaving the fork's only darwin-aarch64 asset out of both the release and latest.json, which is the failure this lane exists to prevent. Ported to upload-artifact, tag prefix corrected, and `contents` dropped to `read` now that it touches no release. Verified: `cargo check --manifest-path desktop/src-tauri/Cargo.toml --all-targets` clean, `cargo metadata --locked` clean, release.yml parses, and the fork-local relay allowlist, productName, APP_DISPLAY_NAME, app_name, GHCR overrides and mesh-llm-rev patches all survived the merge. Signed-off-by: adrienlacombe <[email protected]>
2 parents 33b668c + 6e419b9 commit 3ce7c8a

70 files changed

Lines changed: 6142 additions & 524 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/auto-tag-on-release-pr-merge.yml‎

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Auto-tag on Release PR Merge
44
# prefix; the main chart lane also auto-detects a Chart.yaml version bump so
55
# a chart feature PR can publish its own new version when merged:
66
#
7-
# version-bump/<v> → tag v<v> → release.yml (desktop app)
7+
# version-bump/<v> → tag desktop-v<v> → release.yml (desktop app)
88
# relay-release/<v> → tag relay-v<v> → docker.yml (relay image)
99
# chart-release/<v> → tag chart-v<v> → helm-chart.yml (main helm chart)
1010
# push-chart-release/<v> → tag push-chart-v<v> → push-gateway-helm-chart.yml
@@ -35,6 +35,11 @@ permissions:
3535

3636
jobs:
3737
auto-tag:
38+
permissions:
39+
contents: read
40+
pull-requests: read
41+
checks: read
42+
statuses: read
3843
if: >
3944
github.event.pull_request.merged == true &&
4045
github.event.pull_request.head.repo.full_name == github.repository
@@ -57,7 +62,7 @@ jobs:
5762
case "$BRANCH" in
5863
version-bump/*)
5964
VERSION="${BRANCH#version-bump/}"
60-
TAG_PREFIX="v" ;;
65+
TAG_PREFIX="desktop-v" ;;
6166
relay-release/*)
6267
VERSION="${BRANCH#relay-release/}"
6368
TAG_PREFIX="relay-v" ;;
@@ -85,9 +90,34 @@ jobs:
8590
{
8691
echo "enabled=true"
8792
echo "tag=${TAG_PREFIX}${VERSION}"
93+
if [[ "$TAG_PREFIX" == desktop-v ]]; then
94+
echo "target_sha=${{ github.event.pull_request.head.sha }}"
95+
echo "desktop=true"
96+
else
97+
echo "target_sha=$GITHUB_SHA"
98+
echo "desktop=false"
99+
fi
88100
} >> "$GITHUB_OUTPUT"
89101
echo "Tagging ${TAG_PREFIX}${VERSION}"
90102
103+
104+
- name: Verify immutable reviewed desktop candidate
105+
if: steps.release.outputs.desktop == 'true'
106+
env:
107+
GH_TOKEN: ${{ github.token }}
108+
VERSION: ${{ steps.release.outputs.tag }}
109+
PR_NUMBER: ${{ github.event.pull_request.number }}
110+
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
111+
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
112+
PR_BASE_REF: ${{ github.event.pull_request.base.ref }}
113+
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
114+
PR_PUSHER: ${{ github.event.pull_request.head.user.login }}
115+
MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha }}
116+
run: |
117+
VERSION="${VERSION#desktop-v}"
118+
export VERSION
119+
scripts/verify-desktop-release-merge.sh
120+
91121
- name: Create release tagger token
92122
if: steps.release.outputs.enabled == 'true'
93123
id: release-tagger
@@ -102,21 +132,22 @@ jobs:
102132
env:
103133
GH_TOKEN: ${{ steps.release-tagger.outputs.token }}
104134
TAG: ${{ steps.release.outputs.tag }}
135+
TARGET_SHA: ${{ steps.release.outputs.target_sha }}
105136
run: |
106137
set -euo pipefail
107138
# Check gh's exit status, not its output. A missing ref returns a 404
108139
# JSON body on stdout, which must not be mistaken for an existing tag.
109140
if gh api "repos/$GITHUB_REPOSITORY/git/ref/tags/$TAG" --silent 2>/dev/null; then
110141
EXISTING_SHA="$(gh api "repos/$GITHUB_REPOSITORY/commits/$TAG" --jq .sha)"
111-
if [ "$EXISTING_SHA" = "$GITHUB_SHA" ]; then
112-
echo "Tag $TAG already exists at $GITHUB_SHA — skipping tag creation"
142+
if [ "$EXISTING_SHA" = "$TARGET_SHA" ]; then
143+
echo "Tag $TAG already exists at $TARGET_SHA — skipping tag creation"
113144
exit 0
114145
else
115-
echo "::error::Tag $TAG already exists at $EXISTING_SHA (expected $GITHUB_SHA)"
146+
echo "::error::Tag $TAG already exists at $EXISTING_SHA (expected $TARGET_SHA)"
116147
exit 1
117148
fi
118149
fi
119150
gh api --method POST "repos/$GITHUB_REPOSITORY/git/refs" \
120151
-f ref="refs/tags/$TAG" \
121-
-f sha="$GITHUB_SHA" \
152+
-f sha="$TARGET_SHA" \
122153
--silent

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ jobs:
7676
- '.github/workflows/ci.yml'
7777
- name: Release workflow source contract
7878
run: scripts/test-release-ref-contract.sh
79+
- name: Desktop release candidate contract
80+
run: scripts/test-desktop-release-candidate.sh
7981
- name: Mobile release contract
8082
run: |
8183
scripts/test-mobile-release-contract.sh
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Prepare Desktop Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: Semver to prepare (for example 0.5.1)
8+
required: true
9+
10+
env:
11+
RELEASE_AUTOMATION_NAME: Carl
12+
RELEASE_AUTOMATION_EMAIL: c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz
13+
14+
jobs:
15+
prepare:
16+
if: github.repository == 'block/buzz'
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
steps:
21+
- name: Create short-lived release preparer token
22+
id: preparer
23+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
24+
with:
25+
client-id: ${{ vars.BUZZ_RELEASE_TAGGER_CLIENT_ID }}
26+
private-key: ${{ secrets.BUZZ_RELEASE_TAGGER_PRIVATE_KEY }}
27+
permission-contents: write
28+
permission-pull-requests: write
29+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
30+
with:
31+
fetch-depth: 0
32+
token: ${{ steps.preparer.outputs.token }}
33+
- uses: cashapp/activate-hermit@cea9af7913204a965fd488637a8d1811bba2e616 # v1
34+
- name: Prepare immutable candidate and open or update PR
35+
env:
36+
GH_TOKEN: ${{ steps.preparer.outputs.token }}
37+
VERSION: ${{ inputs.version }}
38+
run: scripts/prepare-desktop-release.sh "$VERSION"

0 commit comments

Comments
 (0)