Repository navigation
BUZZ-615: Add verified compact membership host reads - #2661
Draft
bradseiler wants to merge 6 commits into
Draft
bradseiler wants to merge 6 commits into
bradseiler wants to merge 6 commits into
Conversation
bradseiler
force-pushed
the
honor/buzz-615-client-membership
branch
from
November 6, 2026 22:47
0087ca4 to
6492be1
Compare
Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz> Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz> Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz> Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz> Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz> Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz> Signed-off-by: Brad Seiler <seiler@squareup.com>
bradseiler
force-pushed
the
honor/buzz-615-client-membership
branch
from
November 7, 2026 00:53
6492be1 to
52fbf9b
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Login currently uses full channel rosters to learn the viewer’s memberships. BUZZ-615 introduces a smaller signed response that separates membership discovery from peer rosters. This first slice adds the verified read path needed by that migration.
What
Add dedicated native and browser host operations that build the filter, sign the HTTP request, and return that attempt’s request ID, signer, origin and response together. Validate the signed snapshot and schedule reads through the existing reader.
How
The validator checks signature, event ID, tenant, viewer, request ID, host including port, type scope, completeness and content identity. Each read fetches fresh capability metadata from the same origin and pins its signing key. Only explicit unsupported behavior selects legacy fallback; denials, cancellation, malformed results and outages remain errors.
Each compact read starts a fresh attempt. The later session integration must serialize refreshes per viewer/community and accept only its newest outstanding attempt. Normal refresh costs two relay reads: NIP-11 and
/query. An array or 404 adds one descriptor refresh, for three reads.Risk
This slice is dark: startup remains legacy, no consumer requests compact snapshots, and
session.tsis unchanged. It reuses native signing, cancellation and HTTP admission, so regressions in those shared paths still matter. PR 1 can merge before block/buzz#9117 and #9118 because no runtime consumer calls this path. Success means green CI and unchanged app behavior. Revert PR 1 if its shared-path changes regress behavior; the relay capability flag becomes the rollback lever when the later startup slice calls this path.Testing
Published restack:
52fbf9bcc7eeecf0f3e6b007f888718d2c3836adon main22e4efd2e4d5e0c1d413869da322a1d82729748b. All six parent patches replay unchanged. Mandatory publication hooks passed from child6b92e2070; parent CI run 42320998300 is pending. Full local validation at the stacked child is pending. Earlier test and workflow evidence below keeps its original commit scope. Human testing remains pending.Exercised an actual local relay at relay head
da52f34397f120e00046470f4dfbe713936b5078with 468 memberships: signature, request binding, content identity, removal and role change passed. The real relay-to-client-validator witness accepted a signed host with its port and rejected the same result when the expected origin omitted the port.Coverage spans
membership-snapshot.test.ts,native.test.ts,reader.test.tsandbrowser-host/membership-broker.test.mjs. Ranpnpm exec vitest runat7cff167b3: 18,183 passed, 22 skipped. At the published head,pnpm exec vitest run src/features/relay/native.test.tspassed 70 tests; required pre-push checks passed withBUZZ_TEST_WORKERS=2. Local workflow commands werenode OUTBOX/BUZZ_615_LOCAL_WORKFLOW.mjsandnode OUTBOX/BUZZ_615_CLIENT_HOST_PORT.mjsfrom the validation workspace.Human testing is pending. Full native tests crashed with SIGSEGV in existing window-state code; the same crash also reproduces on baseline
3ce52cefc. Browser startup throughput and zero-roster startup acceptance belong to the later startup slice.Bigger picture
Part 1 of BUZZ-615, based on the relay contract in block/buzz#9117. Follow-ups migrate viewer authority, add bounded peer-roster demand, then switch compact startup with hint fencing, cache isolation and reconnect repair. No deployment or production enablement is included.
Generated with Codex
Stack created with GitHub Stacks CLI • Give Feedback 💬