You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Daily Code Metrics Report - 2026-07-29 flagged that files over 500 LOC grew 44% over the last 30 days (525 -> 756 files), signalling growing complexity/size in a subset of files. This is called out as the top actionable recommendation in that report. A related but narrower issue (#48621, still open) covers pkg/workflow/awf_helpers.go specifically; this issue is for a broader triage/refactor pass across the top offenders repo-wide.
Suggested Changes
Run a repo-wide scan (e.g. find pkg -name *.go | xargs wc -l | sort -rn | head -30, restricted to non-generated/non-test Go source) to identify the largest files by LOC
Pick the top 3-5 largest, actively-churned pkg/ files not already covered by an open issue and split them into smaller, single-responsibility files/functions
Add or update unit tests for extracted units to preserve behavior
Files Affected
Top offenders in pkg/ per the LOC scan above (exact file list to be determined by the scan since the report only gives aggregate counts)
Success Criteria
At least 3 of the largest non-generated Go files are split into smaller, cohesive units (<500 LOC each) or their growth justified/documented
All existing tests pass; new tests added for extracted units
No behavior change (verified via existing test suite)
Description
The Daily Code Metrics Report - 2026-07-29 flagged that files over 500 LOC grew 44% over the last 30 days (525 -> 756 files), signalling growing complexity/size in a subset of files. This is called out as the top actionable recommendation in that report. A related but narrower issue (#48621, still open) covers
pkg/workflow/awf_helpers.gospecifically; this issue is for a broader triage/refactor pass across the top offenders repo-wide.Suggested Changes
find pkg -name *.go | xargs wc -l | sort -rn | head -30, restricted to non-generated/non-test Go source) to identify the largest files by LOCpkg/files not already covered by an open issue and split them into smaller, single-responsibility files/functionsFiles Affected
pkg/per the LOC scan above (exact file list to be determined by the scan since the report only gives aggregate counts)Success Criteria
Source
Extracted from Daily Code Metrics Report - 2026-07-29 (discussion #48968)
Priority
Medium - Addresses a clear negative trend (44% growth in large files) called out as the report's top recommendation.