Skip to content

Count a rule shape by the filter the UPF installs - #596

Merged
gab-arrobo merged 2 commits into
omec-project:mainfrom
gab-arrobo:count-rule
Oct 7, 2026
Merged

gab-arrobo merged 2 commits into
omec-project:mainfrom
gab-arrobo:count-rule

Conversation

@gab-arrobo

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
@gab-arrobo
gab-arrobo requested review from a team and a balanced review from Copilot October 6, 2026 21:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Non-installable filters can still be incorrectly counted as deferred shapes.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Centralizes SDF filter rendering so UPF rule-shape counting matches installed filters.

Changes:

  • Adds shared SDF filter generation and canonicalization.
  • Deduplicates legacy and modeled rules producing identical filters.
  • Adds rule-shape regression tests.
File Description
configapi/​slice_helpers.go Centralizes filter rendering and shape counting.
configapi/​slice_operations_test.go Tests filter-based shape folding.
backend/​nfconfig/​config.go Uses the shared filter builder.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread configapi/slice_helpers.go Outdated
Signed-off-by: Arrobo, Gabriel <gabriel.arrobo@intel.com>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 22:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The shared rendering logic keeps validation aligned with installed filters and is adequately covered by focused tests.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@andybavier andybavier left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

+1

@gab-arrobo
gab-arrobo merged commit d42a93e into omec-project:main Oct 7, 2026
13 checks passed
@gab-arrobo
gab-arrobo deleted the count-rule branch October 7, 2026 00:31
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.

3 participants