feat(#236): add inProgressCount to MetricsSummary and fix successRate comment#
Problem#
MetricsSummary lacked a field for tasks in-flight (blocked/gated), and the zero-denominator path in computeSummary had no explanatory comment for why successRate returns 0.0 when there are no terminal tasks.
Task / Link#
GitHub Issue #236
Changes#
- Added
inProgressCount: numberto theMetricsSummaryinterface - Computed
inProgressCountasblocked + gatedcounts incomputeSummary - Added inline comment at the zero-denominator guard:
// successRate is 0.0 when no terminal tasks exist - Added tests: issue scenario (27 complete / 45 terminal ≈ 0.60, inProgressCount === 38), zero-terminal edge case (successRate === 0, inProgressCount === total), and updated the zero-tasks test to assert
inProgressCount === 0
Notes#
Additive change to the MetricsSummary interface — no existing consumers break.
Testing#
- Unit tests: all 19 tests in
metrics.service.spec.tspass - Lint: no errors in metrics files