Skip to content

fix(acp): treat an empty --respond-to-allowlist as absent - #4184

Open
CryptoJones wants to merge 1 commit into
block:mainfrom
CryptoJones:fix/acp-empty-allowlist-warn
Open

fix(acp): treat an empty --respond-to-allowlist as absent#4184
CryptoJones wants to merge 1 commit into
block:mainfrom
CryptoJones:fix/acp-empty-allowlist-warn

Conversation

@CryptoJones

Copy link
Copy Markdown

Problem

Launchers export BUZZ_ACP_RESPOND_TO_ALLOWLIST unconditionally, so an agent with no allowlist gets "". With value_delimiter = ',', clap parses that into Some([""])set, but carrying no entries. Two paths treated that as "an allowlist was supplied":

  1. Non-allowlist modes logged a misleading warning on every startup:

    WARN buzz_acp::config: --respond-to-allowlist is ignored when --respond-to is not 'allowlist'
    

    The check was args.respond_to_allowlist.is_some(). Every agent on an unconfigured allowlist logged this at each launch, implying an allowlist had been set when none had. Found while debugging a fleet of eight agents, all of which had respond_to: anyone and an empty allowlist.

  2. Allowlist mode reported the wrong error. The blank entry skipped the is_empty() guard and reached validate_allowlist, so a misconfigured launcher got a hex-validation failure instead of the intended --respond-to=allowlist requires --respond-to-allowlist with at least one pubkey.

Fix

Filter blank entries once, before both checks, so an empty export reads as absent.

Desktop's spawn path already removes the variable in non-allowlist modes (build_respond_to_env, managed_agents/runtime.rs); this covers every other launcher.

Tests

Two added:

  • empty_allowlist_is_treated_as_absent--respond-to=anyone --respond-to-allowlist="" resolves to an empty allowlist without error.
  • empty_allowlist_in_allowlist_mode_reports_the_missing_pubkey_error — the same empty value in allowlist mode surfaces the missing-pubkey error, not a hex failure.

cargo fmt --check, cargo clippy -p buzz-acp --all-targets -- -D warnings, and all 114 config:: tests pass.

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

🤖 Generated with Claude Code

https://claude.ai/code/session_01WXtzskvxVRMTnAGwwC7Dxz

Launchers export BUZZ_ACP_RESPOND_TO_ALLOWLIST unconditionally, so an
agent with no allowlist gets `""`. clap parses that into Some([""]) —
set, but carrying no entries — which tripped two paths:

- Non-allowlist modes logged "--respond-to-allowlist is ignored when
  --respond-to is not 'allowlist'" on every startup, implying an
  allowlist had been configured when none had.
- Allowlist mode passed the blank entry to hex validation instead of
  reporting the intended "requires at least one pubkey" error.

Filter blank entries before both checks so an empty export reads as
absent. Desktop already removes the var in non-allowlist modes
(build_respond_to_env); this covers every other launcher.

Signed-off-by: Aaron K. Clark <akclark@thenetwerk.net>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WXtzskvxVRMTnAGwwC7Dxz
Signed-off-by: Aaron K. Clark (CryptoJones) <cryptojones@owasp.org>
@CryptoJones
CryptoJones requested a review from a team as a code owner August 1, 2026 21:55
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