Skip to content

Commit d003d3e

Browse files
objectstack-fleet[bot]os-elon-muskclaude
authored
docs(adr): record ruling 6670707546 under ADR-0144 Open item 13 (#30787)
Fixes #30676 Clause-②: no Metadata-protocol: none Claim: 6675374172 · Branch: `claude/issue-30676-adr-0144-item-13-note` · Ruling-ref: 6670707546 · Seat: domain:server#1 · Session: `session_016WV4cytLmJxfAmgPVjUbbW` ## 维护者速读 - 改了什么:ADR-0144 开放项 13 下加一条 2026-11-06 注记,记下裁决 6670707546(C = A + B)。A 已由 PR #30737(`e2bcd5c1`,卡 #30674)落地:回填按组织走,`backfillRecordCurrencyCodes` 带 `organizationId`,CLI `--org` 与 `--all-organizations` 互斥,多组织库不带范围时在任何写入前拒跑并列出各组织无码行数;B 是租户管理员 REST 入口(卡 #30675)。四个未选方案各一行写明缘由。过渡态明写为过渡态:B 落地前,云租户的回填由平台运维应请求带 `--org` 代跑。项 13 在 B 半边继续开放。 - 为什么改:ADR 每有裁决就要修订(Prime Directive #13)。此前项 13 只记到 2026-10-30 的裁决 B,读者会把运维代跑当成答案。 - 风险与回滚:纯文字,一个文件 +25 行,无代码、无 changeset(`docs/adr/**` 快速通道,`skip-changeset`)。回滚即撤 PR。Tier H。 - 先看:ADR-0144 开放项 13 末尾的新注记(本 PR 唯一 hunk),对照裁决评论 6670707546 的 Ruling 与 Not chosen 两段。 - 两分钟验证:`pnpm check:adr-symbol-anchors` 退出 0,输出含「3157 anchors across 150 records resolve」——注记里的 `file#symbol` 锚全部在 `origin/main` 上解析。 - 需要您做的:席位 ACCEPT 后,由 os-zhuang 或 hotlong 批准(Tier H,`docs/adr/**`)。 ## What changes One dated `*Note (2026-11-06):*` appended to ADR-0144 Open item 13, in the record's existing note form: - the ruling, letter C (A now, B as its own card), linked the way the record's other notes link theirs; - A's tree evidence from PR #30737 (`e2bcd5c1`), cited by symbol: `packages/objectql/src/record-currency-backfill.ts#backfillRecordCurrencyCodes`, `#resolveScope`, `#organizationsRefusal`, `#walkCodelessRows`; `packages/cli/src/commands/migrate/record-currency-codes.ts#MigrateRecordCurrencyCodes` for the exclusive `--org` / `--all-organizations` pair and the refusal's remedy; ruling item 3's `packages/objectql/src/home-amount-recompute.ts#recomputeHomeAmounts`; - B in one sentence, card #30675; - not chosen, one line each with the reason: A alone, B alone, D (operations for good), deriving the code from `localization.currency`; - the interim, worded as an interim, and the item left open on its B half until #30675 lands. Not touched: `skills/objectstack-data/rules/field-types.md` (the card's third task is #30740's, per unblock note 6675290331); the record's Status, Provenance and Evidence lines (its earlier Open-item notes amend none of them either); `docs/adr/README.md` (the index gate reports it current). ## Tests None owed: a `docs/adr/**`-only diff, no package built or tested for its own sake. Gates below. ## Acceptance notes - The note's claims about the merged behaviour were read on `origin/main` at `1371b9d8` (the branch point), which contains `e2bcd5c1`: `resolveScope` refuses the option pair and a blank organization (`VALIDATION_ERROR`) and an organization on an object with no organization column (`INVALID_FIELD`); `organizationsRefusal` is the multi-organization refusal carrying per-organization counts; `walkCodelessRows` runs under `{ isSystem: true, tenantId }` and filters on `organization_id`; the oclif flags declare `exclusive`. The note does not restate the `INVALID_FIELD` code, keeping to the ruling's own text. - The objectql continuation anchors sit on one line with their path anchor, as the symbol-anchor grammar requires; that line is long, as the record's other anchor lines already are (its longest is 470 characters, and no line-length lint governs `docs/adr/**`). - `skip-changeset` rides the create: `docs/adr/**` publishes nothing from any released package. - Out of scope, noted and not filed: nothing found. ## Verification Pre-push: `check:commit-card-trailers` printed "1 commit message(s) on this push carry no card relation and no model identifier in the trailer pair." <details><summary>Derived gates (dispatch-gates --commands, reconciled with --ran) at head ff701a6</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 21 families at `ff701a6e` (1 path, +25/-0, under the human-merge threshold). Each ran as a plain command from the worktree with its exit code captured before any pipe into `ran.list`, and `--ran` reconciled the record: ``` Run reconciliation — 21 derived, 20 run, 1 NOT-MEASURED, 0 UNRUN. ✓ dispatch-gates --ran: 21 derived famil(ies) accounted for — 20 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3). ``` - 20 families exit 0, among them `check:adr-anchors`, `check:adr-index` ("docs/adr/README.md is current"), `check:adr-symbol-anchors` ("3157 anchors across 150 records resolve", the note's six among them), `check:adr-links` (991 destinations resolve), `check:nul-bytes`, `check:doc-authoring`, `check:pm-governed-merges`, `check:pm-prior-rulings`, `check:closing-keyword-parity`. - NOT MEASURED: `pnpm --filter @objectstack/lint run check:doc-formula-expressions`, exit 3 PREREQUISITE NOT MET: `@objectstack/formula` and `@objectstack/lint` are not built in this worktree. Their closure is `@objectstack/spec`, `sdui-parser`, `formula` and `lint`, and this session's worktree guard refuses the `bash scripts/pm/os-verify-lock.sh` invocation, so that build was not taken unlocked on the shared container. The lint workflow runs the family on the PR; the seat reads its check-run. The diff is one `docs/adr/**` file carrying no formula expression. - Eight families first exited 3 for a missing `node_modules` and were rerun green after `pnpm install`; the recorded reading is the rerun. </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (`packages/spec` untouched.) - [x] 2. Every name I added uses the casing for its kind. (No names added.) - [x] 3. No formatter ran. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. Publishes nothing, so `skip-changeset`; both declaration lines are filled in above. - [x] 6. `packages/spec` touched: n/a. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English; the 维护者速读 block is the required Chinese section. --- _Generated by [Claude Code](https://claude.ai/code/session_016WV4cytLmJxfAmgPVjUbbW)_ --------- Co-authored-by: os-elon-musk <os-elon-musk@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1491787 commit d003d3e

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,31 @@ Where a source leans one way, the lean is quoted here, not adopted. This record
522522
organization-scope flag, no per-organization count), so on a multi-organization deployment, where `dynamic`
523523
amounts displayed in each organization's own `localization.currency`, that code can be wrong for some of them
524524
(PR #28128's review should-fix S1, escalated to the epic PM).
525+
*Note (2026-11-06):* ruled, letter C, A now and B as its own card
526+
([`6670707546`](https://github.com/objectstack-ai/objectstack/issues/8345#issuecomment-6670707546) on #8345,
527+
2026-11-05). A landed in PR #30737 (`e2bcd5c1`, card #30674): the backfill runs one organization at a time.
528+
`backfillRecordCurrencyCodes` takes `organizationId`, under which the walk and every `engine.update` run as
529+
`{ isSystem: true, tenantId }` and filter on the row's own `organization_id`, and the report counts per
530+
organization; with no organization given the rows are walked once read-only, and more than one organization among
531+
them is refused `VALIDATION_ERROR` / 400 (`field: 'organizationId'`) before any write, the refusal listing each
532+
organization's codeless row count; `allOrganizations` is the explicit way to write the one code into every
533+
organization's rows, and the option pair, a blank organization and an organization on an object that stores none
534+
are refused before any row is read
535+
(`packages/objectql/src/record-currency-backfill.ts#backfillRecordCurrencyCodes`, `#resolveScope`, `#organizationsRefusal`, `#walkCodelessRows`).
536+
The CLI exposes both as `os migrate record-currency-codes --org <id>` and `--all-organizations`, an exclusive
537+
pair, and prints the refusal's counts with both flags as the remedy
538+
(`packages/cli/src/commands/migrate/record-currency-codes.ts#MigrateRecordCurrencyCodes`);
539+
`os migrate recompute-home-amounts --org <id>` takes the same shape and is never refused without it (ruling
540+
item 3; `packages/objectql/src/home-amount-recompute.ts#recomputeHomeAmounts`). No organization's
541+
`localization.currency` is read by the backfill, in its refusal or anywhere in its run (D8 rule 4). B is a tenant-admin door,
542+
card #30675: a REST twin of the command shaped on `POST /meta/_migrate-stored`, calling the same engine function,
543+
always scoped to the caller's organization, preview unless `apply: true`, behind the maintenance-door switch. Not
544+
chosen: A alone, since a cloud-managed tenant still reads a remedy it cannot run; B alone, since a self-hosted
545+
multi-organization CLI still writes one code everywhere; D, operations running it for good, contrary to the
546+
`_migrate-stored` rationale and ADR-0134 D2; deriving the code from `localization.currency`, which D8 rule 4
547+
forbids and which a `dynamic` tenant currency, having no history, could not answer. **Interim, not the answer:**
548+
until #30675 lands, a cloud-managed tenant's backfill is run by platform operations on request, with `--org`. This
549+
item stays open on its B half until that card lands.
525550

526551
## Verification notes
527552

0 commit comments

Comments
 (0)