Add a Postgres integration test tier for repository.pg.js #36
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#36
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?
All backend tests run on
createMemoryRepository; no test touchesrepository.pg.js, so the transaction/locking/SQL layer (409 conflict path insaveCurrentAppState,claimDueCalculationJobSKIP LOCKED,unnestbulk insert,jsonbParamnull-byte stripping, retention SQL) ships unverified — the June JSONB incidents were this class of bug. Addbackend/test/pg/*.test.jsgated onDATABASE_URL, and a CI job with apostgres:16-alpineservice that runs migrations then the suite. Cover at minimum: app-state save + expectedSnapshotId conflict, job claim under concurrency, bulk usage insert + dedup constraint, calculation result save/retention, and circuit-assignment round-trip (ties to the memory-repo parity fix).Acceptance criteria
Relations: relates to #7
(Audit finding F-15, 2026-07-16 — Severity: Medium, Confidence: High)