-
Notifications
You must be signed in to change notification settings - Fork 312
Description
Files Analyzed: pkg/cli/add_interactive_schedule.go, pkg/cli/add_interactive_secrets.go, pkg/cli/add_interactive_workflow.go
Analysis Date: 2026-03-17
Round-Robin Position: files 9–11 of 582 total
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/add_interactive_secrets.go
| Current Name | Suggested Name | Reason |
|---|---|---|
getSecretInfo() |
resolveEngineApiKeyCredential() |
The current name is vague — an agent searching for "get API key for AI engine" would miss this. The new name describes the specific domain: resolving an engine's API key credential, checking if it already exists in the repository |
All functions in this file (for reference):
(*AddInteractiveConfig).checkExistingSecrets()— ✅ Clear, no change needed(*AddInteractiveConfig).addRepositorySecret()— ✅ Clear, no change neededparseSecretNames()— ✅ Clear, no change needed(*AddInteractiveConfig).getSecretInfo()—⚠️ Rename suggested (see table above)
pkg/cli/add_interactive_workflow.go
| Current Name | Suggested Name | Reason |
|---|---|---|
getWorkflowStatuses() |
findWorkflowsByFilenamePattern() |
The current name is misleading — it implies fetching run statuses (active/inactive/completed), but the function actually searches for workflows by filename pattern to check if they are registered in GitHub. An agent looking for "find if a workflow file is registered" would overlook this function. |
All functions in this file (for reference):
(*AddInteractiveConfig).checkStatusAndOfferRun()— ✅ Clear, no change neededgetWorkflowStatuses()—⚠️ Rename suggested (see table above)
pkg/cli/add_interactive_schedule.go
All functions have clear, descriptive names — no changes needed.
All functions in this file (for reference):
detectWorkflowScheduleInfo()— ✅ Clear, no change neededclassifyScheduleFrequency()— ✅ Clear, no change needed(*AddInteractiveConfig).selectScheduleFrequency()— ✅ Clear, no change neededbuildScheduleOptions()— ✅ 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
- Read each rename suggestion and verify it is accurate by reviewing the function body
- Check for any Go interface constraints that prevent renaming (e.g., must match interface method name)
Implementation Steps
Rename 1: getSecretInfo → resolveEngineApiKeyCredential in pkg/cli/add_interactive_secrets.go
// Old
func (c *AddInteractiveConfig) getSecretInfo() (name string, value string, err error) {
// New
func (c *AddInteractiveConfig) resolveEngineApiKeyCredential() (name string, value string, err error) {Update all call sites:
grep -rn "getSecretInfo" pkg/ --include="*.go"
grep -rn "getSecretInfo" pkg/ --include="*_test.go"Known call sites:
pkg/cli/add_interactive_orchestrator.go:137—secretName, secretValue, err = config.getSecretInfo()pkg/cli/add_interactive_secrets_test.go:81—name, value, err := config.getSecretInfo()
Rename 2: getWorkflowStatuses → findWorkflowsByFilenamePattern in pkg/cli/add_interactive_workflow.go
// Old
func getWorkflowStatuses(pattern, repoOverride string, verbose bool) ([]WorkflowStatus, error) {
// New
func findWorkflowsByFilenamePattern(pattern, repoOverride string, verbose bool) ([]WorkflowStatus, error) {Update all call sites:
grep -rn "getWorkflowStatuses" pkg/ --include="*.go"
grep -rn "getWorkflowStatuses" pkg/ --include="*_test.go"Known call sites:
pkg/cli/add_interactive_workflow.go:51—statuses, err := getWorkflowStatuses(parsed.WorkflowName, c.RepoOverride, c.Verbose)pkg/cli/add_interactive_workflow_test.go:44—statuses, err := getWorkflowStatuses(tt.pattern, tt.repoOverride, tt.verbose)
Also update the test function name TestGetWorkflowStatuses → TestFindWorkflowsByFilenamePattern in pkg/cli/add_interactive_workflow_test.go.
Verify compilation after each rename
make buildRun tests after all renames are complete
make test-unit
make lint
```
### Commit Convention
Each rename should be a focused commit:
```
refactor: rename getSecretInfo to resolveEngineApiKeyCredential for clarity
refactor: rename getWorkflowStatuses to findWorkflowsByFilenamePattern for clarityValidation Checklist
- All renames implemented
- All call sites updated (Go files and test files)
-
make buildpasses with no errors -
make test-unitpasses -
make lintpasses - PR description explains the agent-discoverability rationale
Notes for the Agent
- This is a pure rename refactor — behavior must not change, only names
- If a rename causes unexpected complexity (e.g., name conflicts, interface constraints),
skip it and leave a comment in the PR explaining why - Follow existing naming conventions documented in
AGENTS.md
Generated by the Daily Go Function Namer workflow
Run: §23173108339
Generated by Daily Go Function Namer · ◷
- expires on Mar 24, 2026, 12:55 AM UTC