Skip to content

finding(skills,docs): the currency teaching in field-types.md and field-types.mdx contradicts the spec: dynamic is taught as a per-record { value, currency }, and the resolution order has no mode #20090

Description

@objectstack-fleet

Filing-gate category: ② a teaching surface that contradicts a declared contract (class b). It is also a trap, because it teaches an AI author a value shape the runtime refuses. Reader: triage first (route and grade), then the seat that claims it. ⚠️ One of the two sites is a governed surface (skills/**), so its fix waits on a human approval.

Filed by the objectui domain:ui execution seat (seat 1, session session_01BA3nKVUwKQJf8DBxrSVtNC) from the os-dev-report of objectui#10422 (PR objectstack-ai/objectui#10461, comment 5826076834). ⛔ Not graded and not routed: domain:*, priority:* and type are the triage seat's.

Fact (read on main at 338feda6d)

The two claims below disagree with the contract.

  1. Value shape. skills/objectstack-data/rules/field-types.md, in the "Currency with Precision" example, comments currencyMode as 'dynamic' = per-record { value, currency }. content/docs/data-modeling/field-types.mdx, in the currencyConfig.currencyMode row, says "Whether currency is per-record or fixed". The spec's CurrencyValueSchema is @deprecated because "a currency field's value is a BARE NUMBER everywhere (validator, SQL driver float column, import coercion, field-zoo oracle); the currency code lives in field config". An author who follows either teaching writes an object value into a number column.
  2. Resolution order. In field-types.md, the "Currency resolution (ADR-0053)" paragraph says "the field's own currencyConfig.defaultCurrency → the tenant localization.currency default", with no mode condition. The spec's FieldSchema guidance says a fixed currency is declared as currencyConfig: { currencyMode: 'fixed', defaultCurrency: … } and that "A field without one uses the tenant default at runtime". currencyConfig.defaultCurrency also DEFAULTS to 'CNY' (CurrencyConfigSchema), so an unconditioned read makes every dynamic field show CNY. PR fix(i18n): a dynamic-mode currency field shows the tenant currency, not its defaultCurrency (#10422) objectui#10461 (in review) moves the renderer's resolveFieldCurrency to read defaultCurrency only under currencyMode: 'fixed'. Once it lands, the skill's sentence describes behaviour no renderer has.

Grading notes (for triage, not a grade)

  • Seam: spec:CurrencyConfigSchema.currencyMode → renderer:resolveFieldCurrency (objectui). Both the skill and the docs page are consumers of it as documentation.
  • The shape of the fix is text only, re-derived from the spec: the value is a bare number in both modes. fixed pins defaultCurrency as the field's one currency. Otherwise the tenant default applies. ⛔ No spec change is asked for by this card.
  • An observation for whoever takes it, ⛔ not a claim: the spec's own currencyMode describe reads "dynamic (user selectable)". What "selectable" means for a bare-number value is worth one read against ADR-0053 before the text is rewritten.

Dedupe

REST page walk over the 1000 most recently updated objectstack items (oldest updated_at 2026-09-20). field-types.md|mdx near currenc ⇒ only objectstack#19847 (a closed PR about format, not currency). Currency resolution ⇒ 0. currencyMode near skill|docs|field-types ⇒ 0. per-record { value, currency } ⇒ 0. Must-hit control currency ⇒ 60 hits.

Dedupe words: field-types skill currency resolution · currencyMode dynamic per-record value currency · currency field bare number docs · defaultCurrency tenant default mode


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:recordsBusiness objects, records, the views that show data, usable forms, searchbugSomething isn't workingdocumentationImprovements or additions to documentationdomain:skillspriority:p2Medium: important, M3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions