Skip to content

Sync fork main with upstream block/buzz main - #61

Merged
yjc801 merged 13 commits into
mainfrom
claude/fork-sync-issue-60
Aug 14, 2026
Merged

Sync fork main with upstream block/buzz main#61
yjc801 merged 13 commits into
mainfrom
claude/fork-sync-issue-60

Conversation

@yjc801

@yjc801 yjc801 commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Resolves issue fork sync conflict with block/buzz main (2026-08-13) #60: fork-sync conflict merging upstream block/buzz main (0571f5455) into fork main (514996cb8).
  • Conflicts were in desktop/src/features/agents/lib/agentAutocompleteEligibility.test.mjs, desktop/src/features/messages/lib/useMentions.ts, and desktop/src-tauri/src/managed_agents/mod.rs — upstream's mention-eligibility changes landed alongside this fork's persona/workflow/managed-agent work touching the same files.
  • Reconciles useMentionAgentPubkeys to return directoryAgentPubkeys (computed internally) instead of taking it as a caller-supplied parameter, and threads activeCommunityRelayUrl through agentMentionRevalidation to match upstream's community-scoped mentionability check.

Test plan

  • cargo check --workspace and cargo check --manifest-path desktop/src-tauri/Cargo.toml — clean
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo fmt --check — clean
  • desktop: pnpm run typecheck, pnpm run lint — clean
  • desktop: full unit suite (node --test "src/**/*.test.mjs") — 4897/4897 passing
  • ./scripts/run-tests.sh unit (buzz-core, buzz-auth, buzz-voice, buzz-cli, buzz-db, buzz-conformance, buzz-push-gateway, buzz-backend-kubernetes, buzz-backend-sprites, buzz-waker) — all passing
  • DB/Redis-backed integration tests (just test) — not run; no Docker available in this environment

Closes #60.

🤖 Generated with Claude Code

wesbillman and others added 13 commits August 13, 2026 12:56
## Summary

- persist stable workflow run `error_code` values separately from human
diagnostics
- expose NIP-98 authenticated, channel-authorized run history and
approval reads with stable keyset pagination
- connect Desktop to those authoritative reads and return the
relay-created run ID on trigger
- show truthful loading, failure, and pending-trace states, and do not
render approval actions from non-actionable stored hashes

## Validation

- pre-push `branch-skew`, `desktop-typecheck`, `desktop-test`,
`rust-tests`, `desktop-tauri-checks`, and `desktop-check` all passed on
`a097dbe5f`
- Desktop tests: 4,761 passed, 0 failed
- `cargo check -p buzz-relay`
- `git diff --check`

## Remaining gate

This does not claim a relay-backed Playwright workflow journey. The
browser relay bridge still routes workflow invokes through in-memory
handlers; that production-shaped acceptance gate remains follow-up work
before Workflows can leave preview.

