Skip to content

Commit ada4aaa

Browse files
committed
docs(adr): ADR-0144 D7 records parameter 4 as scale 12 (ruling 6469382727)
The maintainer ruled parameter 4 on #27185: scale 12, total precision 24, decimal arithmetic, never float. D7 carries it; Open item 5 stays as a settled pointer so the numbering of items 6-11 does not move. Claude-Session: https://claude.ai/code/session_01Utp6CbTZrFqRYNgjSaSbN5 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5fa54ea commit ada4aaa

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
[`6464438764`](https://github.com/objectstack-ai/objectstack/issues/27119#issuecomment-6464438764), the workload list
88
[`6464936321`](https://github.com/objectstack-ai/objectstack/issues/27119#issuecomment-6464936321) and the seat's answers
99
in the summon chat. The ruling's own text is the authority this record executes; where the two differ, the ruling
10-
wins and this record is corrected.
10+
wins and this record is corrected. The unit of parameter 4 was ruled afterwards, on 2026-10-28, in ruling
11+
[`6469382727`](https://github.com/objectstack-ai/objectstack/issues/27185#issuecomment-6469382727) on #27185. The maintainer chose the option 「小数点后 12 位(推荐)」.
1112
- **Builds on**: [ADR-0104](./0104-field-runtime-value-shape-contract.md) D1 (a `currency` value is a bare number,
1213
kept here). [ADR-0112](./0112-error-code-vocabulary-and-ledger.md) governs the runtime refusals only: a blank record
1314
currency code and a missing rate ([Open item](#open-items) 9). It sets their codes and envelope on the wire, and any
@@ -53,8 +54,8 @@
5354
Three kinds of text feed this record. Each section says which kind it carries.
5455

5556
1. **Ruled.** Ruling `6465431966` fixes shape C′, sub-questions Q0–Q4, parameters 1–4, the five design rules, the
56-
release pairing and the commitment. [Decision](#decision) carries only this. It quotes the ruling wherever the
57-
wording matters.
57+
release pairing and the commitment. Ruling `6469382727` on #27185 fixes parameter 4's unit. [Decision](#decision)
58+
carries only these two. It quotes them wherever the wording matters.
5859
2. **Analysis the ruling read.** This is the design record `6464438764`, the workload rows `6464936321`, the
5960
measurement round `6041378776` and the shape verdict `6041482631`. They supply the context, the shapes considered
6061
and the per-card plan. A detail that appears only there is not ruled. This record lists such details under
@@ -214,15 +215,17 @@ pairing.
214215
| 1 | Backfill when a historical rate is missing | Report and skip the row, and apply the rest |
215216
| 2 | Who edits `sys_exchange_rate` | Organization admins only |
216217
| 3 | Rate direction | "1 home unit = `rate` units of the foreign currency" |
217-
| 4 | Precision of `rate` | "12 significant decimals" |
218+
| 4 | Precision of `rate` | "12 significant decimals", ruled as **scale 12** (ruling `6469382727`) |
218219

219220
- **Parameter 3 as arithmetic.** An amount `A` in currency `X`, whose rate row says `r`, is `A ÷ r` home units. The
220221
home amount is the record amount **divided by** `rate`. Workload row M2-2 writes the projection as
221222
"amount × rate", which is the inverse convention, and #27192's card body repeats the product. That card's own
222223
two-minute check is the division: USD 10,000 at 0.1389 gives ¥71,994.24. #27192 follows parameter 3.
223224
- **Parameter 1 governs the recompute and backfill** (M2-3, #27193). It does not govern the write path, where D5's
224225
refusal holds.
225-
- The wording of parameter 4 leaves its unit open ([Open item](#open-items) 5).
226+
- **Parameter 4's unit** comes from ruling [`6469382727`](https://github.com/objectstack-ai/objectstack/issues/27185#issuecomment-6469382727) on #27185: "scale 12 — twelve digits after the
227+
decimal point, total precision 24, decimal arithmetic, never float". The `rate` column is a decimal with precision 24
228+
and scale 12.
226229

227230
### D8 — Design rules recorded from the summon
228231

@@ -326,8 +329,8 @@ Where a source leans one way, the lean is quoted here, not adopted. This record
326329
`localization.currency` may be unset (its manifest entry says `required: false`, and there is no platform
327330
default). The ruling locks the setting once used. It does not say what happens while the setting is unset. The sources rule out a
328331
silent default (design record §9: no CNY default).
329-
5. **The unit of parameter 4** (#27185). "12 significant decimals" can mean 12 significant digits or 12 digits after
330-
the decimal point. The precision and scale of the `rate` column follow from the choice.
332+
5. **The unit of parameter 4.** Settled, and moved to D7: scale 12, ruling `6469382727` on #27185. The entry stays so
333+
that the numbers of the items below do not change.
331334
6. **A record currency equal to the home currency** (#27192). Workload row M2-2 reads "same-currency-as-home ⇒ rate
332335
1, no lookup". The ruling does not say whether such a write needs a rate row.
333336
7. **Uniqueness and audit of rate rows** (#27185). The design record §5 and the measurement round make rows unique per

0 commit comments

Comments
 (0)