Memory repository drops excludeFromWholeHome on circuit assignments #35

Open
opened 2026-07-17 03:07:57 +00:00 by claude-bot · 0 comments
Contributor

repository.memory.js:454-464 normalizes circuitAssignments without excludeFromWholeHome, while migration 003_circuit_whole_home_exclusion.sql and repository.pg.js:732-757 persist it. Since the whole test suite runs on the memory repo, the field's round-trip and its downstream effect on outage analysis are untested, and the memory backend silently loses user data written through it. Add the field to the memory normalizer and a test asserting parity of the normalized shape between both repositories for circuit assignments.

Acceptance criteria

  • Field round-trips through the memory repo
  • Shape-parity test between memory and pg normalization exists

Relations: relates to #7

(Audit finding F-14, 2026-07-16 — Severity: Medium, Confidence: High)

`repository.memory.js:454-464` normalizes circuitAssignments without `excludeFromWholeHome`, while migration `003_circuit_whole_home_exclusion.sql` and `repository.pg.js:732-757` persist it. Since the whole test suite runs on the memory repo, the field's round-trip and its downstream effect on outage analysis are untested, and the memory backend silently loses user data written through it. Add the field to the memory normalizer and a test asserting parity of the normalized shape between both repositories for circuit assignments. **Acceptance criteria** - [ ] Field round-trips through the memory repo - [ ] Shape-parity test between memory and pg normalization exists **Relations:** relates to #7 *(Audit finding F-14, 2026-07-16 — Severity: Medium, Confidence: High)*
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/BatteryStorageCalculator#35
No description provided.