Skip to content

sentinel: accept multiple --client-filter values in multicast publisher worker#3555

Merged
snormore merged 1 commit intomainfrom
snor/sentinel-multiple-client-filters
Apr 21, 2026
Merged

sentinel: accept multiple --client-filter values in multicast publisher worker#3555
snormore merged 1 commit intomainfrom
snor/sentinel-multiple-client-filters

Conversation

@snormore
Copy link
Copy Markdown
Contributor

Summary of Changes

  • Make the sentinel multicast publisher worker's --client-filter flag repeatable, so multiple validator client names can be matched in a single run
  • Match semantics already used by the admin CLI (controlplane/doublezero-admin): a validator matches if its software client substring-contains any of the given filter names (case-insensitive OR)
  • Changes client_filter: Option<String>client_filters: Vec<String>; flag name --client-filter is unchanged, so existing single-value invocations continue to work

Diff Breakdown

Category Files Lines (+/-) Net
Core logic 2 +19 / -9 +10
Scaffolding 1 +2 / -2 0
Tests 1 +69 / -11 +58
Docs 1 +2 / -0 +2
Total 4 +92 / -22 +70

Small change — the bulk of additions is a new test covering the multi-filter OR semantics.

Key files (click to expand)
  • crates/sentinel/src/multicast_publisher.rs — filter predicate now OR-matches against Vec<String>; constructor signatures updated; new multiple_client_filters_match_any test
  • crates/sentinel/src/settings.rs--client-filter declared as Vec<String> (repeatable)
  • crates/sentinel/src/main.rs — wiring update for the renamed field

Testing Verification

  • All 46 sentinel crate unit tests pass, including the new multiple_client_filters_match_any test that verifies OR semantics and case-insensitive matching across multiple filter values
  • Existing single-filter test client_filter_only_creates_for_matching_validators still passes, confirming backward compatibility of the --client-filter foo form

Change `client_filter: Option<String>` to `client_filters: Vec<String>`
with `--client-filter` accepting multiple values. A validator matches
if its software client contains any of the given names (OR semantics,
case-insensitive), matching the admin CLI's `--client` behavior.
@snormore snormore force-pushed the snor/sentinel-multiple-client-filters branch from ac4714a to 4b22957 Compare April 21, 2026 14:14
@snormore snormore marked this pull request as ready for review April 21, 2026 14:17
@snormore snormore merged commit ebd28bd into main Apr 21, 2026
36 checks passed
@snormore snormore deleted the snor/sentinel-multiple-client-filters branch April 21, 2026 14:34
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.

2 participants