Skip to content

Commit 7a6a2cd

Browse files
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67dTyler Longwell
andcommitted
Merge branch 'main' into eva/nip49-local-backup
* origin/main: (70 commits) feat(relay): make Postgres pool size configurable, default 50 (#3191) Publish symbol-bearing debug relay images (#3250) feat(tracing): add datastore tracing plumbing (#2760) fix(buzz-acp): accept id-keyed config options when resolving model switch (#2795) fix(desktop): probe legacy Goose install dir on Windows (#3248) refactor(desktop): extract install command execution into install_exec (#3251) Polish composer activity layout and transitions (#3151) feat(invites): add use-limited invite links (#3141) fix(node): bump Buzz-supplied Node runtimes past OpenClaw's >=24.15.0 floor (#3218) fix(desktop): preserve thread anchor through layout reflow (#3212) feat(search): parse from:/in:/after:/before: and pass them in the filter (#2871) fix(desktop): fetch join policies through native networking (#2862) fix(desktop): republish agent identity records when a persona rename propagates (#2607) fix(desktop): keep project Inbox previews compact (#3193) Inbox refactor (#2045) Fix composer selection formatting and drop overlay (#3172) Refine pending message status (#3153) feat(admin): show reported message content in report detail (#3149) fix(desktop): recover full local storage on startup (#3182) Replace mobile reconnect banners with skeleton shimmer (#3143) ... Co-authored-by: Tyler Longwell <[email protected]> Signed-off-by: Tyler Longwell <[email protected]>
2 parents dde3718 + 2ce2d71 commit 7a6a2cd

527 files changed

Lines changed: 48365 additions & 9858 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.

‎.env.example‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ REDIS_URL=redis://localhost:6379
3434
# Max connections in the relay's shared Redis pool (default 16).
3535
# BUZZ_REDIS_POOL_SIZE=16
3636

37+
# Max connections in each of the relay's Postgres pools — writer and, when
38+
# READ_DATABASE_URL is set, reader (default 50).
39+
# BUZZ_DB_POOL_SIZE=50
40+
3741
# -----------------------------------------------------------------------------
3842
# Typesense (search)
3943
# -----------------------------------------------------------------------------
@@ -105,7 +109,10 @@ RELAY_URL=ws://localhost:3000
105109
# -----------------------------------------------------------------------------
106110
# Logging / Tracing
107111
# -----------------------------------------------------------------------------
108-
RUST_LOG=buzz_relay=debug,buzz_db=debug,buzz_auth=debug,buzz_pubsub=debug,tower_http=debug
112+
RUST_LOG=buzz_relay=debug,buzz_datastore=info,buzz_db=debug,buzz_auth=debug,buzz_pubsub=debug,tower_http=debug
113+
# Optional OpenTelemetry-only target filter. This is deliberately independent
114+
# from RUST_LOG so log verbosity changes cannot break trace parentage.
115+
# BUZZ_OTEL_FILTER=buzz_relay=info,buzz_datastore=info
109116

110117
# OTLP tracing endpoint (optional — leave unset to disable)
111118
# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317

‎.gitattributes‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Git for Windows defaults to core.autocrlf=true, so without this every text
2+
# file lands in the working copy with CRLF. Biome formats with LF
3+
# (biome.json sets no lineEnding override), which fails `biome check` on
4+
# effectively every file, and
5+
# desktop/src/features/messages/ui/virtuaWheelModePatch.test.mjs asserts on
6+
# patches/*.patch with `\n`-joined patterns. Normalize to LF in the working
7+
# copy on every platform; the stored blobs are already LF.
8+
* text=auto eol=lf

‎.github/PULL_REQUEST_TEMPLATE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
<!-- Fixes #1234, or N/A. Before opening: search existing issues/PRs for duplicates — link the closest one, or say "none found". -->
66

77
### Testing
8-
<!-- How was this verified? -->
8+
<!-- How was this verified? UI change? Include before/after screenshots (or a short recording). -->

‎.github/workflows/ci.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,13 @@ jobs:
5959
mobile:
6060
- 'mobile/**'
6161
- 'scripts/mobile-release.sh'
62+
- 'scripts/mobile-worktree-overrides.sh'
63+
- 'scripts/mobile-worktree-clean.sh'
6264
- 'scripts/publish-mobile-release-candidate.sh'
6365
- 'scripts/release-rulesets.sh'
6466
- 'scripts/test-mobile-release-contract.sh'
6567
- 'scripts/test-mobile-release-candidate-publisher.sh'
68+
- 'scripts/test-mobile-worktree-overrides.sh'
6669
- '.github/workflows/mobile-release-candidate.yml'
6770
- '.github/workflows/ci.yml'
6871
- name: Release workflow source contract
@@ -71,6 +74,8 @@ jobs:
7174
run: |
7275
scripts/test-mobile-release-contract.sh
7376
scripts/test-mobile-release-candidate-publisher.sh
77+
- name: Mobile worktree identity contract
78+
run: scripts/test-mobile-worktree-overrides.sh
7479

7580
rust-lint:
7681
name: Rust Lint
@@ -335,6 +340,7 @@ jobs:
335340
cargo build --profile ci -p buzz-relay -p git-credential-nostr
336341
cargo nextest archive \
337342
--cargo-profile ci \
343+
-p buzz-db \
338344
-p buzz-relay \
339345
-p buzz-test-client \
340346
--lib \
@@ -666,11 +672,11 @@ jobs:
666672
done
667673
cat /tmp/buzz-relay.log
668674
exit 1
669-
- name: Invite claim security tests
675+
- name: Invite security tests
670676
run: |
671677
cargo nextest run \
672678
--archive-file target/ci/backend-integration-tests.tar.zst \
673-
-E 'package(buzz-relay) and test(claim_)' \
679+
-E '(package(buzz-db) and test(/relay_invite::tests/)) or (package(buzz-relay) and test(/api::invites::tests/))' \
674680
--run-ignored ignored-only
675681
env:
676682
DATABASE_URL: postgres://buzz:${{ env.BUZZ_TEST_POSTGRES_PASSWORD }}@localhost:5432/buzz

‎.github/workflows/docker.yml‎

Lines changed: 56 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Docker image
22

3-
# Builds and publishes the public Buzz relay image as ghcr.io/block/buzz.
3+
# Builds and publishes the public Buzz relay images as ghcr.io/block/buzz.
4+
# Normal tags contain stripped binaries; matching debug-* tags contain the same
5+
# optimized binaries with line-table debug information for native profilers.
46
#
57
# Strategy: each architecture builds on its native runner (ubuntu-24.04 for
68
# amd64, ubuntu-24.04-arm for arm64), pushes to GHCR by digest, then a final
@@ -15,8 +17,10 @@ name: Docker image
1517
#
1618
# Triggers:
1719
# - push to main → :main + :sha-<7>
20+
# + :debug-main + :debug-sha-<7>
1821
# - push tags relay-v*.*.* → :{version} + :{major}.{minor} + :{major}
19-
# (+ :latest for stable, NOT for prereleases)
22+
# + matching :debug-* tags
23+
# (+ :latest/:debug-latest for stable releases)
2024
# - pull_request → build only (no push), cache stays warm
2125
# - workflow_dispatch → manual relay-tag rescue at the tag itself
2226
#
@@ -95,10 +99,6 @@ jobs:
9599
runner: ubuntu-24.04-arm
96100
arch: arm64
97101

98-
outputs:
99-
# Used downstream by `merge` to stitch the manifest.
100-
version: ${{ steps.meta.outputs.version }}
101-
102102
steps:
103103
- name: Checkout
104104
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
@@ -163,12 +163,13 @@ jobs:
163163
org.opencontainers.image.description=WebSocket relay server for the Buzz communications platform
164164
org.opencontainers.image.licenses=Apache-2.0
165165
166-
- name: Build and push by digest
167-
id: build
166+
- name: Build and push release image by digest
167+
id: build-release
168168
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
169169
with:
170170
context: .
171171
file: ./Dockerfile
172+
target: runtime
172173
platforms: ${{ matrix.platform }}
173174
labels: ${{ steps.meta.outputs.labels }}
174175
# Push by digest, not by tag — the merge job assembles the tags
@@ -180,25 +181,49 @@ jobs:
180181
cache-to: |
181182
${{ (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.IMAGE_NAME, matrix.arch) || '' }}
182183
183-
- name: Export digest
184+
- name: Build and push debug image by digest
185+
id: build-debug
186+
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
187+
with:
188+
context: .
189+
file: ./Dockerfile
190+
target: runtime-debug
191+
platforms: ${{ matrix.platform }}
192+
labels: ${{ steps.meta.outputs.labels }}
193+
outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}
194+
cache-from: |
195+
type=registry,ref=${{ env.IMAGE_NAME }}-buildcache:${{ matrix.arch }}
196+
197+
- name: Export release and debug digests
184198
if: github.event_name != 'pull_request'
185199
env:
186-
DIGEST: ${{ steps.build.outputs.digest }}
200+
RELEASE_DIGEST: ${{ steps.build-release.outputs.digest }}
201+
DEBUG_DIGEST: ${{ steps.build-debug.outputs.digest }}
187202
run: |
188-
mkdir -p /tmp/digests
189-
touch "/tmp/digests/${DIGEST#sha256:}"
203+
mkdir -p /tmp/digests-release /tmp/digests-debug
204+
touch "/tmp/digests-release/${RELEASE_DIGEST#sha256:}"
205+
touch "/tmp/digests-debug/${DEBUG_DIGEST#sha256:}"
190206
191-
- name: Upload digest
207+
- name: Upload release digest
192208
if: github.event_name != 'pull_request'
193209
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
194210
with:
195-
name: digests-${{ matrix.arch }}
196-
path: /tmp/digests/*
211+
name: digests-release-${{ matrix.arch }}
212+
path: /tmp/digests-release/*
213+
if-no-files-found: error
214+
retention-days: 1
215+
216+
- name: Upload debug digest
217+
if: github.event_name != 'pull_request'
218+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
219+
with:
220+
name: digests-debug-${{ matrix.arch }}
221+
path: /tmp/digests-debug/*
197222
if-no-files-found: error
198223
retention-days: 1
199224

200225
merge:
201-
name: Merge multi-arch manifest
226+
name: Merge ${{ matrix.variant }} multi-arch manifest
202227
if: github.event_name != 'pull_request'
203228
runs-on: ubuntu-24.04
204229
needs: build
@@ -208,13 +233,21 @@ jobs:
208233
packages: write # push the merged manifest
209234
id-token: write # OIDC for provenance attestation on the manifest
210235
attestations: write
236+
strategy:
237+
fail-fast: false
238+
matrix:
239+
include:
240+
- variant: release
241+
tag_prefix: ""
242+
- variant: debug
243+
tag_prefix: debug-
211244

212245
steps:
213246
- name: Download all per-arch digests
214247
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
215248
with:
216249
path: /tmp/digests
217-
pattern: digests-*
250+
pattern: digests-${{ matrix.variant }}-*
218251
merge-multiple: true
219252

220253
- name: Set up Docker Buildx
@@ -237,9 +270,12 @@ jobs:
237270
# the build job's `meta` step for why match=^relay-v(.*)$, why
238271
# value=${{ inputs.version }} carries the rescue-dispatch version,
239272
# and why :latest is left to flavor.latest=auto.
273+
flavor: |
274+
latest=auto
275+
prefix=${{ matrix.tag_prefix }},onlatest=true
240276
tags: |
241277
type=ref,event=branch,enable=${{ github.event_name != 'workflow_dispatch' || inputs.version == '' }}
242-
type=sha,prefix=sha-,format=short,enable=${{ github.event_name != 'workflow_dispatch' || inputs.version == '' }}
278+
type=sha,prefix=${{ matrix.tag_prefix }}sha-,format=short,enable=${{ github.event_name != 'workflow_dispatch' || inputs.version == '' }}
243279
type=semver,pattern={{version}},match=^relay-v(.*)$,value=${{ inputs.version }}
244280
type=semver,pattern={{major}}.{{minor}},match=^relay-v(.*)$,value=${{ inputs.version }}
245281
type=semver,pattern={{major}},match=^relay-v(.*)$,value=${{ inputs.version }}
@@ -284,11 +320,12 @@ jobs:
284320
- name: Summary
285321
env:
286322
IMAGE_NAME: ${{ env.IMAGE_NAME }}
323+
VARIANT: ${{ matrix.variant }}
287324
MERGED_DIGEST: ${{ steps.manifest.outputs.digest }}
288325
META_TAGS: ${{ steps.meta.outputs.tags }}
289326
run: |
290327
{
291-
echo "### Published \`${IMAGE_NAME}\`"
328+
echo "### Published \`${IMAGE_NAME}\` (${VARIANT})"
292329
echo
293330
echo "**Digest:** \`${MERGED_DIGEST}\`"
294331
echo

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ jobs:
629629
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
630630
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
631631

632-
- name: Fix AppImage (remove infra libs, symlink system GStreamer)
632+
- name: Fix AppImage (remove infra libs, shim host GStreamer)
633633
run: |
634634
mapfile -t APPIMAGES < <(find desktop/src-tauri/target/release/bundle/appimage -name '*.AppImage' -type f)
635635
if [[ ${#APPIMAGES[@]} -eq 0 ]]; then

‎AGENTS.md‎

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ re-install hooks after env changes. Before agents run Git or hooks, activate the
108108
repo's Hermit environment (`. ./bin/activate-hermit`); do not rewrite hook
109109
commands to compensate for an unconfigured shell `PATH`.
110110

111+
**Commit with `git commit -s`.** The required **DCO Check** fails any PR with a commit missing a `Signed-off-by` trailer, and `just hooks` installs a `commit-msg` hook that adds it to commits you create locally (`git rebase` and `git cherry-pick` still need `--signoff`) — if you build commit commands programmatically, include `-s` every time. To repair a branch that already has unsigned commits: `git rebase --signoff main`, then force-push.
112+
111113
Additional rules:
112114
- No `unsafe` code
113115
- Do not introduce new `unwrap()` or `expect()` in production paths — use `?` and proper error types
@@ -341,9 +343,19 @@ Add specs to `desktop/tests/e2e/` and register them in `playwright.config.ts`
341343
(`smoke` project `testMatch`). Every test calls `installMockBridge(page)` for
342344
mock Tauri IPC. Mock pubkey, channel names, and UUIDs live in `e2eBridge.ts`.
343345

346+
**Always build with `pnpm build:e2e`, never `pnpm run build`.** The mock Tauri
347+
bridge is compiled in only for `--mode e2e` (see `installE2eBridgeIfConfigured`
348+
in `desktop/src/main.tsx`). A plain `pnpm run build` strips it, so
349+
`window.__TAURI_INTERNALS__` is never defined and **every** mock-mode spec fails
350+
with `Cannot read properties of undefined (reading 'invoke')` — the app renders
351+
"Community connection failed" instead of the UI under test. That looks exactly
352+
like a product bug rather than a build mistake, so it burns real time.
353+
`pnpm test:e2e:smoke` and `pnpm test:e2e:integration` run the right build for
354+
you; prefer them over a manual build plus `playwright test`.
355+
344356
**Stale server:** `reuseExistingServer: true` means a previous build's server
345-
serves old code. Kill port 4173 and `pnpm run build` before re-running tests
346-
after code changes.
357+
serves old code. Kill port 4173 and re-run `pnpm build:e2e` before re-running
358+
tests after code changes.
347359

348360
**`addInitScript` before bridge:** `page.addInitScript` (localStorage seeding)
349361
must run BEFORE `installMockBridge(page)` — React reads state on mount, the
@@ -553,6 +565,15 @@ To run the app locally (starts Docker, relay, iOS simulator automatically):
553565
just mobile-dev
554566
```
555567

568+
When run from a git worktree, `just mobile-dev` (and `just
569+
mobile-build-android`) give the debug build a per-worktree app identifier
570+
(keyed to the worktree directory name) and a branch-labelled app name via
571+
`scripts/mobile-worktree-overrides.sh`, so builds from multiple worktrees
572+
install side by side. Release builds are unaffected. `just mobile-clean`
573+
removes stale worktree-suffixed installs from simulators/emulators. See
574+
[mobile/README.md](mobile/README.md) for direct Xcode / Android Studio
575+
usage.
576+
556577
### Testing Conventions
557578

558579
- Prefer **widget tests** over unit tests for UI components — test the

‎CONTRIBUTING.md‎

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Buzz is an agent platform, so AI-assisted PRs are welcome. No need to disclose t
4343

4444
We squash-merge, so your PR title becomes the commit subject in `main`. Use [Conventional Commits](https://www.conventionalcommits.org/) format: `feat(mcp): add get_feed_actions tool`. The type prefix (`feat`, `fix`, `docs`, `refactor`, `test`, `chore`) is required. See the [Commit Messages](#commit-messages) section for the full reference.
4545

46+
Every commit needs a Developer Certificate of Origin sign-off, so commit with `git commit -s` — it appends the `Signed-off-by` trailer that certifies you wrote the change and can contribute it. The required **DCO Check** blocks merge without it on every commit, and it's the most common reason new PRs stall. If you already pushed unsigned commits, run `git rebase --signoff main` and force-push. Running `just hooks` installs a `commit-msg` hook that adds the trailer to commits created by `git commit` and `git merge`; other flows need their own flag — `git rebase --signoff`, `git cherry-pick -s`.
47+
4648
We review as capacity allows — focused PRs that follow this guide move fastest.
4749

4850
---
@@ -185,7 +187,7 @@ just ci
185187
```
186188

187189
This is the same check that runs in CI. PRs that fail `just ci` will not be
188-
merged.
190+
merged. If `just ci` fails on formatting, `just fix-all` fixes it in one shot (`rustfmt` + Tauri fmt + desktop, web, and mobile formatters).
189191

190192
---
191193

@@ -282,9 +284,34 @@ required. The scope (in parentheses) is optional but encouraged.
282284
- How to test it manually (if applicable)
283285
- Any follow-up work deferred to a future PR
284286

285-
### Review Process
287+
6. **Shows the UI** — any PR that changes the desktop or mobile UI includes
288+
before/after screenshots (or a short recording for interactions) in the
289+
description. We can't run every branch locally — screenshots let us review
290+
UI changes same-day instead of waiting for someone to build your branch.
291+
292+
### PRs We're Unlikely to Merge
293+
294+
Some kinds of PRs usually get closed — not because they're bad ideas, but
295+
because we can't safely review them without prior discussion:
296+
297+
- **Large refactors or dependency swaps** without a prior issue agreeing on
298+
the direction
299+
- **Cosmetic renames or style-only churn** that doesn't fix a bug or improve
300+
clarity
301+
- **Entirely new features** with no prior discussion
302+
- **Drive-by changes bundled into an unrelated fix** — split them out
303+
304+
If you're considering any of these, open an issue first and we'll tell you
305+
quickly whether it's a direction we'd merge. That saves your time as much as
306+
ours.
307+
308+
### What to Expect After You Open a PR
286309

287-
- We prioritize focused PRs that follow this guide and review as capacity allows.
310+
- Maintainers triage new PRs on a best-effort cadence. Focused PRs that
311+
follow this guide move fastest.
312+
- Duplicates and PRs that skip this guide may be closed with a pointer here
313+
rather than a full review. A close isn't a rejection of you or the idea —
314+
address the gaps and reopen (or open a fresh PR) anytime.
288315
- Address review comments by pushing new commits (don't force-push during
289316
review; it makes it hard to see what changed).
290317
- Once approved, a maintainer will squash-merge your PR.

0 commit comments

Comments
 (0)