Pin value-level regression tests for rates, adjusted payback, and projections #37
Labels
No labels
bug
decision
docs
enhancement
integration
ops
security
tech-debt
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/BatteryStorageCalculator#37
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
simulation.test.jsasserts directions and finiteness but no dollar values;payback.test.jsskipscalculateAdjustedPaybackYears(the function behind every displayed payback,payback.js:11-32);rates.js— the tariff itself — andprojections.js's cumulative math have no tests at all. A transposed digit in a rate constant would ship green.Add: (1) hand-computed bills for a 48-hour synthetic dataset per plan/season (covering tier blending and a holiday); (2) adjusted payback with escalation 5% / degradation 2% against a hand-computed expectation, plus the maxYears=Infinity edge; (3) one projection cumulative-curve fixture; (4) a golden-file test of the full
runHomeCalculationoutput for a small fixture home, keyed toCALCULATION_FORMULA_VERSIONso intentional formula changes require an explicit version bump (which also keeps the server cache honest).Acceptance criteria
Relations: relates to #7
(Audit finding F-16, 2026-07-16 — Severity: Medium, Confidence: High)