Harden Emporia CSV import: validate mains, fix zero-peak fallback, define dedup policy #26
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#26
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?
Three robustness gaps in
src/lib/parseEmporia.js::177-180) is a single regex over column names; if no column matches, every row'smainsis 0 and all bills silently compute to ~$0. Add a post-parse check: if mains ≤ 0 across most rows or mains < sum of circuits, surface an import error/warning in the summary card instead of proceeding.peakDemandKw(:280) uses|| 3.0, so a computed 0 falls back to the slider default — combined with (1) this charges a phantom 3 kW demand on Ultimate. Use an explicitNumber.isFinite/null check.:15-18) is first-file-wins per timestamp, so re-importing a corrected export changes nothing. Switch to last-write-wins and say so in the import summary ("N rows replaced").Acceptance criteria
Relations: relates to #9 (same file; do together)
(Audit finding F-05, 2026-07-16 — Severity: Medium, Confidence: Medium)