@happyvertical/smrt-projects 0.41.0 → 0.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -64,7 +64,7 @@ All collections provide: `discover({ repository, filters })`, `findByRepository(
64
64
  - **Money is integer minor units** (cents) — `$19.99` is `1999`.
65
65
  `ServiceChargeSnapshot.amount` and `ServiceCompensationSnapshot.amount`
66
66
  initialize `= 0`, never `= 0.0`: the integer literal is what maps them to
67
- INTEGER columns (#2401). The two convert as a pair — the delivery margin is
67
+ INTEGER columns (BIGINT on fresh PostgreSQL/DuckDB databases; #2401, #2373). The two convert as a pair — the delivery margin is
68
68
  `charge - compensation`, an exact integer subtraction with no tolerance —
69
69
  and both are fed verbatim by `CommercialSnapshot.amount`, so a resolver that
70
70
  returns major units corrupts the snapshot silently on SQLite and fails with
@@ -76,10 +76,11 @@ All collections provide: `discover({ repository, filters })`, `findByRepository(
76
76
  not divided.
77
77
  - **Migrating an existing database**: `preflightProjectsMoneyMinorUnits(db)`
78
78
  reports which columns still hold major units and which rows would be rounded
79
- or overflow `int4`; `migrateProjectsMoneyToMinorUnits(db)` converts them
79
+ or exceed JavaScript's safe-integer range; `migrateProjectsMoneyToMinorUnits(db)` converts them
80
80
  (idempotent via `_smrt_backfills`). On SQLite the values are rescaled but the
81
- declared type needs the table-rebuild path (#2370). The `int4` ceiling is
82
- ~2.1e9 minor units (~$21.4M) per column; BIGINT is parked in #2373.
81
+ declared type needs the table-rebuild path (#2370). Fresh PostgreSQL/DuckDB
82
+ INTEGER columns are BIGINT and hydration rejects values outside JavaScript's
83
+ safe-integer range; existing PostgreSQL `int4` columns require #2424.
83
84
  - **SDK dependency**: requires `@happyvertical/repos` and `@happyvertical/projects` from SDK
84
85
  - **tokenConfigKey not tokenValue**: never store actual tokens in the database
85
86
  - **synthesisCount tracks incorporateFeedback calls**: incremented on each apply