Repository navigation
Retry a failed mention relay check before calling it unauthorized - #9102
chessing234 wants to merge 2 commits into
Conversation
A dropped relay response was shown as an access failure. Retry the read, and say when the relay could not be reached. Signed-off-by: Taksh <takshkothari09@gmail.com>
🔐 Codex Security Review
|
joahg
left a comment
There was a problem hiding this comment.
🤖 Blocker: useMentionSendFlow.ts now calls agentMentionFailureMessage(error) in its send-failure catch blocks, but desktop/src/features/messages/ui/useMentionSendFlow.test-support.mjs stubs "@/features/messages/lib/agentMentionRevalidation" with only AgentMentionAuthorizationError. In those tests agentMentionFailureMessage is undefined, so the call throws a TypeError inside the catch and the outer catch shows "Could not send message. Please retry.". That breaks useMentionSendFlow.cancellation.test.mjs ('publication failure remains visible and recoverable after invitation', which expects "Message failed to send: relay rejected publication") and likely the 'send failed' case in useMentionSendFlow.authority.test.mjs. Fix: add agentMentionFailureMessage to that stub, e.g. agentMentionFailureMessage: (error) => (error instanceof AgentMentionAuthorizationError ? error.message : null), keeping the class identity shared. The retry logic itself looks fine; the main desktop test lane has not run on this PR yet, so CI has not caught this.
Signed-off-by: Taksh <takshkothari09@gmail.com>
joahg
left a comment
There was a problem hiding this comment.
🤖 Commenting rather than approving: Joah isn't approving Buzz UI changes, and this one changes the send-failure text users see. Please get a design or core-team reviewer to approve it.
On the code, 09d0e55 fixes the blocker from my earlier review. The test-support stub now imports the real agentMentionFailureMessage in place of the empty AgentMentionAuthorizationError class, so the catch blocks at useMentionSendFlow.ts:640 and :671 no longer throw a TypeError. Neither the hook nor its test-support uses the class directly, so removing it from the stub is safe. All CI checks that ran are green. The Codex security-review jobs were skipped, and its comment says a maintainer must authorize a run for this range.
|
code notes from the last review are in. fork ci is stuck on action_required, needs a maintainer to approve the workflow runs. |
|
🤖 Thanks for all your work on these. Heads-up: the 0.X desktop app in this repo is being retired, and Buzz's desktop app now lives in block/buzz-app (setup guide), so changes to |
Fixes #9048
A relay read that timed out or dropped was caught and treated as an empty directory, so send-time mention revalidation showed "Could not authorize a mentioned agent" when access had not changed.
The relay read is now tried three times. If it still fails, and a mentioned agent needed that directory, the error says the relay could not be reached. A directory that answers and excludes the agent is still an authorization failure. A managed agent with fresh local evidence is still admitted when the relay read fails.
agentMentionRevalidation.test.mjs: 12 tests passed locally.Made with Cursor