feat(api): centralize request-summary metric calculations and formatting in SummaryMetricComparison, preserving history labels, order, units, rounding, percentages, trends, and panel links. - #36
Conversation
…ing in `SummaryMetricComparison`, preserving history labels, order, units, rounding, percentages, trends, and panel links.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #36 +/- ##
==========================================
Coverage 99.95% 99.95%
- Complexity 2040 2063 +23
==========================================
Files 156 157 +1
Lines 8165 8278 +113
==========================================
+ Hits 8161 8274 +113
Misses 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (5)
|
| Layer / File(s) | Summary |
|---|---|
Comparison API and metric formatting src/Comparison/SummaryMetricComparison.php, README.md, CHANGELOG.md |
Adds the immutable comparison value object and canonical metric output. It formats numeric, text, boolean, status, missing, delta, percentage, trend, unit, and panel values. Documentation and the changelog describe the API contract. |
Comparison regression coverage tests/Provider/SummaryMetricComparisonProvider.php, tests/Comparison/SummaryMetricComparisonTest.php |
Adds provider data and PHPUnit tests for ordering, exact formatting, missing values, increases, decreases, rounding boundaries, metric boundaries, and unchanged input summaries. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Merge Risk: ⚪ Minimal · up to 7351b
This adds a request-summary comparison API with documented formatting and regression coverage. No merge-blocking correctness or runtime risk is currently identified.
Poem
The rabbit checks each metric row,
With tidy units in a glow.
Baselines hop, targets align,
Trends point up or hold the line.
Panel links rest where they should be,
While tests guard every comparison key.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 46.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 3 files. (2 skipped: … | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description check | ✅ Passed | The description identifies this pull request as a non-breaking new feature, which matches the changeset and objectives. |
| Title check | ✅ Passed | The title clearly describes the main change: centralizing request-summary metric calculations and formatting in SummaryMetricComparison while preserving metric output contracts. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
Full details: Docstring Coverage
Explanation
Docstring coverage is 46.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 3 files. (2 skipped: 2 unsupported.)
- Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
- Create stacked PR
- Commit on current branch
🛠️ Fix failing CI checks 💡
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
feat/centralize-request-summary-metrics
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Pull Request