Skip to content

Rename CLI firewall PolicyRule to FirewallPolicyRule - #46961

Merged
pelikhan merged 2 commits into
mainfrom
copilot/rename-policy-rule-to-firewallpolicyrule
Jul 21, 2026
Merged

Rename CLI firewall PolicyRule to FirewallPolicyRule#46961
pelikhan merged 2 commits into
mainfrom
copilot/rename-policy-rule-to-firewallpolicyrule

Conversation

CopilotAI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

pkg/cli defined a firewall ACL rule as PolicyRule, which collided conceptually with the unrelated intent execution-policy PolicyRule in pkg/intent. This change makes the firewall type explicit without changing the intent policy model.

  • Type rename in firewall policy code

    • Renames pkg/cli's firewall rule struct from PolicyRule to FirewallPolicyRule
    • Updates PolicyManifest, RuleHitStats, sorting, matching, and helper signatures to use the new name
  • Reference cleanup in pkg/cli

    • Rewrites all in-package call sites and fixtures to use FirewallPolicyRule
    • Leaves pkg/intent/policy.go unchanged so the intent-policy PolicyRule remains distinct
  • Package documentation

    • Updates the exported-type table in pkg/cli/README.md to reflect the new name

Example:

typePolicyManifeststruct {
Rules []FirewallPolicyRule`json:"rules"`
}
typeFirewallPolicyRulestruct {
IDstring`json:"id"`Orderint`json:"order"`Actionstring`json:"action"`ACLNamestring`json:"aclName"`Protocolstring`json:"protocol"`Domains []string`json:"domains"`Descriptionstring`json:"description"`
}

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title [WIP] Rename PolicyRule to FirewallPolicyRule in firewall_policy.goRename CLI firewall PolicyRule to FirewallPolicyRuleJul 21, 2026
CopilotAI requested a review from pelikhanJuly 21, 2026 04:25
@pelikhan
pelikhan marked this pull request as ready for review July 21, 2026 04:27
CopilotAI review requested due to automatic review settings July 21, 2026 04:27

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Renames the firewall ACL rule type to distinguish it from the intent policy model.

Changes:

  • Renames PolicyRule to FirewallPolicyRule.
  • Updates firewall logic, tests, fixtures, and documentation.
Show a summary per file
FileDescription
pkg/cli/README.mdUpdates the exported-type listing.
pkg/cli/firewall_policy.goRenames the firewall rule type and usages.
pkg/cli/firewall_policy_test.goUpdates test fixtures for the renamed type.

Review details

Tip

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

  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment threadpkg/cli/README.md
| `PolicyAnalysis` | struct | Analysis of guard-policy evaluation results |
| `PolicyManifest` | struct | A manifest of guard policies applied during a run |
| `PolicyRule` | struct | A single firewall policy rule from the policy manifest |
| `FirewallPolicyRule` | struct | A single firewall policy rule from the policy manifest |
@pelikhan
pelikhan merged commit 792e1d8 into mainJul 21, 2026
25 checks passed
@pelikhan
pelikhan deleted the copilot/rename-policy-rule-to-firewallpolicyrule branch July 21, 2026 04:31
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.82.15

Sign up for freeto 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.

[Code Quality] Rename PolicyRule in pkg/cli/firewall_policy.go to FirewallPolicyRule

3 participants

@pelikhan