fix(acp): stop SubscribeMode::All from subscribing to every event kind - #4974
Open
BradGroux wants to merge 2 commits into
Open
fix(acp): stop SubscribeMode::All from subscribing to every event kind#4974BradGroux wants to merge 2 commits into
BradGroux wants to merge 2 commits into
Conversation
SubscribeMode::All built ChannelFilter with kinds: config.kinds_override.clone(), which is None when BUZZ_ACP_KINDS is not set. The relay treats None as a wildcard, so typing indicators (kind 20002) and other ephemeral kinds opened agent turns and cancelled pending scheduled wakeups — every keystroke burned quota without the user ever sending a message. All should mean the same message kinds as Mentions (9, 40007, 46010) without the mention requirement, not all event kinds. Apply the same unwrap_or_else default in both resolve_channel_filters and resolve_dynamic_channel_filter. Update the test that asserted the old wildcard behavior and add a regression test for the dynamic filter path. Refs block#4949 Co-authored-by: Brad Groux <bradgroux@hotmail.com> Signed-off-by: Brad Groux <bradgroux@hotmail.com> Signed-off-by: npub17q2gdupkvswvk5kprwc7plergm4gn295uw6fe4mjyjv53ahuhtnq02jd3f <f01486f036641ccb52c11bb1e0ff2346ea89a8b4e3b49cd772249948f6fcbae6@digitalmeld.communities.buzz.xyz>
Reuse one bounded default for initial and dynamic relay filters and runtime rule matching so typing indicators cannot reach the turn matcher through an inconsistent wildcard rule. Co-authored-by: Brad Groux <bradgroux@hotmail.com> Signed-off-by: Brad Groux <bradgroux@hotmail.com> Signed-off-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
Author
|
Review found a second wildcard seam beyond the relay filters: the in-process At that head, rustfmt, all 674 |
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.
What users saw
With
BUZZ_ACP_SUBSCRIBE=all, typing indicators (kind 20002) could open agent turns even though the user had not sent a message. Those empty ephemeral events consumed work and could cancel a pending scheduled wakeup before the actual message arrived.Why it happened
SubscribeMode::Mentionsdefaults to an explicit kind list: stream messages (9), workflow approval requests (46010), and reminders (40007).SubscribeMode::Allleft the kind list empty whenBUZZ_ACP_KINDSwas unset. Empty means wildcard in both the relay filter and the in-process subscription rule, soallexpanded from all relevant messages to all event kinds.What changed
Added one
default_subscription_kindshelper and use it everywhere the default subscription is constructed:SubscriptionRulefor bothmentionsandallAllnow means the same bounded event kinds asMentions, without the mention requirement. Operators can still supply a custom list withBUZZ_ACP_KINDS.How this was tested
Updated the initial-filter regression test and added dynamic-filter coverage. The assertions compare the exact default list and confirm that
require_mentionis false. Existing runtime-rule tests cover construction of the in-process rules.Validation at
3aeeb443a:All 674
buzz-acplibrary tests passed, and formatting and strict Clippy checks completed successfully. The test command removes an ambient lazy-pool override because that variable intentionally changes the default-config tests.Scope and non-goals
SubscribeMode::Config.BUZZ_ACP_KINDSoverride.Closes #4949.