fix(acp): apply respond-to policy to DMs - #7563
Open
sjalife wants to merge 1 commit into
Open
Conversation
Allowlisted users could @mention an agent in a group but not query it in a 1:1 DM. The inbound author gate ignored allowlist and anyone inside DMs, so only the owner and verified siblings woke the agent. That made the host's own DMs work and everyone else's look like a host-scoped inbound bug. DMs already auto-p-tag participants, so mention-subscription matches the conversation. The gate is the access policy: owner-only, allowlist, anyone, and nobody now mean the same thing in a DM as in a group. Also log gate drops and unmatched subscription rules at info, and accept --respond-to allowlist --respond-to-allowlist on draft-update so Desktop can prefill the selected-people list. Signed-off-by: Salvador Jalife Lozano <sjl@meccano.mx>
🔐 Codex Security Review
|
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.
Summary
Allowlisted users could
@mentionan agent in a shared group but could not query that same agent in a 1:1 DM. Observed on hosted agents: the owner's DMs woke the process, allowlisted users' DMs did not, and Desktop caches for those DMs were empty. That looked like host-scoped inbound. It was not.The inbound author gate ignored
allowlistandanyoneinside DMs and admitted only the owner plus verified same-owner siblings. Group@mentionsused the real policy, so they worked. DMs already auto-p-tag every participant, so mention-subscription already matched; the gate was the drop.Fix
respond-tonow means the same thing in a DM as in a group:owner-only— owner ∪ verified siblingsallowlist— those plus the listed pubkeysanyone— every authornobody— still absoluteGate drops and unmatched subscription rules log at info (
channel_id, author, mode,is_dm, reason) instead of debug, so a silent DM is diagnosable.CLI:
buzz agents draft-update --respond-to allowlist --respond-to-allowlist <hex,hex>. Desktop's owner-reviewed edit form accepts that list instead of wiping it.Out of scope
channel access denied by relayand drops that channel. Not a dead-subscription-looks-live bug for this failure.Tests
cargo test -p buzz-acp -p buzz-cli— 933 + 468 passed (WSL, rustc 1.95.0)cargo clippy -p buzz-acp -p buzz-cli --all-targets -- -D warningspassedClosest existing PR/issue: none found.
Originating conversation: Buzz
#Agent_Coordinationthread467385cd/ event61d45889.