Skip to content

Commit 35bd360

Browse files
docs(adr): ADR-0158 units of measure records ruling U1–U8 and settles L1–L4 (#35370)
Fixes #35339 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;这是一份设计记录,把您同意的计量单位方案(标准单位表、各组织自加的单位、带单位的数量字段、分两期交付)和您在决策卡上的原话「可改,只影响以后」写成合同;在您原话之外的细则(重算、谁能改比例、删除单位、单位只有一个名称)都标明是席位按分析建议定的;另有两个问题记为待您以后裁决的开放项,实现卡动手前再定。 - 为什么做:来自「平台计量单位」这张卡;各套件各写一套单位,数量在套件之间、和 ERP 之间对不上,箱和个、千克和吨也没法换算。 - 出错会怎样:只影响后续实现卡的依据,不改任何运行行为;写错了撤回或改这份记录即可。 - 要你做什么:审阅并批准这份设计记录(受管文件,由您批准合入)。 ## 席位核对 ### What changes - New `docs/adr/0158-units-of-measure-standard-unit-table-org-units-quantity-unit-declaration-base-quantity.md` (581 lines), Status **Accepted** by ruling record 7001193034 on #35339. Decision quotes U1 to U8 verbatim with the ruling's own labels; Non-goals quotes "Out of scope". It declares and implements nothing. - "Left to this record" has four sections, all settled, and each part says whose it is: - **L1**: the maintainer's pick is the maintainer's own words on the decision card, option A 「可改,只影响以后」, read as the record's first two sentences of 1A (a ratio can be edited, an edit affects later writes only, stored rows keep their quantity and factor). Ruling record 7003532733 is quoted verbatim; beyond those words, the recompute, the admin edit and its audit, the UI sentence and the delete are marked "settled by the seat, per the analysis recommendation", and the immutability bullet is marked as the seat's technical item. - **L2**: 2A (one label per organization unit, translation deferred to #35404, per-locale labels for standard codes) is marked "settled by the seat, per the analysis recommendation". - **L3** and **L4**: settled by the owning seat as technical items, unchanged in substance. - This round, at `db734f1d`, answers the seat's contract review (comment 7005127062 on this PR): <details><summary>Where each review item was closed</summary> | Item | Closed in the ADR | |:--|:--| | S1, a unit code with no quantity beside it | Open item 8, owed a ruling by the maintainer, not settled; pointers from L3's object door and its `master_detail` bullet | | S2, which writes U5 judges | Open item 9, for the membership card: the three cases, the two precedents, the third shape and its rollout order; the Consequences line on delete points to it | | S3, U6's decimal places for a standard code | Open item 10, owed a ruling by the maintainer, not settled; pointer from L4 | | S4, immutability across delete-then-create | Open item 11, for the `sys_unit` card; L1's immutability part and the Consequences line narrowed to a unit row | | E1, what rests on 7003532733 beyond 「可改,只影响以后」 | Status line, Decided by, Provenance item 2, the "Left to this record" intro, L1's part list, L2, Consequences, Non-goals and References; Open item 5 named as R2's later card | | E3, the PR title said "pending" | Retitled through the relay in the same patch as this body | | N1 | The immutability bullet is marked the seat's (with E1) | | N2 | A mirror-table row: ADR-0144 D5's third bullet and D7 parameter 2 against the seat's L1 settlement | | N3, N6 | Open item 4: the arithmetic of the ratio and the factor, and what the base-quantity field holds | | N4 | Open item 9: whether U5 checks a code's dimension against `unitDimension` | | N5 | Open item 6: what the display default does at render | | N7 | Open item 12, with a pointer from the backfill row of the mirror table | | N8 | The U3 notes are marked as the seat's settlement, the read grant named a new rule; Open item 2 adds the write grants | </details> - Other edits this round: Open item 3 attributes the deleted-code refusal to the seat; L3's `master_detail` bullet says "a code on the row" instead of "a sibling code on the row". Open items keep their numbers 1 to 7, and items 8 to 12 are new. - Every newly cited source was read at `bce0263d` and checked to say the same at `3819afec`, so the record's Evidence line stands: the two validation headers in `packages/objectql/src/validation/`, `sys_exchange_rate`'s `currency` field, `backfillRecordCurrencyCodes`'s header, `os migrate recompute-home-amounts`, and ADR-0144 D5, D7 and D8 and ADR-0148 D4. - `docs/adr/README.md` regenerated by `node scripts/adr-index.mjs` (generator-owned). This round leaves it unchanged, because the index reads only the start of the Status line. - Number **0158**, not 0157: #35364 (working calendars) holds 0157 as an open PR. ### Tests No code. Gates derived by `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` for this diff, run at head `db734f1d`: 21 of 21 exit 0, reconciled by `--ran` (21 derived, 21 run, 0 NOT-MEASURED, 0 UNRUN). <details><summary>Gate verdict lines at db734f1</summary> - `check-adr-links`: 1173 relative link destination(s) under docs/adr/ resolve - `check:adr-symbol-anchors`: 3804 anchors across 159 records resolve, 0 line anchors - `check:adr-index`: docs/adr/README.md is current, every record parsed - `check:adr-anchors`: OK, 153 decision numbers each naming one decision - `check:nul-bytes`: OK, no raw ASCII control bytes - `check:doc-formula-expressions`: exit 3 first in this fresh worktree (PREREQUISITE NOT MET: `@objectstack/formula` and `@objectstack/lint` not built; nothing measured). After `turbo run build` of those two under the verify lock (`VERDICT command-exit 0`) it exits 0 ("26 record-scoped formula example(s) ... judged clean"). - `check:doc-authoring`, `check:pm-prior-rulings`, `check:pm-governed-merges`, `check:closed-ceremony-text` and the rest of the 21: exit 0 </details> <details><summary>Verbatim check of the quotations</summary> A script compared every quoted line of ruling record 7001193034 with the ADR text, blockquote markers and line wraps collapsed: 32 of 32 present at `db734f1d` (earlier bodies said "33 of 33", a miscount). A second script did the same for ruling record 7003532733: its four "Picked" bullets, the two card questions and the ruling reference, 7 of 7 present. Control: a copy with "writes" changed to "write" in 1A reports 1A missing. The seat's L4 text is present byte for byte. </details> ### Acceptance notes - A1: `origin/main` `b3247ddb` still ends at 0156; 0158 stays unique, and #35364 (0157) is still open, so the README was left alone this round. - A2: the README is generated by `scripts/adr-index.mjs`, never hand-edited; `check:adr-index` is report-only. - A3: `dispatch-gates --commands` derives the same 21 commands as the earlier rounds, the ADR families among them. - `node scripts/pm/overlap-check.mjs` exits 1 against #35364 on `docs/adr/README.md` only; `origin/main` merges cleanly. Whichever lands second merges `main` and re-runs `pnpm adr:index`. - `dispatch-gates` warns that the tree is 7 commits behind `origin/main` and that 1 file it derives from changed in that range (`scripts/pm/check-skill-line-ratchet.mjs`, which none of the 21 commands runs). - The title avoids `sys_unit` because `scripts/adr-index.mjs` strips underscores from titles; filed as #35372. - The suite facts in Context are the card's readings, quoted as such; the suites' source was not read. ### Verification Read first: L1 and L2 (whose each part is), then Open items 8 to 11 against the review's S1 to S4, then the U3 notes and Consequences. Two-minute check: open the ADR and search for `a ruling is owed`; expect 2 hits, Open items 8 and 10. Search for `per the analysis recommendation`; expect 6 hits. Search for `PENDING`; expect 0. Governed (Tier H): stays draft; landing is the maintainer's. --- _Generated by [Claude Code](https://claude.ai/code/session_01Utp6CajiB6BSQKWowy6YLB)_ <!-- signed: repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent efd710a commit 35bd360

2 files changed

Lines changed: 586 additions & 4 deletions

File tree

0 commit comments

Comments
 (0)