feat(acp): add BUZZ_ACP_ALLOWED_RESPOND_TO and BUZZ_ALLOWED_CHANNEL_ADD_POLICIES gates#1304
Merged
Merged
Conversation
…DD_POLICIES gates Adds two deployment-level gates to restrict agent sharing configuration in internal Block releases without affecting OSS users. BUZZ_ACP_ALLOWED_RESPOND_TO (buzz-acp harness): comma-separated list of permitted respond_to modes. When set, startup fails with a clear error if the configured mode is not in the list. Internal release sets this to owner-only,allowlist to exclude anyone. Default: empty (no restriction). BUZZ_ALLOWED_CHANNEL_ADD_POLICIES (buzz-cli): comma-separated list of permitted channel_add_policy values. When set, buzz channels set-add-policy returns a user error if the requested policy is not in the list. Internal release sets this to owner_only,nobody to exclude anyone. Default: empty (no restriction). Migration 0005 tightens the channel_add_policy column default from anyone to owner_only so new agents start safe on all relays without operator action. Updates migration count test and test_set_agent_owner_and_get_policy to reflect the new default. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Add Config::from_args() split from from_cli() so tests can exercise the full CliArgs → validation path without process args. Three new integration tests call Config::from_args() directly via CliArgs::try_parse_from, verifying the BUZZ_ACP_ALLOWED_RESPOND_TO gate end-to-end. Add cmd_set_add_policy integration test that calls the function directly with BUZZ_ALLOWED_CHANNEL_ADD_POLICIES set, confirming the gate fires before any network call. Simplify Config::allowed_respond_to from HashSet<RespondTo> to Vec<String> since the field is only used in summary() — removes the Eq+Hash dependency from the validation path. Add comment to cmd_set_add_policy documenting that the gate covers only the CLI path; direct kind:10100 relay submission bypasses it (intentional per team decision). Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Remove migration 0005 (channel_add_policy default tightening) per team decision to keep relay-side changes out of scope. Revert associated test assertions in migration.rs and user.rs. Also run cargo fmt to fix formatting diffs caught by CI lint check. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
…D_CHANNEL_ADD_POLICIES Align with the ACP prefix convention used by BUZZ_ACP_ALLOWED_RESPOND_TO. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
kalvinnchau
approved these changes
Jun 26, 2026
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.
Adds two deployment-level gates to restrict agent sharing configuration in internal Block releases without affecting OSS users.
What this does
BUZZ_ACP_ALLOWED_RESPOND_TO(crates/buzz-acp/src/config.rs): comma-separated list of permittedrespond_tomodes. When set, startup fails with a clear error if the configured mode is not in the list. Internal release sets this toowner-only,allowlistto excludeanyone. Default: empty (no restriction).BUZZ_ALLOWED_CHANNEL_ADD_POLICIES(crates/buzz-cli/src/commands/channels.rs): comma-separated list of permittedchannel_add_policyvalues. When set,buzz channels set-add-policyreturns a user error if the requested policy is not in the list. Internal release sets this toowner_only,nobodyto excludeanyone. Default: empty (no restriction).Note:
buzz channels set-add-policyis the only enforcement point — a client that submits a kind:10100 event directly to the relay bypasses this check. Full enforcement would require relay-side validation, which is intentionally out of scope (no relay-side changes in this arc).Files changed
crates/buzz-acp/src/config.rs—BUZZ_ACP_ALLOWED_RESPOND_TOinCliArgs,Config,from_args(),summary();from_cli()refactored to callfrom_args(); integration testscrates/buzz-acp/src/lib.rs— two testConfiginitializers updated with new fieldcrates/buzz-cli/src/commands/channels.rs—BUZZ_ALLOWED_CHANNEL_ADD_POLICIESgate incmd_set_add_policy; bypass comment; integration testBehavior when flags are unset (default)
No behavior change. OSS deployments are unaffected.
Related
LSEnvironmentinInfo.plistfor the internal macOS build