Skip to content

[bugfix] Issue with Method Filter in Coercer Command, fixes #101#102

Merged
p0dalirius merged 1 commit intomasterfrom
fix-101-Issue-with-Method-Filter-in-Coercer-Command
Jan 5, 2026
Merged

[bugfix] Issue with Method Filter in Coercer Command, fixes #101#102
p0dalirius merged 1 commit intomasterfrom
fix-101-Issue-with-Method-Filter-in-Coercer-Command

Conversation

@p0dalirius
Copy link
Owner

No description provided.

@p0dalirius p0dalirius requested a review from Copilot January 5, 2026 10:55
@p0dalirius p0dalirius self-assigned this Jan 5, 2026
@p0dalirius p0dalirius added the bug Something isn't working label Jan 5, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a bug in the method filtering logic where multiple filters were incorrectly combined using OR logic instead of AND logic. The fix ensures that when both method and protocol filters are specified, an instance must match both filters to be included.

Key Changes:

  • Refactored method_matches_filter to use AND logic when both method and protocol filters are present
  • Added early returns with break statements for improved performance
  • Improved code readability with explicit variable names and clearer logic flow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +39 to +40
method_match = True if not has_method_filters else False
protocol_match = True if not has_protocol_filters else False
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ternary operator here can be simplified for better readability. Instead of True if not has_method_filters else False, you can use not has_method_filters directly. The same applies to the protocol_match initialization.

Suggested change
method_match = True if not has_method_filters else False
protocol_match = True if not has_protocol_filters else False
method_match = not has_method_filters
protocol_match = not has_protocol_filters

Copilot uses AI. Check for mistakes.
@p0dalirius p0dalirius merged commit 73d6846 into master Jan 5, 2026
11 checks passed
@p0dalirius p0dalirius deleted the fix-101-Issue-with-Method-Filter-in-Coercer-Command branch January 5, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant