chore: money invariants, mollie assumptions, single pnpm pin #173

Sammanfogat
supernaut sammanfogade 4 incheckningar från chore/small-fixes in i main 2026-10-13 08:40:48 +00:00
Ägare

What

Three small chores, one commit each.

  • build: the Containerfile no longer pins pnpm. Corepack reads packageManager from package.json, so there is one version (11.28.3).
  • docs: the README marks the Amsterdam-calendar and 7-day dunning claims as assumptions, and adds test-mode notes (10-payment test subscription cap, SEK test payments work).
  • feat(db): migration 0012_money_checks adds CHECK constraints. charge and invoice: gross equals net plus vat, gross above zero, vat_rate_bps >= 0. refund: amount_minor > 0. A Postgres test shows each bad row is rejected.

Notes

  • The migration fails to apply if an existing row already violates a check. Run the checks as a SELECT against prod first.
  • The runtime image still installs pnpm, because it runs pnpm install --prod. Dropping it needs a different install approach, left out here.
  • No version bump.

Closes #92
Closes #123
Closes #124

## What Three small chores, one commit each. - `build`: the Containerfile no longer pins pnpm. Corepack reads `packageManager` from `package.json`, so there is one version (11.28.3). - `docs`: the README marks the Amsterdam-calendar and 7-day dunning claims as assumptions, and adds test-mode notes (10-payment test subscription cap, SEK test payments work). - `feat(db)`: migration `0012_money_checks` adds CHECK constraints. `charge` and `invoice`: gross equals net plus vat, gross above zero, `vat_rate_bps >= 0`. `refund`: `amount_minor > 0`. A Postgres test shows each bad row is rejected. ## Notes - The migration fails to apply if an existing row already violates a check. Run the checks as a `SELECT` against prod first. - The runtime image still installs pnpm, because it runs `pnpm install --prod`. Dropping it needs a different install approach, left out here. - No version bump. Closes #92 Closes #123 Closes #124
supernaut lade till 3 incheckningar 2026-10-13 06:39:24 +00:00
Drop the stale pnpm 11.17.0 pin from the Containerfile. Corepack follows
packageManager, so there is one version.
feat(db): check money invariants on charge, invoice and refund
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m16s
8a2af3c3eb
Add CHECK constraints: gross equals net plus vat, gross and refund
amount above zero, vat rate not negative.
supernaut lade till 1 incheckning 2026-10-13 08:33:38 +00:00
chore: merge origin/main, renumber money checks migration to 0013
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m19s
13cc4f1c48
supernaut sammanfogade incheckning 83557d6348 till main 2026-10-13 08:40:48 +00:00
supernaut tog bort grenen chore/small-fixes 2026-10-13 08:40:48 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-13 08:45:11 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-payment!173
Ingen beskrivning angiven.