-
Notifications
You must be signed in to change notification settings - Fork 268
Description
Description
The Daily Code Metrics Report (#13148) shows a data collection anomaly: the workflow metrics report 179 total workflow files but 0 compiled workflows and 0 average size, which is inconsistent with the 245,071 LOC in .github/workflows/ directory.
Current State
Workflow Metrics (From Feb 1, 2026 Report):
- Total Workflow Files (.md): 179 files
- Compiled Workflows (.lock.yml): 0 files ❌ (should be 148+)
- Average Workflow Size: 0 lines ❌ (should be ~63 KB based on lockfile stats)
Known Reality (From lockfile stats #13125):
- 148 compiled
.lock.ymlfiles exist - Average size: 63 KB (65,616 bytes)
- Total size: 9.16 MB
Problem
The metrics collection code is not detecting compiled workflows correctly, likely due to:
- Wrong file path or glob pattern for
.lock.ymlfiles - Incorrect parsing logic
- Missing error handling causing silent failures
Files Affected
pkg/metrics/collector.goor similar metrics collection code- Workflow metrics analysis script in
.github/workflows/daily-code-metrics.md - Possibly
scripts/analyze_code_metrics.shif using shell scripts
Implementation Approach
-
Find metrics collection code:
grep -r "Compiled Workflows" pkg/ .github/workflows/ grep -r "\.lock\.yml" pkg/metrics/ scripts/
-
Debug workflow detection:
- Check file path patterns (should match
.github/workflows/*.lock.yml) - Verify file reading logic
- Add debug logging to see what's being counted
- Check file path patterns (should match
-
Fix detection logic:
# Should find 148 files find .github/workflows -name "*.lock.yml" -type f | wc -l
-
Test metrics collection:
- Run metrics collection locally
- Verify all counts are non-zero and accurate
- Compare with lockfile stats analysis results
Success Criteria
- Workflow metrics correctly count all
.lock.ymlfiles (~148) - Average workflow size is accurate (~63 KB)
- Metrics align with lockfile statistics analysis
- No zero values in workflow metrics section
- Error handling added for metric collection failures
Impact
- Severity: Low (incorrect reporting, not affecting functionality)
- Scope: Daily code metrics reports
- Benefit: Accurate metrics for monitoring codebase health and workflow growth
Source
Extracted from Discussion #13148 - Daily Code Metrics Report (Feb 1, 2026)
"Review Workflow Metrics Discrepancy: The workflow metrics show 179 total workflow files but 0 compiled workflows and 0 average size, which appears inconsistent with the 245,071 LOC in
.github/workflows/. Investigate metric collection accuracy."
Priority
Medium - Affects visibility into codebase health, but not critical
Estimated Effort: 1-2 hours (debug + fix + test)
AI generated by Discussion Task Miner - Code Quality Improvement Agent
- expires on Feb 15, 2026, 9:07 PM UTC