Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
automated-analysiscode-healthcookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!refactoring
Description
Overview
pkg/cli/add_workflow_resolution.go has grown to 1214 lines (largest non-test Go file in pkg/; threshold 800). Refactor into focused files with better tests.
Current State
- File:
pkg/cli/add_workflow_resolution.go - Size: 1214 lines, ~42 top-level funcs/types
- Test Coverage: no
add_workflow_resolution_test.go; only_redirect_test.go(143) and_manifest_ref_test.go(50), ratio ≈ 0.16 - Complexity: mixes remote spec resolution, local package manifest/asset resolution, and wildcard expansion
Full File Analysis
- Public API and spec parsing (29–260):
ResolvedWorkflow(s),ResolveWorkflows,parseWorkflowSpecsForResolution,resolveLocal/RepositoryPackage*Spec - Workflow resolution (259–456):
resolveWorkflowSpecs,resolveSingleWorkflowSpec,resolvePackageOrActionWorkflow,resolveStandardWorkflow,selectBootstrapProfile - Local package resolution (457–970): manifest nodes, wildcard includes, installables, skill/agent files
- Package-to-spec appenders (783–1062):
append*WorkflowSpecs,appendRepositoryPackageExtensionSpecs - Wildcard/dispatch expansion (1063–1214):
resolveAddWorkflowSpecAndContent,expandLocalWildcardWorkflows,checkWorkflowHasDispatchFromContent,expandLocalWildcard
Refactoring Strategy
Proposed File Splits
add_workflow_resolution.go(~350 LOC): public types,ResolveWorkflows, spec parsing, workflow resolution, bootstrap profile selection.add_workflow_local_package.go(~400 LOC):resolveLocalRepositoryPackage*, manifest nodes, wildcard includes, installable normalization/validation.add_workflow_package_assets.go(~200 LOC): skill/agent file resolution and scanning.add_workflow_package_specs.go(~300 LOC):append*PackageWorkflowSpecsand extension specs.add_workflow_wildcard.go(~150 LOC):expandLocalWildcard*, dispatch check,resolveAddWorkflowSpecAndContent.
Test Coverage Plan
add_workflow_resolution_test.go: input validation, spec routing, bootstrap profile selection, private-setting validation.add_workflow_local_package_test.go: manifest parsing, wildcard includes, path-escape validation, installable names.add_workflow_package_assets_test.go: skill dir scanning, explicit vs. discovered agents/skills.add_workflow_package_specs_test.go: spec generation for local and repo packages.add_workflow_wildcard_test.go: wildcard expansion, dispatch detection.
Target >80% coverage each.
Implementation Guidelines
- Preserve behavior and public API
- Add tests first; split one module at a time
- Run
make test-unitafter each split;make fmt
Acceptance Criteria
- Split into 5 focused files, each under 500 lines
-
make test-unit,make lint,make buildpass - ≥80% coverage on new files
- No public API changes
Priority: Medium
Effort: Medium
Expected Impact: Improved maintainability and testability
Generated by 🧹 Daily File Diet · copilot · auto · 32.4 AIC · ⌖ 7.49 AIC · ⊞ 10.4K · ◷
- expires on Oct 3, 2026, 4:59 AM UTC-08:00
Reacted by Copilot
Metadata
Metadata
Labels
automated-analysiscode-healthcookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!refactoring
Activity
github-actions commentedon Oct 1, 2026
🍪 Issue Monster selected this for Copilot
I’ve identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Oct 1, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Oct 1, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Oct 1, 2026
🍪 Issue Monster selected this for Copilot
I have identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Oct 1, 2026
🍪 Issue Monster selected this for Copilot
I’ve identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Oct 1, 2026
🍪 Issue Monster selected this for Copilot
Ive identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Oct 1, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Oct 1, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Oct 1, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Oct 1, 2026
🍪 Issue Monster selected this for Copilot
Ive identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪
github-actions commentedon Oct 3, 2026
This issue was automatically closed because it expired on 2026-10-03T12:59:16.943Z.