test: lock temporal and negative calculation edge cases ACC-10 - #18
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 63 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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 |
PR Summary
Ausgangslage
Zeitliche Finanzdaten haben Grenzfälle, die im normalen Beispieldatenstand leicht untergehen: gleiche Stichtage, fehlende Zwischenmonate, mehrere Ratenenden im selben Monat, negative Konten und zu niedriges Einkommen.
ACC-4 hat die Anzeige dieser Zustände abgesichert, ACC-9 die Rechengenauigkeit gegen den synthetischen Normalfall. Isolierte Cent-Tests für Snapshot-Auswahl, Monatslücken und negative Kontosummen fehlten noch. Die Selektorlogik selbst war bereits korrekt und klemmt negative Ergebnisse nicht auf null.
Aufgabe
Die Berechnungslogik sollte für die genannten Fälle reproduzierbar in Beträgen geprüft werden, nicht nur über Render- oder Visual-Tests. Sortierung und Auswahl von Snapshots sollten eindeutig festliegen.
Lösung
In src/finance/selectors.test.ts gibt es jetzt eine isolierte synthetische Fixture und vier benannte Betragstests:
Bereits vorhandene Tests decken mehrere Ratenenden im selben Monat und zu niedriges Einkommen weiter ab. Die Fachlogik ist unverändert.
Änderungen
Verifikation
Linear: ACC-10
Greptile Summary
The PR adds focused regression coverage for temporal snapshot selection, inactive entities, debt milestone gaps, and negative financial values without changing production logic.
Confidence Score: 5/5
The PR appears safe to merge with no actionable defects identified.
The changes only add regression tests and documentation, and both accurately reflect the existing snapshot-selection, milestone carry-forward, inactive-entity filtering, and negative-value behavior.
Important Files Changed
Reviews (1): Last reviewed commit: "test: lock temporal and negative calcula..." | Re-trigger Greptile