Skip to content

Commit eb4b976

Browse files
committed
docs(skills,adr): homeAmount.rateDate is date/datetime, the currency row lists all four currencyConfig keys, and ADR-0144 Open item 1 records the settled pointer spelling
Should-fixes 3-5 of contract review 6526217217 on PR #28096: the field-types paragraph under-taught `rateDate` as `date` only, the Numbers table row named two of the four real `currencyConfig` keys, and ADR-0144 Open item 1 gains a dated note recording `rateDate` / `rateField` as landed. Fixes #28203 Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d156vwPo83g9GQuJSt
1 parent 57f8ca2 commit eb4b976

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎docs/adr/0144-multi-currency-record-currency-dated-rates-write-time-home-projection.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,14 @@ Where a source leans one way, the lean is quoted here, not adopted. This record
320320
workload row M2-1 and #27191 is corrected to required. Workload row M2-1 drafts the names `rateDate` and
321321
`rateField`; in that draft, `rateDate` is "a `date`/`datetime` field on the same object (⛔ no default)". The design
322322
record §6 says the document date must not default to `created_at` (「⛔ 不默认 created_at」).
323+
*Note (2026-10-31):* settled: the pointers are spelled `rateDate` (the document date) and `rateField` (the rate
324+
used), the names workload row M2-1 drafts, landed in PR #28096 (`73b72709`). Beside them `homeAmount.field` names
325+
the home field, and all three are required with no default
326+
(`packages/spec/src/data/field.zod.ts#HomeAmountSchema`). `rateDate` names a `date` or `datetime` field on the
327+
same object (`packages/spec/src/data/object.zod.ts#HOME_AMOUNT_RATE_DATE_TYPES`) and `rateField` a `number` field;
328+
both the home and the rate field declare `readonly: true`, and the object judges what each pointer names
329+
(`packages/spec/src/data/object.zod.ts#refuseDishonestHomeAmount`). Review: contract review
330+
[`6526217217`](https://github.com/objectstack-ai/objectstack/pull/28096#issuecomment-6526217217) on PR #28096.
323331
2. **Which row counts as "the document date's rate"** (#27192). The ruling says "a platform rate table by effective
324332
date". Workload row M2-2 and the measurement round read this as the row with the latest `effective_date` on or before
325333
the document date. The measurement round also rules out a "nearest-future rate". The design record §5 says

‎skills/objectstack-data/rules/field-types.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fields: {
5050
| Type | When to Use | Config |
5151
|:-----|:------------|:-------|
5252
| `number` | Generic numeric value | `min`, `max`, `precision`, `scale` |
53-
| `currency` | Monetary amounts | `currencyConfig` (currencyMode, defaultCurrency) |
53+
| `currency` | Monetary amounts | `currencyConfig` (currencyMode, defaultCurrency, currencyField, homeAmount) |
5454
| `percent` | Percentage values (0-100) | `min`, `max`, `precision` |
5555

5656
## Date & Time
@@ -178,8 +178,8 @@ stored field to `'record'`? Backfill: `os migrate record-currency-codes`.
178178

179179
`homeAmount` (`'record'` only, all three required): the engine stores the
180180
home-currency amount in `field` (a `'dynamic'` `currency`) at the `rateDate`
181-
(`date`) rate, and that rate in `rateField` (`number`), both `readonly: true`.
182-
Cross-currency totals sum `field`.
181+
(`date`/`datetime`) rate, and that rate in `rateField` (`number`), both
182+
`readonly: true`. Cross-currency totals sum `field`.
183183

184184
### Select with Default
185185

0 commit comments

Comments
 (0)