Repository navigation
Conversation
5eb929b to
5a50f27
Compare
## Summary - Turning a private channel open changes who can read and join it for everyone who joined while it was private. The relay now refuses that change when the channel has, or once had, any other member. - Removed members count too, because their posts stay in the history that opening would make public. - Opening is still allowed when every member, current or removed, is the person making the change or one of that person's agents. A Solo chat that holds only its owner and the owner's agents is the main case. - Changing an open channel to private is unchanged. - A refused change stores nothing. The sender gets: `invalid: a private channel with other members cannot be made open; create a new open channel instead`. ## Details - The check is in the channel metadata edit path (kind:9002), for every channel type. An agent counts as the sender's own only when its owner is recorded for it through an owner attestation (NIP-OA). A member who has never signed in, or an agent with no recorded owner, counts as another member. - The check runs under the membership lock that a visibility change already takes. Members cannot be added between the check and the commit. - Disclosure levels for agents do not exist yet, so all of the sender's own agents may stay when the sender opens a channel. When levels land, restricted writers will need to be excluded. - `update_channel` in the store does not apply this rule. Only tests call it. User edits go through kind:9002. Both doc comments say so. - Old desktop builds can still send an opening edit. They now get the refusal as an error. - `NOSTR.md` documents the refusal on the kind:9002 row. ### Related issue None found. The client UX is in block/buzz-app#3145. ### Testing - New Postgres tests in `edit_metadata_postgres_tests.rs` cover: only the owner, the owner with their agent, the owner's removed agent, a removed person, another person, a member with no user record, someone else's agent, an agent sending with its owner as a member, and a stranger who joined while the channel was open. - Each refused case checks that the channel stays private and nothing is stored. The tests fail when the check is removed, when it skips removed members, or when the user join is made inner. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Logan Johnson <loganj@squareup.com> Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
5a50f27 to
fbc9698
Compare
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Star Lord recommends changes at fbc9698. Source review only.
kalvinnchau
left a comment
There was a problem hiding this comment.
🤖 Three P3 documentation and regression-test gaps. No current runtime defect is asserted by the test-coverage findings.
de0c10e to
7b501be
Compare
This comment has been minimized.
This comment has been minimized.
The relay refuses to make a private channel or chat open while it has a member who is neither the person changing it nor one of their own agents. General access and Convert to channel now disable View only and Public in that case and say why. Sharing such a Solo chat stops before the access confirmation with the same reason. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Logan Johnson <loganj@squareup.com>
The opening check can settle after someone picked Public or View only. General access now disables Change access and shows the reason in the open confirmation; Convert to channel disables Convert and shows the reason until Private is picked. Existing attempts keep Check status and Finish conversion. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Logan Johnson <loganj@squareup.com>
Tests now fail if Manage members stops passing the opening check, if Convert to channel stops loading member profiles or the agent inventory, or if either component disables Public and View only on a channel that is already open. The help text now says former members count too, as the relay rule does. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Logan Johnson <loganj@squareup.com>
The relay authorizes by the agent's recorded owner. A stale inventory entry for an agent whose verified owner is someone else no longer lets the UI offer an opening the relay refuses. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Logan Johnson <loganj@squareup.com>
7f9159f to
bc7ff81
Compare
jedwards27
left a comment
There was a problem hiding this comment.
Client-side prediction of the kind:9002 private→open rule in block/buzz#9307: check Desktop General access and Solo Share/Convert, and Mobile's reachable channel metadata edit path, against a relay enforcing it. The relay's refusal for a former member is invalid:, not blocked:.
🤖 :bot: Jude’s code review agent — Verdict: COMMENT; recommendation: request changes.
Reviewed: base 5b5f804f299f2d7166549b9989bbb50b7f5dacf3 to exact head bc7ff81c6ba717bac4f13b28857d6f903a8e5ec2 (three-dot PR diff). Risk: medium, user-visible access gating against a relay-owned identity rule.
Blocking finding (P2): src/features/channels/general-access.ts:85–92 treats a loaded profile with no agent marker plus absence from the completed client agent inventory as proof a roster member is human. An agent actually owned by the viewer in the relay's NIP-OA record, but omitted from that inventory and carrying an untagged profile, makes openingBlocked() return true even though the relay would allow opening. This wrongly disables Public/View in General access and Convert to channel and refuses Solo Share before save. The PR itself acknowledges this case while promising own-agent-only chats remain open. The new regression at general-access.test.ts:66–75 asserts the heuristic, not the missing owned-agent counterexample. Author action: do not turn absence of inventory/profile markers into affirmative person evidence; leave unclassified members to relay authorization (or use positive, authoritative evidence), and add the owned-agent/tagless/absent-inventory case alongside human and foreign-owner controls. The revised verified-foreign-owner-before-inventory precedence is sound, but does not solve this case.
Behavior/contracts traced: the predictor, General access late-settling confirmation, Solo Share's pre-save guard, Convert's new-attempt guard and existing-attempt recovery, and relay definitive-refusal propagation. No second author-side defect was established in those paths.
Validation: on a clean exact-head Mac worktree, five affected Vitest files passed 154/154 and pnpm check passed; a direct exact-input exercise returned openingBlocked=true for the tagless omitted owned agent. The changed Solo-sharing browser journey passed 16/16 on Chromium and WebKit with a fixture broker. git diff --check passed. Exact-head CI has CI required and Rust/tool integration green; the prior Rust advisory failure is no longer a gate at this head. The bootstrap helper reported an installed lefthook version below its minimum, so direct Hermit package gates were used.
Manual/native evidence: no exact-head running Desktop, Mobile, or OS VoiceOver test against an enforcing relay. Component AX descriptions and browser fixtures are not native proof. Verification owner: reviewer/tooling for the enforced-relay Desktop human/own-agent/former-member journeys, refusal with no visibility commit, and Mobile's reachable metadata-edit/Members path (Mobile currently exposes no equivalent visibility/share/convert action). Confirm relay deployment before exercising; this is a merge gate, not an additional author defect. Residual risk: live relay version and native AX remain unverified.
Recommendation: request changes for the concrete false-lockout defect above; the cross-client check is separately reviewer-owned.
Add tests that fail if the agent-list check, the profile agent flag, or Share's check after confirm is removed. The greyed-out reason now says "Create a new channel instead.", as the Share error does, since it also shows on View only and in Solo chats. Co-authored-by: McKeon <72469f4dd6e18e92a1b9af63766f05631a49b5d8f281910351d1728b8ad2dc4a@buzz.block.builderlab.xyz> Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Logan Johnson <loganj@squareup.com>
Summary
Details
relay-v0.3.0and older) would allow an opening that the app now greys out. The relay does not announce the rule, so the app cannot tell.docs/buzz-help.mdexplains the rule.Screenshots
A private channel with another person, in Manage members:
A private Solo chat with another person: Share, then General access:
The same chat in Convert to channel:
Testing
🤖 Generated with Claude Code
Human test: skipped by the author for team review (2026-11-17).
buzz-review-completed