Skip to content

feat(acp): explain rejected inbound messages - #4064

Draft
brow wants to merge 5 commits into
mainfrom
acp-inbound-denial
Draft

feat(acp): explain rejected inbound messages#4064
brow wants to merge 5 commits into
mainfrom
acp-inbound-denial

Conversation

@brow

@brow brow commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Problem

When someone without access messages a managed agent, the inbound author gate silently drops the event. The sender cannot tell whether the agent is ignoring them, unavailable, or restricted to its owner.

This complements #4053, which provides the internal-build owner-only enforcement.

Changes

crates/buzz-acp/src/inbound_denial.rs

  • Add a deterministic owner-only explanation for rejected messages that explicitly mention the agent. Ordinary channel chatter remains silent.
  • Reply in the triggering thread without a p-tag. The denied sender is deliberately not notified and sees the explanation only in-thread.
  • Preserve silence for workflow traffic, other denial events, non-message kinds, and agents configured with respond-to=nobody.
  • Prevent agent-to-agent denial loops through two independent guards: denial events carry no p-tag and are marked so other agents recognize and drop them.
  • Bound explanation volume with per-author and per-channel controls. An agent explains itself at most a few hundred times in any ten-minute window; past that, new conversations get silence rather than an unbounded stream, and normal expiry restores it.

crates/buzz-acp/src/lib.rs

  • Classify allowed, denied, and denied-with-explanation outcomes at the existing inbound author gate.
  • Publish only for the denied-with-explanation outcome while continuing to drop every rejected event before filtering and queueing.

Tests

Added coverage:

Quality gates at tip 33c6e04e134c1b0d25a4d05da325d7118145b18d

  • buzz-acp library tests: 676 passed, 0 failed.
  • buzz-acp integration tests: 9 passed, 0 failed.
  • Rust formatting, clippy with warnings denied, and the diff check passed.

Originated from Buzz channel buzz-agent-control.

npub1tquskdu6yc4h8l7xxtceculxw600grekeq0xg2ukqfrwl7vrzg3quz3gmp and others added 5 commits July 31, 2026 21:27
Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
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