Conversation
Count elapsed hourly or daily periods, including periods without purchases, while preserving projected monthly savings units. Verify sparse and zero-filled windows, unit switches, partial endpoints, and daylight saving transitions through the rendered production bundle.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: LeanerCloud/cloud-commitments-platform/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughSavings history fallback averages now divide total savings by the hourly or daily intervals in the selected window, including intervals without data. Unit and end-to-end tests cover period lengths, display states, and daylight-saving transitions. ChangesRequested-window savings averages
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The average now reflects the selected window rather than purchase density. No actionable merge-blocking risk is established; merge after normal CI checks pass. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
The automatic CodeRabbit summary covers base The generic docstring-coverage suggestion is dismissed under the owner's sparse-comment convention: comments should explain a non-obvious constraint, rather than repeat clear code or test descriptions. No source change is warranted by that metric. Independent exact-commit local review and its reproduced evidence remain recorded in the PR body. CI is still running; this comment does not assert merge readiness. |
Sparse savings-history responses currently divide projected monthly savings by the number of returned rows. Three active hourly buckets totaling $1,680 over seven days display $560/mo. Use the actual requested elapsed window and interval so the same response displays $10/mo, including omitted zero buckets.
Preserves total, peak, display-unit conversions and the optional legacy summary average. The values remain projected monthly savings additions, not realized savings.
Closes #245
Independent gpt-6-astra review approved exact commit
bdd09d1336d712914bac04b6b37ae5b0a51657d1under the authorized local review alternative. Both implementation review passes were clean. Independent verification rebuilt the production bundle, passed 91 Jest tests and 11 Chromium regressions, and ran production SavePurchaseHistory, QueryHistory and response serialization on PostgreSQL 16 with the race detector. Replaying that fresh SQL response through the matching production bundle showed $10/mo, total $1.68K and peak $560/mo with no page or console errors. The committed regression failed against the original bundle with expected $10/mo and actual $560/mo; row-count and extra-endpoint divisor mutations also failed.Coverage includes all four UI windows, omitted and explicit zero buckets, complete controls, display units, empty/error states, narrow viewport and both Berlin DST transitions. Local proof uses synthetic purchase inputs and HTTP auth fixtures; no live-cloud purchases were performed. CI remains a separate publication gate.
Summary by CodeRabbit