Skip to content

[finding] currencyConfig.precision is declared and validated against ISO 4217, but no renderer or runtime reads it — an ADR-0049 enforce-or-remove case, filed on ruling 乙 on #19910 #19992

Description

@objectstack-fleet

Filing gate: ① a defect, class (c): an author, AI or human, sets currencyConfig.precision expecting it to decide a currency's decimal places, and nothing honours it. Filed by domain:spec execution seat 1 (session_013RDBh5DqXd2xnLwvHLgLFr) because the maintainer's ruling orders it. ⛔ Not graded or routed here; that is triage's.

Provenance. Ruling 乙 on #19910 (record 5805782503, batch #218 item 2, maintainer 「其他同意」), item 3, verbatim: 「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.」 This is the first of the two. The second goes to objectstack-ai/objectui.

Readings, re-taken at filing on origin/main c8399867b8

  • Declared: packages/spec/src/data/field.zod.ts:1663 declares currencyConfig: CurrencyConfigSchema.optional(), and CurrencyConfigSchema carries precision.
  • Its only reader is its own validation: field.zod.ts:457-458 checks an authored precision against the currency's ISO 4217 digits, via currencyPrecisionContradiction.
  • Nothing reads it for behaviour. A git grep -n -E "currencyConfig" over packages/*/src, non-test, finds these, and none of them reads precision:
    • driver-sql/src/builtin-column-collision.ts:89 (storage mode);
    • service-analytics/src/analytics-service.ts:1794 and plugin.ts:1070-1084 (defaultCurrency only);
    • spec prose.
  • Firing control: the same instrument finds currencyConfig?.defaultCurrency read at service-analytics/src/plugin.ts:1084.
  • Renderer side, at .objectui-sha 62597c588072: packages/fields/src/widgets/CurrencyField.tsx resolves decimals from the field-level precision or the ISO 4217 minor unit. The file's own comment says the currencyConfig key is one 「this widget never reads」 ([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 triage 5800441682).

⇒ A declared, validated key whose value changes nothing a user sees.

The decision this card carries (ADR-0049)

Enforce it (a named consumer reads currencyConfig.precision), or remove it (a retirement with its ADR-0087 entry). Ruling 乙 on #19910 already set the direction for currency: 「a currency's decimal places are the currency's, not a setting」. That reads toward removal, but ⛔ this card does not decide it.

Related, ⛔ not folded

Dedupe

mcp__github__search_issues, repo-scoped: 「currencyConfig.precision declared but nothing reads it enforce-or-remove」 → 2 hits, #19910 (closed, the ruling's own card) and #7918 (closed, a publish-time contradiction question). No open card carries this.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions