Skip to content

Commit 44bb203

Browse files
committed
fix(ci): stabilize fork publishing and desktop smoke fixtures
Publish images, caches, and packaged Helm charts under the owning repository, preserving explicit image overrides and upstream defaults. Persist thread fixtures without live delivery and arrange failed queries before project navigation. Add the reply after the cold-query failure so background history cannot mask the error and Retry must fetch it. Bind duplicate audio-player assertions to message IDs across timeline reordering. Loop the short fixture so only explicit playback handoff can satisfy the pause assertion, and exercise handoff in both directions. Backport the smoke-spec fixes from upstream block#8343 (7b11c61). The huddle voice-menu test waits for the composer's delayed autofocus before it opens the popover. The empty-edit test edits a per-test message with a real event id instead of the seeded non-hex welcome message. The workflow test fills the step inspector only after it shows the new step. Signed-off-by: Tee8z <[email protected]>
1 parent 67e4d4c commit 44bb203

12 files changed

Lines changed: 273 additions & 114 deletions

‎.github/workflows/docker.yml‎

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Docker image
22

3-
# Builds and publishes the public Buzz relay images as ghcr.io/block/buzz.
3+
# Builds and publishes the public Buzz relay images as ghcr.io/<owner>/<repo>
4+
# (ghcr.io/block/buzz upstream) plus the matching -push-gateway image.
45
# Normal tags contain stripped binaries; matching debug-* tags contain the same
56
# optimized binaries with line-table debug information for native profilers.
67
#
@@ -77,10 +78,11 @@ concurrency:
7778
permissions: {}
7879

7980
env:
80-
# Single source of truth for the image name. Set GHCR_IMAGE as a repo
81-
# variable to override (e.g., for forks that want to push to their own
82-
# namespace without forking this file).
83-
IMAGE_NAME: ${{ vars.GHCR_IMAGE != '' && vars.GHCR_IMAGE || 'ghcr.io/block/buzz' }}
81+
# Single source of truth for the image names. Both default to the running
82+
# repository's namespace, so forks publish (and cache) in their own registry.
83+
# Set GHCR_IMAGE / GHCR_PUSH_GATEWAY_IMAGE as repo variables to override.
84+
IMAGE_NAME: ${{ vars.GHCR_IMAGE != '' && vars.GHCR_IMAGE || format('ghcr.io/{0}', github.repository) }}
85+
PUSH_GATEWAY_IMAGE: ${{ vars.GHCR_PUSH_GATEWAY_IMAGE != '' && vars.GHCR_PUSH_GATEWAY_IMAGE || format('ghcr.io/{0}-push-gateway', github.repository) }}
8486

8587
jobs:
8688
build:
@@ -104,6 +106,11 @@ jobs:
104106
arch: arm64
105107

106108
steps:
109+
- name: Normalize image names
110+
shell: bash
111+
run: |
112+
printf 'IMAGE_NAME=%s\nPUSH_GATEWAY_IMAGE=%s\n' "${IMAGE_NAME,,}" "${PUSH_GATEWAY_IMAGE,,}" >> "$GITHUB_ENV"
113+
107114
- name: Checkout
108115
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
109116
with:
@@ -330,6 +337,11 @@ jobs:
330337
tag_prefix: debug-
331338

332339
steps:
340+
- name: Normalize image names
341+
shell: bash
342+
run: |
343+
printf 'IMAGE_NAME=%s\nPUSH_GATEWAY_IMAGE=%s\n' "${IMAGE_NAME,,}" "${PUSH_GATEWAY_IMAGE,,}" >> "$GITHUB_ENV"
344+
333345
- name: Checkout source
334346
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
335347
with:
@@ -414,7 +426,7 @@ jobs:
414426
415427
- name: Attest provenance for the merged image
416428
# Sigstore-signed in-toto attestation, verifiable with:
417-
# gh attestation verify oci://ghcr.io/block/buzz:<tag> --owner block
429+
# gh attestation verify oci://<IMAGE_NAME>:<tag> --owner <repository owner>
418430
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
419431
with:
420432
subject-name: ${{ env.IMAGE_NAME }}
@@ -481,13 +493,13 @@ jobs:
481493
echo
482494
echo "Verify provenance:"
483495
echo '```'
484-
echo "gh attestation verify oci://${IMAGE_NAME}@${MERGED_DIGEST} --owner block"
496+
printf 'gh attestation verify oci://%s@%s --owner %s\n' "$IMAGE_NAME" "$MERGED_DIGEST" "$GITHUB_REPOSITORY_OWNER"
485497
echo '```'
486498
if [[ "$VARIANT" == "release" ]]; then
487499
echo
488500
echo "Verify deployment eligibility:"
489501
echo '```'
490-
echo "gh attestation verify oci://${IMAGE_NAME}@${MERGED_DIGEST} --repo block/buzz --signer-workflow block/buzz/.github/workflows/docker.yml --predicate-type https://buzz.block.xyz/attestations/deployment-eligibility/v1 --source-digest ${SOURCE_SHA}"
502+
printf 'gh attestation verify oci://%s@%s --repo %s --signer-workflow %s/.github/workflows/docker.yml --predicate-type https://buzz.block.xyz/attestations/deployment-eligibility/v1 --source-digest %s\n' "$IMAGE_NAME" "$MERGED_DIGEST" "$GITHUB_REPOSITORY" "$GITHUB_REPOSITORY" "$SOURCE_SHA"
491503
echo '```'
492504
fi
493505
} >> "$GITHUB_STEP_SUMMARY"
@@ -510,6 +522,11 @@ jobs:
510522
runner: ubuntu-24.04-arm
511523
arch: arm64
512524
steps:
525+
- name: Normalize image names
526+
shell: bash
527+
run: |
528+
printf 'IMAGE_NAME=%s\nPUSH_GATEWAY_IMAGE=%s\n' "${IMAGE_NAME,,}" "${PUSH_GATEWAY_IMAGE,,}" >> "$GITHUB_ENV"
529+
513530
- name: Checkout
514531
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
515532
with:
@@ -539,7 +556,7 @@ jobs:
539556
id: meta
540557
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0
541558
with:
542-
images: ghcr.io/block/buzz-push-gateway
559+
images: ${{ env.PUSH_GATEWAY_IMAGE }}
543560
labels: |
544561
org.opencontainers.image.title=Buzz Push Gateway
545562
org.opencontainers.image.description=Capability-gated APNs last hop for Buzz
@@ -552,9 +569,9 @@ jobs:
552569
file: ./Dockerfile.push-gateway
553570
platforms: ${{ matrix.platform }}
554571
labels: ${{ steps.meta.outputs.labels }}
555-
outputs: type=image,name=ghcr.io/block/buzz-push-gateway,push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}
556-
cache-from: type=registry,ref=ghcr.io/block/buzz-push-gateway-buildcache:${{ matrix.arch }}
557-
cache-to: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && format('type=registry,ref=ghcr.io/block/buzz-push-gateway-buildcache:{0},mode=max,compression=zstd', matrix.arch) || '' }}
572+
outputs: type=image,name=${{ env.PUSH_GATEWAY_IMAGE }},push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}
573+
cache-from: type=registry,ref=${{ env.PUSH_GATEWAY_IMAGE }}-buildcache:${{ matrix.arch }}
574+
cache-to: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && format('type=registry,ref={0}-buildcache:{1},mode=max,compression=zstd', env.PUSH_GATEWAY_IMAGE, matrix.arch) || '' }}
558575
- name: Export digest
559576
if: github.event_name != 'pull_request'
560577
env:
@@ -614,6 +631,11 @@ jobs:
614631
id-token: write
615632
attestations: write
616633
steps:
634+
- name: Normalize image names
635+
shell: bash
636+
run: |
637+
printf 'IMAGE_NAME=%s\nPUSH_GATEWAY_IMAGE=%s\n' "${IMAGE_NAME,,}" "${PUSH_GATEWAY_IMAGE,,}" >> "$GITHUB_ENV"
638+
617639
- name: Download per-arch digests
618640
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
619641
with:
@@ -632,7 +654,7 @@ jobs:
632654
id: meta
633655
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6.1.0
634656
with:
635-
images: ghcr.io/block/buzz-push-gateway
657+
images: ${{ env.PUSH_GATEWAY_IMAGE }}
636658
tags: |
637659
type=ref,event=branch,enable=${{ github.event_name != 'workflow_dispatch' || inputs.version == '' }}
638660
type=sha,prefix=sha-,format=short,enable=${{ github.event_name != 'workflow_dispatch' || inputs.version == '' }}
@@ -646,15 +668,15 @@ jobs:
646668
run: |
647669
set -euo pipefail
648670
tags=(); while IFS= read -r tag; do [ -n "$tag" ] && tags+=("-t" "$tag"); done <<< "$META_TAGS"
649-
digests=(); for digest in *; do digests+=("ghcr.io/block/buzz-push-gateway@sha256:${digest}"); done
671+
digests=(); for digest in *; do digests+=("${PUSH_GATEWAY_IMAGE}@sha256:${digest}"); done
650672
docker buildx imagetools create "${tags[@]}" "${digests[@]}"
651673
first_tag=$(echo "$META_TAGS" | head -n1)
652674
digest=$(docker buildx imagetools inspect "$first_tag" --format '{{json .Manifest}}' | jq -r '.digest')
653675
echo "digest=${digest}" >> "$GITHUB_OUTPUT"
654676
- name: Attest gateway image provenance
655677
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
656678
with:
657-
subject-name: ghcr.io/block/buzz-push-gateway
679+
subject-name: ${{ env.PUSH_GATEWAY_IMAGE }}
658680
subject-digest: ${{ steps.manifest.outputs.digest }}
659681
push-to-registry: true
660682
- name: Gateway publication summary
@@ -664,7 +686,7 @@ jobs:
664686
run: |
665687
set -euo pipefail
666688
{
667-
echo "### Published \`ghcr.io/block/buzz-push-gateway\`"
689+
echo "### Published \`${PUSH_GATEWAY_IMAGE}\`"
668690
echo
669691
printf "**Digest:** \`%s\`\n" "$GATEWAY_DIGEST"
670692
echo
@@ -675,6 +697,6 @@ jobs:
675697
echo
676698
echo 'Verify provenance before deployment:'
677699
echo "\`\`\`"
678-
printf 'gh attestation verify oci://ghcr.io/block/buzz-push-gateway@%s --owner block\n' "$GATEWAY_DIGEST"
700+
printf 'gh attestation verify oci://%s@%s --owner %s\n' "$PUSH_GATEWAY_IMAGE" "$GATEWAY_DIGEST" "$GITHUB_REPOSITORY_OWNER"
679701
echo "\`\`\`"
680702
} >> "$GITHUB_STEP_SUMMARY"

‎.github/workflows/helm-chart.yml‎

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,24 @@ on:
3939
- "deploy/charts/buzz/**"
4040
- "deploy/charts/buzz-push-gateway/**"
4141
- ".github/workflows/helm-chart.yml"
42+
- "scripts/package-chart.sh"
43+
- "scripts/test-chart-packaging.sh"
4244
- "ct.yaml"
4345

4446
# Match docker.yml: deny-by-default, each job grants only what it needs.
4547
permissions: {}
4648

4749
env:
50+
IMAGE_REPOSITORY: ${{ vars.GHCR_IMAGE != '' && vars.GHCR_IMAGE || format('ghcr.io/{0}', github.repository) }}
51+
# Fork Docker builds publish main; upstream retains the chart's appVersion.
52+
IMAGE_TAG: ${{ github.repository != 'block/buzz' && 'main' || '' }}
4853
# Single source of truth for the OCI chart repository (helm appends the chart
49-
# name `buzz`, yielding oci://ghcr.io/block/buzz/charts/buzz, which is exactly
50-
# the install ref documented in deploy/charts/buzz/README.md). Set
51-
# GHCR_CHART_REPO as a repo variable to override (e.g., forks pushing to their
52-
# own namespace without editing this file) — mirrors docker.yml's GHCR_IMAGE.
53-
CHART_REPO: ${{ vars.GHCR_CHART_REPO != '' && vars.GHCR_CHART_REPO || 'oci://ghcr.io/block/buzz/charts' }}
54+
# name `buzz`, yielding oci://ghcr.io/<owner>/<repo>/charts/buzz; upstream
55+
# that is the install ref documented in deploy/charts/buzz/README.md). The
56+
# default follows the running repository so forks publish to their own
57+
# namespace. Set GHCR_CHART_REPO as a repo variable to override — mirrors
58+
# docker.yml's GHCR_IMAGE.
59+
CHART_REPO: ${{ vars.GHCR_CHART_REPO != '' && vars.GHCR_CHART_REPO || format('oci://ghcr.io/{0}/charts', github.repository) }}
5460

