Skip to content

fix(acp): apply respond-to policy to DMs - #7563

Open
sjalife wants to merge 1 commit into
block:mainfrom
sjalife:fix/agent-inbound-allowlist
Open

fix(acp): apply respond-to policy to DMs#7563
sjalife wants to merge 1 commit into
block:mainfrom
sjalife:fix/agent-inbound-allowlist

Conversation

@sjalife

@sjalife sjalife commented Sep 10, 2026

Copy link
Copy Markdown

Summary

Allowlisted users could @mention an 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 allowlist and anyone inside DMs and admitted only the owner plus verified same-owner siblings. Group @mentions used 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-to now means the same thing in a DM as in a group:

  • owner-only — owner ∪ verified siblings
  • allowlist — those plus the listed pubkeys
  • anyone — every author
  • nobody — still absolute

Gate 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

  • Subscription CLOSED already logs channel access denied by relay and drops that channel. Not a dead-subscription-looks-live bug for this failure.
  • Membership subscribe already replays from the membership timestamp. The 15-minute replay floor for first messages that race a cold start is a separate follow-up.

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 warnings passed
  • Production listener boundary test now requires allowlisted DM authors to be admitted

Closest existing PR/issue: none found.

Originating conversation: Buzz #Agent_Coordination thread 467385cd / event 61d45889.

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>
@sjalife
sjalife requested a review from a team as a code owner September 10, 2026 16:25
@github-actions

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 051c3a270be9c73da9ab06700bcab7d5552fceaa...275dcb6c83b4bc2445b950333d497a70c80a1391.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 275dcb6c83b4bc2445b950333d497a70c80a1391 to authorize a new review.
Any previous review applies only to its recorded range.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant