π·οΈ Go Function Rename Plan
Files Analyzed: pkg/cli/codemod_network_firewall.go, pkg/cli/codemod_permissions_read.go, pkg/cli/codemod_permissions_write.go, pkg/cli/codemod_playwright_domains.go, pkg/cli/codemod_plugins.go, pkg/cli/codemod_roles.go
Analysis Date: 2026-03-25
Round-Robin Position: files 42β48 of 614 total
Function Budget: 10 functions across 6 files
Why This Matters
When AI coding agents search for functions to complete a task, they rely on function names to understand what code does. Clear, descriptive names increase the likelihood that an agent will find the right function instead of reimplementing existing logic.
Rename Suggestions
pkg/cli/codemod_playwright_domains.go
| Current Name |
Suggested Name |
Reason |
getPlaywrightDomainsCodemod() |
getPlaywrightDomainsToNetworkAllowedCodemod() |
Makes the migration direction explicit; matches the *To*Codemod naming pattern used by sibling functions |
Context: The codebase uses a consistent naming convention for migration codemods:
getPluginsToDependenciesCodemod() β plugins β dependencies
getRolesToOnRolesCodemod() β roles β on.roles
getMigrateWritePermissionsToReadCodemod() β write β read
getPlaywrightDomainsCodemod breaks this pattern by omitting the migration destination (network.allowed). An agent tasked with "migrating playwright allowed domains to network firewall config" would not reliably discover this function, whereas getPlaywrightDomainsToNetworkAllowedCodemod would be immediately found.
All functions in this file (for reference):
getPlaywrightDomainsCodemod() β β οΈ Rename suggested (see table above)
removeFieldFromPlaywright() β β
Clear, no change needed
pkg/cli/codemod_network_firewall.go
getNetworkFirewallCodemod() β β
Clear, no change needed
pkg/cli/codemod_permissions_read.go
getExpandPermissionsShorthandCodemod() β β
Clear, no change needed
pkg/cli/codemod_permissions_write.go
getMigrateWritePermissionsToReadCodemod() β β
Clear, no change needed
pkg/cli/codemod_plugins.go
getPluginsToDependenciesCodemod() β β
Clear, no change needed
migratePluginsToDependencies() β β
Clear, no change needed
rewritePluginsBlock() β β
Acceptable (unexported helper, single call site)
rewriteObjectFormatPlugins() β β
Clear, no change needed
pkg/cli/codemod_roles.go
getRolesToOnRolesCodemod() β β
Clear, no change needed
π€ Agentic Implementation Plan
Agentic Implementation Plan
This issue is designed to be assigned to a coding agent. The agent should implement all rename suggestions below in a single pull request.
Prerequisites
Implementation Steps
1. Rename the function in pkg/cli/codemod_playwright_domains.go
// Old
func getPlaywrightDomainsCodemod() Codemod {
// New
func getPlaywrightDomainsToNetworkAllowedCodemod() Codemod {
2. Update all call sites
grep -rn "getPlaywrightDomainsCodemod" pkg/ --include="*.go"
Expected call sites to update:
pkg/cli/fix_codemods.go:46 β in GetAllCodemods()
pkg/cli/codemod_playwright_domains_test.go β 9 test function calls
Also check test files:
grep -rn "getPlaywrightDomainsCodemod" pkg/ --include="*_test.go"
3. Verify compilation after the rename
4. Run tests after the rename is complete
make test-unit
make lint
```
### Commit Convention
```
refactor: rename getPlaywrightDomainsCodemod to getPlaywrightDomainsToNetworkAllowedCodemod for clarity
Validation Checklist
Notes for the Agent
- This is a pure rename refactor β behavior must not change, only the name
- Follow existing naming conventions documented in
AGENTS.md
- The new name follows the established
*To*Codemod pattern used throughout this package
Generated by the Daily Go Function Namer workflow
Run: Β§23538009816
Generated by Daily Go Function Namer Β· β·
π·οΈ Go Function Rename Plan
Files Analyzed:
pkg/cli/codemod_network_firewall.go,pkg/cli/codemod_permissions_read.go,pkg/cli/codemod_permissions_write.go,pkg/cli/codemod_playwright_domains.go,pkg/cli/codemod_plugins.go,pkg/cli/codemod_roles.goAnalysis Date: 2026-03-25
Round-Robin Position: files 42β48 of 614 total
Function Budget: 10 functions across 6 files
Why This Matters
When AI coding agents search for functions to complete a task, they rely on function names to understand what code does. Clear, descriptive names increase the likelihood that an agent will find the right function instead of reimplementing existing logic.
Rename Suggestions
pkg/cli/codemod_playwright_domains.gogetPlaywrightDomainsCodemod()getPlaywrightDomainsToNetworkAllowedCodemod()*To*Codemodnaming pattern used by sibling functionsContext: The codebase uses a consistent naming convention for migration codemods:
getPluginsToDependenciesCodemod()β plugins β dependenciesgetRolesToOnRolesCodemod()β roles β on.rolesgetMigrateWritePermissionsToReadCodemod()β write β readgetPlaywrightDomainsCodemodbreaks this pattern by omitting the migration destination (network.allowed). An agent tasked with "migrating playwright allowed domains to network firewall config" would not reliably discover this function, whereasgetPlaywrightDomainsToNetworkAllowedCodemodwould be immediately found.All functions in this file (for reference):
getPlaywrightDomainsCodemod()βremoveFieldFromPlaywright()β β Clear, no change neededpkg/cli/codemod_network_firewall.gogetNetworkFirewallCodemod()β β Clear, no change neededpkg/cli/codemod_permissions_read.gogetExpandPermissionsShorthandCodemod()β β Clear, no change neededpkg/cli/codemod_permissions_write.gogetMigrateWritePermissionsToReadCodemod()β β Clear, no change neededpkg/cli/codemod_plugins.gogetPluginsToDependenciesCodemod()β β Clear, no change neededmigratePluginsToDependencies()β β Clear, no change neededrewritePluginsBlock()β β Acceptable (unexported helper, single call site)rewriteObjectFormatPlugins()β β Clear, no change neededpkg/cli/codemod_roles.gogetRolesToOnRolesCodemod()β β Clear, no change neededπ€ Agentic Implementation Plan
Agentic Implementation Plan
This issue is designed to be assigned to a coding agent. The agent should implement all rename suggestions below in a single pull request.
Prerequisites
getPlaywrightDomainsCodemodis not implementing a Go interface method (it is not β it returns aCodemodstruct, no interface constraint)Implementation Steps
1. Rename the function in
pkg/cli/codemod_playwright_domains.go2. Update all call sites
Expected call sites to update:
pkg/cli/fix_codemods.go:46β inGetAllCodemods()pkg/cli/codemod_playwright_domains_test.goβ 9 test function callsAlso check test files:
3. Verify compilation after the rename
4. Run tests after the rename is complete
Validation Checklist
codemod_playwright_domains.gofix_codemods.gocodemod_playwright_domains_test.gomake buildpasses with no errorsmake test-unitpassesmake lintpassesNotes for the Agent
AGENTS.md*To*Codemodpattern used throughout this packageGenerated by the Daily Go Function Namer workflow
Run: Β§23538009816