5561
jobs:
5662
lint-and-unittest:
@@ -86,6 +92,9 @@ jobs:
8692
- name: Build chart dependencies
8793
run: helm dependency build deploy/charts/buzz
8894

95+
- name: Verify packaged image defaults
96+
run: scripts/test-chart-packaging.sh deploy/charts/buzz
97+
8998
- name: Push gateway chart lint + render guard
9099
run: deploy/charts/buzz-push-gateway/tests/render.sh
91100

@@ -165,6 +174,11 @@ jobs:
165174
contents: read
166175
packages: write # push the chart to GHCR
167176
steps:
177+
- name: Normalize chart repository
178+
shell: bash
179+
run: |
180+
printf 'CHART_REPO=%s\n' "${CHART_REPO,,}" >> "$GITHUB_ENV"
181+
168182
- name: Checkout
169183
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
170184
with:
@@ -226,7 +240,7 @@ jobs:
226240
run: helm dependency build deploy/charts/buzz
227241

228242
- name: Package chart
229-
run: helm package deploy/charts/buzz --destination dist
243+
run: scripts/package-chart.sh deploy/charts/buzz "$IMAGE_REPOSITORY" "$IMAGE_TAG" dist
230244

231245
- name: Push chart to GHCR
232246
env:
@@ -241,7 +255,7 @@ jobs:
241255
CHART_REPO: ${{ env.CHART_REPO }}
242256
VERSION: ${{ steps.ver.outputs.version }}
243257
run: |
244-
# CHART_REPO is oci://ghcr.io/block/buzz/charts; helm push appends the
258+
# CHART_REPO is oci://ghcr.io/<owner>/<repo>/charts; helm push appends the
245259
# chart name, so the install ref is .../charts/buzz.
246260
INSTALL_REF="${CHART_REPO}/buzz"
247261
{

‎.github/workflows/push-gateway-helm-chart.yml‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,14 @@ on:
1616
- "deploy/charts/buzz-push-gateway/**"
1717
- "crates/buzz-push-gateway/src/config.rs"
1818
- ".github/workflows/push-gateway-helm-chart.yml"
19+
- "scripts/package-chart.sh"
20+
- "scripts/test-chart-packaging.sh"
1921
permissions: {}
2022
env:
21-
CHART_REPO: oci://ghcr.io/block/buzz/charts
23+
IMAGE_REPOSITORY: ${{ vars.GHCR_PUSH_GATEWAY_IMAGE != '' && vars.GHCR_PUSH_GATEWAY_IMAGE || format('ghcr.io/{0}-push-gateway', github.repository) }}
24+
# Defaults to the running repository's namespace so forks publish to their
25+
# own registry; GHCR_CHART_REPO overrides it (same variable as helm-chart.yml).
26+
CHART_REPO: ${{ vars.GHCR_CHART_REPO != '' && vars.GHCR_CHART_REPO || format('oci://ghcr.io/{0}/charts', github.repository) }}
2227
jobs:
2328
validate:
2429
runs-on: ubuntu-latest
@@ -33,6 +38,7 @@ jobs:
3338
with: { version: v3.16.4 }
3439
- run: deploy/charts/buzz-push-gateway/tests/render.sh
3540
- run: deploy/charts/buzz-push-gateway/tests/release-contract.sh
41+
- run: scripts/test-chart-packaging.sh deploy/charts/buzz-push-gateway
3642
publish:
3743
if: github.event_name != 'pull_request'
3844
needs: validate
@@ -41,6 +47,10 @@ jobs:
4147
contents: read
4248
packages: write
4349
steps:
50+
- name: Normalize chart repository
51+
shell: bash
52+
run: |
53+
printf 'CHART_REPO=%s\n' "${CHART_REPO,,}" >> "$GITHUB_ENV"
4454
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
4555
with:
4656
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || '' }}
@@ -66,5 +76,5 @@ jobs:
6676
registry: ghcr.io
6777
username: ${{ github.repository_owner }}
6878
password: ${{ secrets.GITHUB_TOKEN }}
69-
- run: helm package deploy/charts/buzz-push-gateway --destination dist
79+
- run: scripts/package-chart.sh deploy/charts/buzz-push-gateway "$IMAGE_REPOSITORY" main dist
7080
- run: helm push "dist/buzz-push-gateway-${VERSION}.tgz" "$CHART_REPO"

