Skip to content

[Decision] Ruling 5791803339 points currency authors at currencyConfig.precision — but nothing reads that key, and removing scale leaves two console faces rendering currency with zero decimals until objectui#10221 lands #19910

Description

@os-support-ai

Ruled: 5805782503 · letter 乙 · 2026-09-24T01:26Z

Filing gate: ② a maintainer decision. It is a counter-fact measured while executing ruling 5791803339 (#19629, letter B). Filed by the domain:spec execution seat 1 (session_013RDBh5DqXd2xnLwvHLgLFr, seat post #6017) from the round that built PR #19909. ⛔ The PR executes the ruling to the letter, and ⛔ it is not armed for merge while this card is open.

维护者速读

裁决 B 的内容:把货币字段上的 scale 退役,作者改用 currencyConfig.precision 设小数位。PR #19909 已照做,并把 15 个示例货币字段上的 scale: 2 删掉了。

实测发现两件事与裁决的前提不符:

  1. currencyConfig.precision 没有任何地方读。 前端的表格单元格按币种标准位数显示(例如人民币 2 位),编辑控件读的是字段级 precision,本仓非测试代码里也没有读者。裁决给作者指的是一个填了也不生效的设置。另外,新加一个 currencyConfig 块会自动带上默认币种 CNY,照着提示去填,反而可能改掉字段显示的币种。
  2. 表格底部汇总行和看板指标卡今天读的是 scale,没写就按 0 位小数。 示例里的 scale 删掉后,这两处的货币金额会显示成 0 位小数,直到前端卡 objectui#10221 落地为止。指标卡还不在那张卡的范围里。
  • 甲:照原裁决,现在就合。提示继续指向没人读的 currencyConfig.precision,这两处有一段时间显示 0 位小数。
  • 乙:提示改成「直接删掉;货币的小数位由币种决定」,迁移条目里去掉「挪到 precision」这一支;objectui#10221 先扩大到指标卡并落地,本 PR 再合。
  • 丙:提示改指字段级 precision(编辑控件确实读它)。但它的说明写的是「总位数」,和实际按小数位读取对不上,得另外修。

推荐乙。选 甲 / 乙 / 丙?

The counter-facts, measured

The round's readings, at objectui pin 62597c5880 (.objectui-sha on origin/main 44ce049a8c):

  • The currency cell renders the ISO 4217 minor unit.
  • The edit widget (packages/fields/src/widgets/CurrencyField.tsx) reads the FIELD-level precision. Its own comment says currencyConfig.precision is 「a different key … this widget never reads」.
  • The grid summary footer and the dashboard ObjectMetricWidget currency arm read scale ?? 0.
  • This seat's reading on origin/main 44ce049a8c: git grep currencyConfig over non-test, non-spec packages/*/src finds 0 readers.
  • The ruling's control said 「2 example currency fields, 0 declare scale」. The round found 15 that declared scale: 2. All 15 were deletes under the ruling's migration prescription.

四棱

  • 实际业务需求:甲会让看板和表尾的金额暂时丢掉小数位,这是用户看得见的倒退。乙、丙都避免了指向一个不生效的设置。
  • 项目长远合理性:乙把「货币的小数位由币种决定」定为唯一答案,和单元格今天的行为一致。丙会让字段级 precision 身兼两义。
  • 防 AI 写错:甲继续教 AI 去填一个没人读的键,正是 ADR-0049 要消除的「声明了但不兑现」。乙直接去掉这条路。
  • 创业阶段不扩散:乙改动最小:PR fix(spec,objectql)!: retire scale from the currency field type — refused at parse, no longer enforced on writes #19909 里改一句提示和迁移条目,再调一下落地顺序。

席位推荐乙:它去掉了最后一个指向不生效设置的地方,15 处实际改动本来也都是删除。落地顺序上,前端不依赖这次 spec 改动,可以先合,这样 0 位小数的空窗就不会出现。

Prior rulings read: currencyconfig,precision,scale,currency,minor unit → 6 hits; ADR-0032 Decision §3, ADR-0033 Decision §10, ADR-0035 Decision §3, ADR-0061 D3; thread: 1 ruling(s) (5791803339); repo: objectstack-ai/objectstack

The ADR hits rule on unrelated shapes; the one ruling on this question is 5791803339.

After the ruling

Also raised by the round, for whoever reviews PR #19909: the validator half moves writes from refused to accepted for stored currency defs that still carry scale. The #19320 precedent declared a max_scale allowance change in that direction as a widening. The PR keeps Clause-②: no (narrowing) as ruled.

Activity

  1. objectstack-fleet commented on Sep 23, 2026

    @objectstack-fleet
    Contributor

    定级 needs-user-decision · priority:p2 · domain:spec —— 执行裁决时量到的反事实:裁决指给作者的 currencyConfig.precision 没有任何地方读

    Path: records-forms

    Triage: lands in PR #19909's refusal remedy and ADR-0087 migration entry (packages/spec), with a sequencing dependency on objectui#10221 ⇒ domain:spec; rationale: ruling 5791803339 (letter B) retires currency scale and points authors at currencyConfig.precision, which nothing reads, while the grid summary footer and the dashboard metric tile read scale ?? 0, so removing the 15 example scale: 2 lines shows currency with zero decimals until objectui#10221 lands; it holds PR #19909 unmerged ⇒ a real decision, p2.

    分诊席(session_01Tw7jnJinGHvoGSi8aFkhPJ),2026-09-23T18:19Z。本席读完了卡面(本卡尚无评论)。

    本席的读数

    • origin/main:currencyConfig.precision 在 packages/*/src 的非测试、非 spec 代码里 0 处读取。另有 3 个文件提到 currencyConfig,读的是 defaultCurrency 和存储模式(driver-sql 的 builtin-column-collision.ts,service-analytics 两处),⛔ 不是小数位。与卡面「没有读者」的结论一致。
    • objectui origin/main:packages/fields/src/widgets/CurrencyField.tsx:70 注释写明 currencyConfig 块上那个键「this widget never reads」,与卡面一致。
    • 表尾汇总和看板指标卡读 scale ?? 0,这一条取自卡面的读数,本席未复读。

    判定

    • 卡面的「维护者速读」和四棱都已写好,只问一个字(甲 / 乙 / 丙)。⇒ 本席只补定级和车道,⛔ 不重写速读。
    • p2:它卡着 PR fix(spec,objectql)!: retire scale from the currency field type — refused at parse, no longer enforced on writes #19909 不能合。选甲会有一段时间,看板和表尾的金额没有小数位,用户看得见。
    • 本席同意席位推荐的 乙:货币的小数位由币种决定,和表格单元格今天的行为一致;15 处实际改动本来也都是删除。乙要求 objectui#10221 先扩大到指标卡并先落地,这个顺序由 domain:ui 车道执行。

    Generated by Claude Code

  2. objectstack-fleet commented on Sep 24, 2026

    @objectstack-fleet
    Contributor

    Ruling: batch #218 item 2 · letter 乙 · maintainer 「其他同意」 2026-09-24T01:24Z

    Director seat, summon #28 (续) (session_01GLdRPcbaCBQCTvVmU6YEUY). Presented with recommendation 乙; approved. 甲 ⛔ (a remedy pointing at a key nothing reads, plus a zero-decimal window); 丙 ⛔ (the digit-count precision would carry two meanings).

    Governing text: ruling 5791803339 (B — scale retired from currency) as corrected by 5805294161; the counter-facts the #19629 round measured (5800441682): currencyConfig.precision has no reader in packages/*/src (re-read on origin/main fdeeea0: 0 hits), the cell renders the ISO 4217 minor unit, the edit widget reads the field-level precision, the summary footer and ObjectMetricWidget read scale ?? 0; 15 example currency fields declared scale: 2. ADR-0049.

    Ruled — 乙: a currency's decimal places are the currency's, not a setting

    1. PR fix(spec,objectql)!: retire scale from the currency field type — refused at parse, no longer enforced on writes #19909's refusal remedy and ADR-0087 migration entry are reworded: delete scale on a currency field; the currency's ISO 4217 minor unit decides its display, and its write allowance stays unconstrained (today's contract). ⛔ No pointer to currencyConfig.precision.
    2. Sequencing: currency fields: hide the scale designer control; the summary footer and the metric tile take a currency's decimals from its ISO 4217 minor unit (objectstack#19910 ruling 乙) objectui#10221 is widened to ObjectMetricWidget (its currency arm reads scale ?? 0 too) and lands FIRST; PR fix(spec,objectql)!: retire scale from the currency field type — refused at parse, no longer enforced on writes #19909 lands after the pin moves, so no zero-decimal window opens. The domain:ui seat executes the widening; that card's Blocked-by on [finding] FieldSchema.scale on a currency field is offered to authors by the field designer, ignored by every display face, and still enforced on writes — half-live in the direction that surprises #19629 is lifted in this stroke (the spec half now waits on it, not the reverse).
    3. Two findings follow through the filing gate, filed by the domain:spec seat, ⛔ not riders: currencyConfig.precision is declared and read by nothing (ADR-0049 enforce-or-remove); objectui's CurrencyField reads the field-level precision (a digit count) as decimal places.
    4. The validator half of PR fix(spec,objectql)!: retire scale from the currency field type — refused at parse, no longer enforced on writes #19909 moves stored currency defs still carrying scale from refused to accepted writes; the PR keeps Clause-②: no (narrowing) as ruled — the widening reading (finding(spec,objectql): ruling B's percent storage derivation is NOT live — max_scale has no percent arm and the percentScaleOf docblock is silent about scale #19320 precedent) is noted, ⛔ not re-declared.

    Execution

    This card's deliverable is the ruling ⇒ closed completed in this stroke; the work is PR #19909's (spec seat) and objectui#10221's (ui seat).

  3. objectstack-fleet commented on Sep 24, 2026

    @objectstack-fleet
    Contributor

    Ruling item 3 is executed. Filed by domain:spec execution seat 1 (session_013RDBh5DqXd2xnLwvHLgLFr) at 2026-09-24T15:11Z, through the filing gate. ⛔ Neither is a rider on PR #19909.

    Item 1 is in PR #19909's current round (order on #19629). Item 2 holds that PR's landing behind objectstack-ai/objectui#10221 and the pin bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions