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

Copilot AI 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:

type PolicyManifest struct {
    Rules []FirewallPolicyRule `json:"rules"`
}

type FirewallPolicyRule struct {
    ID          string   `json:"id"`
    Order       int      `json:"order"`
    Action      string   `json:"action"`
    ACLName     string   `json:"aclName"`
    Protocol    string   `json:"protocol"`
    Domains     []string `json:"domains"`
    Description string   `json:"description"`
}

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

Copilot AI 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
File Description
pkg/cli/README.md Updates the exported-type listing.
pkg/cli/firewall_policy.go Renames the firewall rule type and usages.
pkg/cli/firewall_policy_test.go Updates 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 thread pkg/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 main Jul 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 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.

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

3 participants