Skip to content

Commit e9bb190

Browse files
committed
docs(adr): ADR-0144 takes the three should-fixes of contract review 6485013063
The review on 775d8c0 (PASS, no must-fix) found three places where the record said less, or other, than its own Decision: - Builds-on scoped ADR-0112 to two runtime refusals and called every build-time refusal an authoring diagnostic, while D6 places the ungrouped-aggregate refusal in two request-time doors. The paragraph now says ADR-0112 governs every refusal that answers on the wire, that "at build" covers the declared aggregates (summary roll-ups at registration, dataset measures at compile), and that an ad-hoc aggregate meets the same rule at the request door with the existing catalog code INVALID_FIELD; the two new codes stay the only ledger additions. - Consequences predicted the consumers' Metadata-protocol declarations. It now states the record's own claim: record and homeAmount are additive, the one narrowing of what an author can write is #27157's, and each consumer's semver is its own changeset's to declare. - Open item 12 records what the ruling on #27119 did not decide: whether cross-currency arithmetic between fixed fields of different codes is refused. The epic PM seat ruled that #27187 (PR #27338) confines its compile guards to record-mode amounts; the general guard waits on the maintainer and epic #8345 carries the question. Items 1-11 keep their numbers. Claude-Session: https://claude.ai/code/session_01Utp6CbTZrFqRYNgjSaSbN5 Co-authored-by: Claude <noreply@anthropic.com>
1 parent e9480d9 commit e9bb190

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

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

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
wins and this record is corrected. The unit of parameter 4 was ruled afterwards, on 2026-10-28, in ruling
1111
[`6469382727`](https://github.com/objectstack-ai/objectstack/issues/27185#issuecomment-6469382727) on #27185. The maintainer chose the option 「小数点后 12 位(推荐)」.
1212
- **Builds on**: [ADR-0104](./0104-field-runtime-value-shape-contract.md) D1 (a `currency` value is a bare number,
13-
kept here). [ADR-0112](./0112-error-code-vocabulary-and-ledger.md) governs the runtime refusals only: a blank record
14-
currency code and a missing rate ([Open item](#open-items) 9). It sets their codes and envelope on the wire, and any
15-
new code is registered in ADR-0112's extension ledger. The build-time refusals this record names are authoring
16-
diagnostics, not wire errors.
13+
kept here). [ADR-0112](./0112-error-code-vocabulary-and-ledger.md) governs every refusal that answers on the wire.
14+
Two of them need new codes, a blank record currency code and a missing rate ([Open item](#open-items) 9): ADR-0112
15+
sets their codes and envelope, and both are registered in its extension ledger. They are the only ledger additions.
16+
"At build" in D1 and D6 covers the declared aggregates: a `summary` roll-up refuses at registration and a dataset
17+
measure at compile, as authoring diagnostics, not wire errors. An ad-hoc aggregate is never built, so it meets the
18+
same rule at the request door (the ObjectQL aggregate-by-field-type door and the analytics cube measure door, D6)
19+
with an existing ADR-0112 catalog code, `INVALID_FIELD`.
1720
[ADR-0029](./0029-kernel-object-ownership-and-platform-objects-decomposition.md) D1, D3 and D6 (a first-party
1821
capability owns its `sys_*` objects, one owner per object, and `platform-objects` is being decomposed) and
1922
[ADR-0028](./0028-metadata-naming-and-namespace-isolation.md) (Deferred; the `sys` namespace design it records)
@@ -293,9 +296,9 @@ D8 already excludes a switch, injected columns, fixed field names and a setting
293296

294297
## Consequences
295298

296-
- **The change is additive.** `record` is a new mode, `dynamic` and `fixed` keep their meaning and stored rows are not
297-
touched. An app that never writes `record` sees no change. Three cards declare `Metadata-protocol: added`: the two that add
298-
authorable keys (#27184, #27191) and the seam card that adds the analytics wire key (#27187).
299+
- **`record` and `homeAmount` are additive.** `record` is a new mode, `dynamic` and `fixed` keep their meaning and
300+
stored rows are not touched. This epic's one narrowing of what an author can write is #27157's: a `fixed` field
301+
must name its code. Each consumer's semver is its own changeset's to declare, not this record's.
299302
- **Two steps cannot be undone once used** (design record §13). One is the home-currency lock. The other: an object
300303
with record-mode amounts and a home field returns to a single currency only through a data migration.
301304
- **Today's relabel hazard closes where the feature is used** (the measurement round's Q2 recommendation). Once the
@@ -350,6 +353,12 @@ Where a source leans one way, the lean is quoted here, not adopted. This record
350353
`packages/platform-objects/src`. ADR-0029 D1, D3 and D6 give a first-party capability ownership of its `sys_*`
351354
objects and decompose `platform-objects`, and ADR-0028 (Deferred) records the `sys` namespace design. #27185
352355
settles the owner against them.
356+
12. **Whether today's cross-currency arithmetic between `fixed` fields of different codes is refused** (epic #8345).
357+
Two shapes: a measure `currency` that contradicts a `fixed` field's code, and a derived measure over two different
358+
`fixed` codes, which Context §1 counts among today's silently wrong numbers. The ruling on #27119 did not decide
359+
this: the ruled D1 sentence names only record-mode fields. The epic PM seat ruled that the R1 analytics card #27187
360+
(PR #27338) confines its compile guards to record-mode amounts. The general `fixed`-versus-`fixed` guard stays
361+
undecided. The authority is the maintainer's, and epic #8345 carries the question.
353362

354363
## Verification notes
355364

0 commit comments

Comments
 (0)