Repository navigation
feat(solo): let chat owners change agent access - #3704
Conversation
Reuse member role menus and confirmed administration for existing Solo agents. Verify signed agent profiles before signing and publication; retain the human-role, addition and ownership-transfer restrictions. Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
e6dfcaa to
a365529
Compare
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Star Lord — Changes needed at a365529: the relay can reject demotions of current agents or restore a removed agent’s access during an in-flight role edit. Please also confirm whether Solo chat owners should be able to grant Admin to another person’s agent, and whether Viewing only should govern channel permissions alone. Source review only. The browser journey simulates relay acceptance.
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Carl, an automated reviewer, commenting via Wes's GitHub account.
Changes requested at a365529. The relay does not limit Solo role edits to agents: its generic kind 9000 path lets a Solo owner set admin, member or guest on any member the target's policy allows (role authority). That makes this PR's client check the only thing enforcing "agents only", and right now it accepts unverified profile metadata (inline).
The earlier review's relay findings still hold on relay main at 11970789eb: the removed-agent race, a refused demotion leaving Admin in place, and a false join notice. Those threads stand as written. The race is narrower than it looked: the second preflight's expectedRole check catches a removal that lands before it, so only the gap between that check and the relay commit remains. Only the relay can close that gap.
No behavior change outside Solo. Non-Solo, system-channel, removal and ownership-transfer paths behave as before.
Open product question for Wes: should a Solo owner be able to grant Admin to an agent someone else owns? The tests deliberately allow it, while #3647 limits automatic grants to owned agents.
To merge: require verified agent identity for the Solo exception, resolve or explicitly accept the relay-side findings, and validate against a real relay. CI and the browser journey simulate relay acceptance.
Use a dedicated relay command carrying the current role. Allow owners to lower access for existing participants and verify agent ownership for promotions. Keep the menu, confirmation, and broker contract aligned. Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Describe downgrades for current members, verified agent promotions, and which chat permissions Viewing only grants. Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
|
🤖 @wesbillman The fixes are in At |
kalvinnchau
left a comment
There was a problem hiding this comment.
🤖 Two remaining concerns: role controls are offered without relay support, and the new rejection fixtures do not detect removal of expected-role validation.
Keep automatic Admin grants on the existing invitation command when the caller omits the manual role-update option. Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Exercise missing and invalid expected roles, the tag name, and the requested role independently in the shared signing fixture. Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Wait for the action menu only while it is open and capture the confirmation using its own dialog locator. Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Carry the relay advertisement through the existing web and desktop member administration writers. Hide Solo role controls and reject manual role edits before signing when the advertisement is absent. Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
|
🤖 @kalvinnchau Both fixes are in The shared signing fixture now isolates missing, misnamed, and invalid TypeScript, 376 focused tests, and the pre-push checks passed at |
kalvinnchau
left a comment
There was a problem hiding this comment.
🤖 The previous support-gating and fixture findings are repaired. One client/relay visibility mismatch remains.
Require signed private visibility in the shared Solo role authority and cover menu visibility, removal, and the publication preflight. Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
**Category:** improvement **User Impact:** Solo chat owners can lower the access of any current non-owner, including people and agents. **Problem:** Using invitations to change Solo chat access can restore a removed member, reject a downgrade because of the target’s invitation policy, or show a join notice for a role change. **Solution:** Add signed role updates that require an active member at the expected role when the relay commits the change. A Solo owner can downgrade any current non-owner. Moving a viewer to Participating requires a verified agent, and granting Admin requires ownership of that agent. The relay refreshes signed group state without emitting a join notice. Companion to [block/buzz-app#3704](block/buzz-app#3704). The [app review](block/buzz-app#3704 (review)) identified the need for conditional writes, verified agent identity and live relay validation. [#9592](#9592) introduced the atomic removal that uses the same membership lock. <details> <summary>File changes</summary> **crates/buzz-core/src/kind.rs** Register signed Solo role updates as kind 9050. **crates/buzz-db/src/store/channel_members.rs** Authorize the transition under the channel membership lock and commit the active row update and signed event together. **crates/buzz-relay/src/handlers/event.rs** Give the new command a bounded metrics label. **crates/buzz-relay/src/handlers/ingest.rs** Use the shared signed ingest path and require the channel administration scope. **crates/buzz-relay/src/handlers/mod.rs** Register the command handler and its PostgreSQL test. **crates/buzz-relay/src/handlers/solo_member_role.rs** Parse the command, route it to the conditional write, and refresh signed group state after commit. **crates/buzz-relay/src/handlers/solo_member_role_postgres_tests.rs** Exercise human and agent changes, restrictive invitation policy, promotion authorization, stale and removed membership, duplicate receipt, and signed roster updates through the relay’s production ingest path. **docs/solo-mobile-contract.md** Describe the wire format, permitted transitions, and handling when an older relay rejects the command. </details> ### Try it 1. Run the updated relay and the companion app against a disposable Solo chat with a current human and agent. Open **Chat access** as the owner. 2. Lower the human to **Viewing only**. Reopen **Chat access** and confirm the saved role. A role change should produce no join notice. 3. Downgrade an agent with a restrictive invitation policy. Confirm its role changes. Check that **Admin** can be granted only to your own verified agent. 4. Run `solo_owner_edits_active_members_and_publishes_the_new_roster` with PostgreSQL to check that a pending change for a removed member is refused and the signed roster stays clear of that member. ### Validation - The PostgreSQL regression passes at relay commit `405f7d1da`. It covers role and invite-policy enforcement, signed roster refresh, duplicate receipts, and rejection after removal. - The companion app at `a470947dc6` passes 138 administration tests. Its production command builder, validator, and signed roster reader also passed over WebSocket against a local relay backed by PostgreSQL and Redis. A human moved from Admin to Participating to Viewing only, then was removed. The app preflight and relay both refused a further role edit, and the signed roster still excluded the member. - The live check exercised the app’s relay code headlessly. The UI walkthrough is pending. --------- Signed-off-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Tom Brow <tomb@block.xyz> Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz> Co-authored-by: Tom Brow <tomb@block.xyz>
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Carl, an automated reviewer, commenting via Wes's GitHub account.
No blockers at 0e2251a. The Court checked the client against relay main 946d9c3467 (block/buzz#9667). The menu, both preflights and the relay's 9050 transaction agree on every transition. All earlier threads are addressed at this head: the conditional write, admission policy and join notice are fixed in the relay, the agent-identity proof and private-only gate are fixed in the client, and the expected-role fixtures now isolate each constraint.
The two inline P3s are non-blocking. The PR body is stale: it still says people's roles get no choices and cites a365529076 for validation. At this head, owners can lower any non-owner's access, as docs/solo/sharing.md describes. Please update it.
Validation gaps: source review plus green CI at this head. Nobody has run this against a real or deployed relay; the browser journey simulates acceptance. The client proves ownership from the agent's signed profile, while the relay uses its stored ownership record. If those disagree, the owner gets an offered choice that the relay refuses. That's safe, but please check the refusal message during relay acceptance.
Product questions for Wes: should Solo owners be able to demote people at all? If so, should a person moved to Viewing only be restorable? Today only remove and re-invite works. Design should review the confirmation for that case.
To merge: update the PR body, address or accept the inline P3s, and complete relay acceptance on a relay advertising buzz-solo-member-role.
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@feedback.communities.buzz.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
|
🤖 @wesbillman The follow-ups are in All 226 affected Vitest tests and the Rust production IPC signing test passed. An isolated build of the merged relay advertised the capability, accepted two downgrades, and refused a mismatched ownership grant and an edit after removal. The signed roster matched the expected result after each operation. Could you review the latest push so GitHub can clear the merge requirement? |
Overview
Category: improvement
User Impact: Owners of Private Solo chats can change existing members’ access from the member menu when their relay supports Solo role updates.
Problem: The Solo member menu offered removal as the only way to change an existing member’s access.
Solution: Owners can lower the access of current non-owners, restore participation for verified agents, and grant Admin to their own verified agents. The app checks relay support, signed Private visibility, and current membership before signing and again before publishing. The relay applies the conditional command only if the target’s current role still matches.
Changes
buzz-solo-member-rolein NIP-11. Member removal is available independently.9050through the purpose-bound writer. The command carries the expected role, and the app checks the updated signed roster before reporting success. Relay support is in feat(relay): add conditional Solo member role updates buzz#9667.Reproduction steps
Validation
0e2251a892. Chromium and WebKit covered the application flow against a simulated relay. CI runb741f17a17, including the shared Bot-to-Admin fixture and the native transport’s self-target rejection.b741f17a17.Recording
A short walkthrough of the owner opening agent access, canceling without a change, confirming Admin access, and verifying the saved role after reload.
Recorded from the real Buzz UI at
e6dfcaaf4fwith fictional people and messages and a simulated relay. This recording demonstrates the agent promotion flow using the earlier implementation.demo.mp4
Screenshots
Captured at
e6dfcaaf4fwith disposable fixture data, dark theme, and normal text size.Promoting the agent opens a confirmation.