‎.github/workflows/sprig-image.yml‎

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Sprig image
22

33
# Builds and publishes the public agent container image as
4-
# ghcr.io/block/buzz-sprig — the digest-pinned box the Kubernetes backend
5-
# deploys agents into (see Dockerfile.sprig and docs/remote-agents.md).
4+
# ghcr.io/<owner>/<repo>-sprig (ghcr.io/block/buzz-sprig upstream) — the
5+
# digest-pinned box the Kubernetes backend deploys agents into (see
6+
# Dockerfile.sprig and docs/remote-agents.md).
67
#
78
# Strategy mirrors docker.yml (the relay image): each architecture builds on
89
# its native runner, pushes to GHCR by digest, then a merge job stitches the
@@ -17,7 +18,7 @@ name: Sprig image
1718
# - workflow_dispatch → manual publish at the current ref
1819
#
1920
# NOTE: the first push creates the GHCR package PRIVATE by default. An org
20-
# admin must flip ghcr.io/block/buzz-sprig to public once (Package settings →
21+
# admin must flip the sprig package to public once (Package settings →
2122
# Change visibility). Subsequent pushes keep the visibility.
2223

2324
on:
@@ -46,9 +47,10 @@ concurrency:
4647
permissions: {}
4748

4849
env:
49-
# Single source of truth for the image name; override with the
50-
# GHCR_SPRIG_IMAGE repo variable (same pattern as docker.yml).
51-
IMAGE_NAME: ${{ vars.GHCR_SPRIG_IMAGE != '' && vars.GHCR_SPRIG_IMAGE || 'ghcr.io/block/buzz-sprig' }}
50+
# Single source of truth for the image name; it defaults to the running
51+
# repository's namespace so forks publish to their own registry. Override
52+
# with the GHCR_SPRIG_IMAGE repo variable (same pattern as docker.yml).
53+
IMAGE_NAME: ${{ vars.GHCR_SPRIG_IMAGE != '' && vars.GHCR_SPRIG_IMAGE || format('ghcr.io/{0}-sprig', github.repository) }}
5254

5355
jobs:
5456
build:
@@ -72,6 +74,11 @@ jobs:
7274
arch: arm64
7375

7476
steps:
77+
- name: Normalize image name
78+
shell: bash
79+
run: |
80+
printf 'IMAGE_NAME=%s\n' "${IMAGE_NAME,,}" >> "$GITHUB_ENV"
81+
7582
- name: Checkout
7683
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
7784
with:
@@ -156,6 +163,11 @@ jobs:
156163
attestations: write
157164

158165
steps:
166+
- name: Normalize image name
167+
shell: bash
168+
run: |
169+
printf 'IMAGE_NAME=%s\n' "${IMAGE_NAME,,}" >> "$GITHUB_ENV"
170+
159171
- name: Download per-arch digests
160172
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
161173
with:
@@ -213,7 +225,7 @@ jobs:
213225
echo "digest=${merged_digest}" >> "$GITHUB_OUTPUT"
214226
215227
- name: Attest provenance for the merged image
216-
# Verify with: gh attestation verify oci://ghcr.io/block/buzz-sprig:<tag> --owner block
228+
# Verify with: gh attestation verify oci://<IMAGE_NAME>:<tag> --owner <repository owner>
217229
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
218230
with:
219231
subject-name: ${{ env.IMAGE_NAME }}

0 commit comments

Comments
 (0)