From 49db2d8cf723bda44b6061a1dcb5243002cc583a Mon Sep 17 00:00:00 2001 From: Luke Tornquist Date: Mon, 26 Oct 2026 17:59:23 -0400 Subject: [PATCH] docs(invites): correct restriction wording and owner-link doc comment TESTING.md now describes `invite_restricted` as a restriction on the claiming account or the account that owns it, matching the relay and the client copy from 9ae85092; issuer restrictions return `invite_invalid`. The `materialize_nip_oa_owner` comment no longer describes the removed `Result` return. Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 Signed-off-by: Luke Tornquist --- TESTING.md | 6 ++++-- crates/buzz-relay/src/api/mod.rs | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/TESTING.md b/TESTING.md index daa80dad38..2b290e20aa 100644 --- a/TESTING.md +++ b/TESTING.md @@ -167,8 +167,10 @@ Rejected claims create no users or owner links. Minting with a verified owner that differs from an agent's recorded owner returns HTTP 403 `invite_owner_mismatch`; a storage failure while establishing that link remains HTTP 503. Web, desktop, and mobile claim errors explain -`invite_restricted` as an account or issuer restriction in this community: -contact a community administrator, or retry after a temporary restriction ends. +`invite_restricted` as a restriction on the claiming account, or on the account +that owns it, in this community: contact a community administrator, or retry +after a temporary restriction ends. An issuer restriction returns +`invite_invalid`, so a claim never reveals the issuer's moderation state. `invite_owner_mismatch` asks for the correct account or owner identity. Neither error suggests a fresh link as a workaround, and neither automatically retries. Claim and mint restriction reads use the writer inside a transaction serialized diff --git a/crates/buzz-relay/src/api/mod.rs b/crates/buzz-relay/src/api/mod.rs index 9a0316c7c9..19c9220e18 100644 --- a/crates/buzz-relay/src/api/mod.rs +++ b/crates/buzz-relay/src/api/mod.rs @@ -510,13 +510,13 @@ pub mod relay_members { /// Both principals are ensured first because `agent_owner_pubkey` has a /// community-scoped foreign key. The mapping is first-write-wins; an /// existing mapping is accepted only when it names the same owner. - /// Returns `Ok(false)` for an owner mismatch and `Err` for storage failure. + /// Returns `true` only when the link is recorded; an owner conflict and a + /// storage failure both return `false`. Callers that must tell denial + /// from unavailability use `link_agent_owner` directly. /// /// A mapping already confirmed in `observer_owner_cache` returns early: /// `agent_owner_pubkey` is set once and never cleared, so the writes /// below would all be no-ops. HTTP agents call this on every request. - /// Returns `Ok(false)` for a confirmed owner mismatch; storage failures - /// propagate so callers can distinguish denial from unavailability. pub async fn materialize_nip_oa_owner( state: &AppState, tenant: &TenantContext,