---------

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
Co-authored-by: Mongo <5c25403eab7271f9f94ddd4f2b270e8cac2c92e2c830c51877cca6ec974ffb3f@buzz.block.builderlab.xyz>
Co-authored-by: Princess Donut <68157ebd23b3897c1991015c3038658ea916200c67d3a54620b0754d1b92f6e0@buzz.block.builderlab.xyz>
…oxy (block#5799)

**Category:** fix (CI)
**User Impact:** None — test-only change that unblocks `main` and every
open PR.

**Problem:** `main` has been red since block#5629 landed on `45f4b91a3`:
`Desktop Smoke E2E (3)` fails `compact link preview image geometry
truncates long titles to one line` on every build (main run 31727837133,
and e.g. block#5792, block#5790). Two independently-green PRs raced: block#5629 added
the test stubbing its preview image at the raw relay origin
(`http://localhost:3000/media/*.png`), while block#5627 rewrites sent
snapshot media through the authenticated local media proxy
(`http://127.0.0.1:54321` in the E2E mock bridge). Merged together, the
image request goes to the proxy origin, the stub never matches, and
`naturalWidth` stays `0`.

**Solution:** Point the route stub at the mock proxy origin, matching
the existing `sent link preview media uses the authenticated proxy in
compact and rich cards` test in the same spec.

**Testing:** Reproduced the failure locally on `45f4b91a3`, then with
this fix: targeted test passes, and the full `messaging.spec.ts` smoke
suite passes 58/58.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Wintermute <3f1797424fd9ad6653a83665c660517777cd7f8c228c0d5907f49e01537f3ca5@buzz.block.builderlab.xyz>
…lock#5681)

## Summary
- allow channel-member remote/headless agents only with current kind
`10100` directory evidence, while stale member identities remain hidden
- fail closed while managed/relay directories load, error, or
background-refetch across channel, forum, and cached autocomplete
surfaces
- revalidate agent mention authorization immediately before normal sends
and message-edit saves, including after deferred uploads
- in owner-only builds, fetch fresh authoritative profile ownership at
send time and deny missing, changed-owner, or unavailable proofs
- preserve human mention tags when agent authorization is revoked or
unknown

Supersedes block#5536 because its contributor-fork head cannot be updated by
maintainers.

## Validation
Exact head: `7278cdd5fbcee676c7b858ea098503c62eeeff0d`

- mandatory pre-push suites passed: desktop check/typecheck/tests, Rust
tests, mobile tests, desktop Tauri checks, branch-skew
- desktop unit tests: 4,732 passed
- focused edit/ownership regressions: 8 passed
- focused mention E2E: 5 passed (remote positive, stale-member negative,
directory error, pre-send revocation, mid-send revocation)
- file-size ratchet passed

One first focused E2E batch had a timing-only miss where the send click
did not emit; the isolated rerun passed. One separate pre-push attempt
hit the existing randomized passphrase separator test; the successful
exact-head push reran and passed the mandatory suite.

---------

Signed-off-by: JDiz00 <174381550+JDiz00@users.noreply.github.com>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: JDiz00 <174381550+JDiz00@users.noreply.github.com>
Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
### What changed?

Inbox message action menus now show a standalone Delete action beside
Edit for manageable messages. Delete reuses the existing confirmation
and targets the message whose menu was opened, while the existing
empty-edit deletion path remains unchanged.

### Why?

Inbox users can delete a message directly without first entering edit
mode. Thread context can contain multiple messages, so the action must
preserve the active Inbox selection and delete only the chosen row.

### How is it tested?

Desktop checks, typechecking, builds, and test suites pass.

Added tests:

- [Inbox edit and delete E2E
coverage](https://github.com/block/buzz/tree/main/desktop/tests/e2e/inbox-edit.spec.ts)

Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Codex <noreply@openai.com>
## Summary

- return complete channel rosters instead of truncating at 1,000 members
- chunk `event_mentions` inserts inside one transaction so large kind
`39002` snapshots remain discoverable by every `p` tag
- add a targeted `buzz-admin reconcile-channels --channel <uuid>`
force-republish path for stale discovery snapshots
- cover a 1,501-member roster, 11,000-tag mention index, and kind
`39002` tag construction past member 1,000

## Why

The relay builds NIP-29 discovery and several authorization decisions
from `get_members()`, but that helper silently returned only the first
1,000 active members. Desktop then counted the truncated kind `39002`
event, while late members could be rejected by roster-scanning member
actions.

Removing the roster cap exposes PostgreSQL's 65,535 bind-parameter
ceiling in mention indexing, so the insert is chunked transactionally to
preserve all-or-nothing indexing.

The existing reconcilers only fill missing discovery events. The
targeted admin option bypasses the separately known 1,000-channel
reconciliation-list ceiling and replaces an existing channel snapshot
using the configured production relay key.

## Attribution

This supersedes and builds on block#3166 by @LordMelkor. Thank you for
identifying the roster boundary and contributing the original
complete-roster and mention-index patch. The production roster/query
changes and the two PostgreSQL regressions retain that work's shape;
this PR rebases it onto current `main`, adds relay coverage, and adds
the targeted repair operation requested for rollout.

## Validation

Exact pushed head: `24d02e4f3824150ed84913c9d230e675502e5b12`

- `cargo check -p buzz-db -p buzz-admin`
- `cargo test -p buzz-db
channel::tests::get_members_returns_full_roster_beyond_1000 -- --ignored
--exact --nocapture`
- `cargo test -p buzz-db
feed::tests::insert_mentions_indexes_rosters_past_bind_parameter_cap --
--ignored --exact --nocapture`
- `cargo test -p buzz-relay --lib
handlers::side_effects::tests::group_members_snapshot_keeps_members_past_one_thousand
-- --exact`
- `cargo run -q -p buzz-admin -- reconcile-channels --help`
- mandatory pre-push hook: branch-skew, desktop checks/typecheck/tests,
mobile tests, Rust tests, and desktop Tauri checks all passed on the
pushed head

## Rollout

1. Deploy the relay/backend build.
2. Run `buzz-admin reconcile-channels --channel <general-channel-uuid>`
with `BUZZ_RELAY_PRIVATE_KEY` configured.
3. Verify the replacement kind `39002` roster count matches the active
database membership count.

No schema migration or desktop release is required.

Fixes block#3156
Supersedes block#3166

---------

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
## Summary

- add `just desktop-release-smoke`, a deterministic desktop
correctness/reachability smoke against an ephemeral real local relay
- preserve existing DM history when the first live DM enters a pageless
query window, the desktop-v0.5.10 disappearing-DM regression
- enforce foreground JS ordering: a frame and actionable sidebar input
must dispatch before mounted stale queries begin resume refetches, while
separately requiring the navigation to commit promptly
- seed a 10,000-event dense-second fixture and verify exact event-ID
reachability, SHA-256 identity, ordering, duplicate absence, bounded
mounted rows, and drained render work
- isolate Postgres per run, serialize the shared Redis DB, retain
phase/relay/Playwright diagnostics, and gate desktop release manifest
assembly on the smoke

This is deliberately **not a performance-regression gate**. CDP and
action timing fields are informational only. There is no
candidate/baseline comparison or threshold. A future performance lane
needs repeated equivalent fixtures, discrete interaction samples, and an
explicit comparator/noise policy.

The diagnostics record the fixture version, row count, wall-clock base
timestamp (`fixtureSecond`), expected event-ID hash, observed state, and
measurements. Because the created-at floor requires a current timestamp,
paired comparison remains disabled.

The release job runs on an isolated GitHub-hosted runner. The script
also guards automatic local runs with a Redis allocation lock. Its
remaining direct-PID cleanup and free-port selection race mean it should
not be repurposed onto a persistent concurrent shared runner without
first hardening process-group cleanup and port reservation.

### Related issue

N/A

### Testing

- `pnpm --dir desktop typecheck`
- focused real-local-relay release smoke passed after adversarial review
fixes
- identical DM witness passed current and failed `desktop-v0.5.10` with
the history-loss signature
- identical foreground witness bytes
(`2c1e97df04c9b8ca0304b66bbbe9bdb4d08924ad8ce0f68a9c490458fcc3aca8`)
failed `desktop-v0.5.10` structurally: the first resume fetch was marker
1, before first frame/sidebar dispatch at marker 8
- with PR block#5696 (`59f613c40`) merged, the witness showed focus at 951.3
ms, first frame at 951.6 ms, click dispatch at 952.1 ms, first resume
fetch at 968.9 ms, and route commit at 992.4 ms
- the gate therefore protects first paint and actionable input dispatch;
route commit is a bounded responsiveness witness, not a prerequisite for
resume work
- the corrected focused foreground scenario passed at
`6d9b5be40da58bbee92a856b04c3558946d0a950`; the prior merged-tree full
run passed DM retention and 10k reachability before exposing this
contract mismatch
- pre-push passed on exact pushed head
`6d9b5be40da58bbee92a856b04c3558946d0a950`, including desktop checks,
typecheck, desktop tests, Rust tests, mobile tests, and Tauri checks
- full 10,000-event scenario reached 10,000/10,000 exact IDs with
matching SHA-256, 199 continuation requests, and 95 mounted rows in
about 4.4 minutes
- reduced-row review run passed in 18.4 seconds

### Foreground witness boundary

The Chromium test is a deterministic JS policy gate. Headless Chromium
does not expose an honest blur/focus transition in this fixture, so the
test drives the production focus listener and `document.hasFocus()`
predicate together and records that simulation explicitly. It proves
refetch fan-out ordering, not AppKit activation, WKWebView paint, or an
activating physical click. A packaged macOS native lane is still
required before claiming the actual desktop activation experience is
certified.

---------

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
## Summary

- inset the in-app Huddle tray with four rounded corners and even 8px
spacing when Glass background is enabled
- keep the popped-out Huddle dock full-width
- hide and suppress Glass background on Linux

## Why

The in-app tray reused the opaque backing needed by non-glass windows,
which covered the native vibrancy around it. Linux does not support this
window treatment.

## Testing

- `pnpm -C desktop build:e2e`
- focused Appearance and Huddle Playwright smoke tests
- pre-push desktop checks, typecheck, and 4,666 unit tests

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: Princess Donut <b238ea756dee4d98afa5883fc7f1de61eeabe65bf700e3a5a5a80db5e42e2c2b@buzz.block.builderlab.xyz>
Co-authored-by: Princess Donut <b238ea756dee4d98afa5883fc7f1de61eeabe65bf700e3a5a5a80db5e42e2c2b@buzz.block.builderlab.xyz>
## Summary

- avoid blocking first-DM navigation on a full channel-list refresh
- publish the initial message through the acknowledged HTTP path instead
of waiting on a missing WebSocket acknowledgement

## Validation

- 4,715 desktop unit tests
- desktop typecheck and checks
- focused new-DM Playwright coverage

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
Co-authored-by: Mongo <9cfd347903944d5b85aa6c93d2ab67381b978a92a31914bca69998968752a1d7@buzz.block.builderlab.xyz>
…sue-60

Resolves conflicts in agentAutocompleteEligibility.test.mjs,
useMentions.ts, and managed_agents/mod.rs from upstream's mention
eligibility changes landing alongside this fork's persona/workflow
work. Reconciles useMentionAgentPubkeys to return directoryAgentPubkeys
instead of taking it as a parameter, and threads
activeCommunityRelayUrl through agent mention revalidation to match.

Signed-off-by: Junchao Yan <yjc801@gmail.com>
getAgentMentionAdmission's lenient-member rule requires isMember and
compares against directoryAgentPubkeys, but revalidateAgentMentionPubkeys
called it without either — a channel-member agent with no kind:10100
directory record that the picker correctly admits was then denied by the
mandatory pre-send revalidation pass, silently dropping its mention tag
(no wake, no audience promotion, no Huddle enrollment) while the visible
@name stayed in the message text.

Thread channel-membership pubkeys through revalidateAgentMentionPubkeys
and useAgentMentionRevalidation, and derive directoryAgentPubkeys from the
freshly refetched relay directory so revalidation applies the same
admission rule the picker uses.

Reported-by: Alex <alex@buzz>
Signed-off-by: Junchao Yan <yjc801@gmail.com>
The prior fix passed the picker's cached membership set into revalidation
while the managed-agent and relay directories were freshly refetched. That
left a stale-membership window: if another admin removed a directory-less
agent after the picker/draft loaded, the cached member set still marked it
a member, so isLenientMember kept admitting it and the send emitted its
mention/wake tag for an agent no longer in the channel. The membership
query's 30s staleTime and user-scoped invalidation subscription don't fence
against another member's removal.

Refetch the channel roster in the same Promise.all as the managed/relay
directory refetches and derive membership from that fresh result. Fail
closed (deny) when the roster refetch errors or returns no data, matching
the existing fail-closed behavior for the other directory fetches.

Reported-by: Alex <alex@buzz>
Signed-off-by: Junchao Yan <yjc801@gmail.com>
Round-2's fail-closed roster refetch ran unconditionally, so a new-DM
composer (MessageComposer with channelId=null, eligibilityScope
"managed-only", before onPrepareSendChannel creates the channel) had no
roster to fetch, failed closed, and stripped a valid managed-agent mention
before the DM was ever created.

Roster proof is only relevant to the lenient channel-member admission
branch. Fetch it only when eligibilityScope.type === "channel"; other
scopes use an empty member set and are admitted on the managed/relay
directory checks alone, same as before the roster refetch existed.

Reported-by: Alex <alex@buzz>
Signed-off-by: Junchao Yan <yjc801@gmail.com>
GitHub's mergeability check reports CONFLICTING (mergeStateStatus DIRTY,
PUT /pulls/61/update-branch fails 422) for this branch against main at
31d9b41, even at the exact SHAs GitHub itself reports. Local git
(merge-tree --write-tree, merge --no-commit, both -s recursive and -s ort,
checked against each of the two criss-cross merge-bases individually)
comes back 100% clean every time - including for
desktop/tests/e2e/messaging.spec.ts, the file GitHub's web UI shows a
conflict marker for around the block#5627 media-proxy route change.

This branch and main share two independent merge-bases (this branch's own
prior upstream-sync merge, plus main's separate absorption of overlapping
commits). Git's recursive/ort strategy resolves criss-cross histories by
computing a virtual merge base from the two real ones first; GitHub's
merge engine is known to handle multi-merge-base histories more naively
and can report a conflict where a virtual-base merge finds none. Landing
this merge commit directly (computed with real git, not GitHub's engine)
sidesteps the discrepancy: the branch head now already contains main, so
GitHub's own compare/merge check has nothing left to resolve.

Signed-off-by: Junchao Yan <yjc801@gmail.com>
@yjc801
yjc801 merged commit a114f66 into main Aug 14, 2026
26 checks passed
@yjc801
yjc801 deleted the claude/fork-sync-issue-60 branch August 14, 2026 03:14
yjc801 added a commit that referenced this pull request Aug 14, 2026
main advanced again while this PR was open (PR #61, a separate
fork-sync, landed first). Resolved the resulting conflicts by
comparing each side against upstream block/buzz main (df9e773) as
ground truth rather than guessing:

- desktop/src/app/AppHuddleShell.tsx: took this branch's side — it
  matches upstream exactly (the Huddle keyboard-shortcut handler and
  glass drawer backdrop), while main's version was stale/regressed
  there.
- agentAutocompleteEligibility.ts/.test.mjs, agentMentionRevalidation.ts/
  .test.mjs, useMentions.ts, useMentionAgentPubkeys.ts,
  useMentionSendFlow.ts/.helpers.ts: took main's side. Both branches
  independently re-resolved the same underlying conflict (fork's
  member-mention feature vs. upstream's bcf353c authz fix) but
  landed on different designs; main's version was already reviewed by
  Alex in PR #61, and its own test comments document a real bug in
  this branch's alternative approach (a second allow-list gate that
  makes the member-admission branch unreachable, hiding legitimate
  member agents).

Signed-off-by: Junchao Yan <yjc801@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fork sync conflict with block/buzz main (2026-08-13)

5 participants