fix(acp): treat an empty --respond-to-allowlist as absent - #4184
Open
CryptoJones wants to merge 1 commit into
Open
fix(acp): treat an empty --respond-to-allowlist as absent#4184CryptoJones wants to merge 1 commit into
CryptoJones wants to merge 1 commit into
Conversation
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>
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.
Problem
Launchers export
BUZZ_ACP_RESPOND_TO_ALLOWLISTunconditionally, so an agent with no allowlist gets"". Withvalue_delimiter = ',', clap parses that intoSome([""])— set, but carrying no entries. Two paths treated that as "an allowlist was supplied":Non-allowlist modes logged a misleading warning on every startup:
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 hadrespond_to: anyoneand an empty allowlist.Allowlist mode reported the wrong error. The blank entry skipped the
is_empty()guard and reachedvalidate_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 114config::tests pass.Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/
🤖 Generated with Claude Code
https://claude.ai/code/session_01WXtzskvxVRMTnAGwwC7Dxz