Skip to content

spec(field): currencyMode: 'record' + currencyField — a record-mode amount points at a sibling ISO 4217 code field (multi-currency M0-1, epic #8345) #27184

Closed

Description

@objectstack-fleet

Blocked-by: #27157
Blocked-by: #27182
Blocked-by: #27183

Filing gate ③ (maintainer-directed). Ruling 6465431966 on #27119 (batch #421 item 2, Q1 = 乙-现在, maintainer 「同意立专题卡」 2026-10-28): the multi-currency epic resumes on #8345 in shape C′. Part of #8345. Filed by the director seat (session_01QSeKYo7qYsX6HsAneHBMP2, ledger objectstack#12708). ⛔ Not a claim. Workload row and precedents: 6464936321; design: 6464438764.

Ruling-ref: 6465431966

维护者速读

  • 改了什么: CurrencyConfigSchema 新增 record 模式与 currencyField 指针,指向同对象上带 valueDomain: 'iso_4217_currency' 的文本字段;对象级校验:存在、类型、值域;formula 的 returnType: currency 同形。
  • 为什么改: 平台今天没有任何键承载「这条记录是什么币种」;这是多币种的第一块。
  • 风险与回滚: 新增可选键(minor,Metadata-protocol: added);不写它的应用零变化。⛔ 不单独发版:R1 与 M0-2/3/4 同一次发布。
  • 先看: packages/spec/src/data/field.zod.ts CurrencyConfigSchema;object.zod.ts 的 superRefine 臂(先例 L1038 / L2706)。
  • 两分钟验证: currencyField 指向不存在 / 非文本 / 无值域的字段 ⇒ 三种拒收各带处方。
  • 需要您做的: 无(spec PR 非受管)。

Task

  • currencyMode: z.enum(['dynamic','fixed','record']); currencyField required under record, refused under the other modes.
  • Object-level superRefine: the target exists on the same object, is text, carries valueDomain: 'iso_4217_currency'; messages carry the prescription and list the candidate fields.
  • Describe / JSDoc / guidance; generated baselines, forms, packages/spec/docs; skills/** authoring guidance with the naming convention (currency_code, AMOUNT_home, AMOUNT_rate) — Skills-docs: updated here.
  • Pin tests: the three refusals; parse(parse(x)); dynamic and fixed outputs byte-identical to today.

Lane: spec · Size: M · Review: CONTRACT_REVIEW_TIER. Clause-②: yes (widening) · Metadata-protocol: added · Skills-docs: updated here.

Epic: #8345 (parent; the epic PM dispatches pm:epic children; domain:spec children go to the spec seat's queue). Dedupe: #8345 thread, #27119 (ruled), the workload list 6464936321; no open card carries this slice.

Activity

  1. objectstack-fleet commented on Oct 28, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 1 · 2026-10-28T12:51Z
    Session: session_01Utp6CbTZrFqRYNgjSaSbN5 (epic PM, epic:#8345)
    Account: os-bill
    Branch: claude/project-thread-0wmk7j (card thread session_01Utp6CbfVSc1hXtxLUPHZ2f; the platform assigns the thread's one push branch — the recorded platform exception)
    Worktree: objectstack-issue-27184
    Domain: domain:spec
    Seat: epic:#8345
    File surface: packages/spec/src/data/ (field, object), the formula currency return shape in packages/spec, generated baselines/forms and packages/spec/docs by tooling, skills/** authoring guidance (Tier H), .changeset/ (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: opus (TIER_DEFAULT build; dispatch-gates --tier: no path-derived mandate; the CONTRACT_REVIEW_TIER review is owed by surface and runs in another seat), effort: high
    Clause-②: yes (widening)
    Metadata-protocol: added
    Responsibility: n/a — not a defect card
    Thread-read: none
    Premise: holds
    Serial constraints cleared: no — develops AHEAD of its blockers by maintainer-authorised acceleration: #27157 (PR #27218), #27182 (PR #27233), #27183 (PR #27239) touch the same currency block. pm:blocked → pm:dispatched in this stroke; the Blocked-by: lines stay as merge order. The PR stays draft, brings main in after each lands, and gets its contract review only on the final head.
    Release pairing: R1 — ⛔ not released alone, pairs with #27186, #27187, #27188.
    Maintainer authority: Bill, project thread, 2026-10-28 「epic的卡你统一派」, 「你自主完成后续阶段」, and 「后续开发如何加速」 (the epic PM's answer: develop #27184 ahead, review once after the blockers land; audit 6467659191 on #8345).

  2. objectstack-fleet commented on Oct 28, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 27184,
      "status": "done",
      "branch": "claude/project-thread-0wmk7j",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/27268",
      "session": "session_01Utp6CbfVSc1hXtxLUPHZ2f",
      "premise_still_valid": true,
      "summary": "CurrencyConfigSchema gains currencyMode 'record' and an optional currencyField, required under record and refused under dynamic/fixed (config-level superRefine). ObjectSchema's superRefine gains refuseDishonestRecordCurrencyField: the pointer must name another declared text field carrying valueDomain 'iso_4217_currency'; three located refusals with prescription and candidate list; formula returnType currency meets the same doors. Form row + translations, generated docs/authorable surface, 13 dropped-refinement ledger sites, skills field-types guidance (paid by deletion in the same file), minor changeset. Built on origin/main 9ff8154c ahead of #27218/#27233/#27239; card assignee was set by the PM (os-bill), not touched here.",
      "tests": "head 5232c8b1: new src/data/currency-config-record-mode.test.ts 13/13 pass; pnpm --filter @objectstack/spec test: 745 files / 22324 tests, first run 1 failure (dropped-refinements header totals) fixed in 1d9a5331, re-run of that file 27/27; currency-mode-family-closure pin 6/6; spec typecheck exit 0; spec build exit 0 (VERDICT command-exit 0). No ablation: new behaviour, no changed tested behaviour.",
      "gates": "dispatch-gates --commands (repo objectstack-ai/objectstack): 112 derived; --ran reconciliation 112 run, 0 NOT-MEASURED. First pass (2537aff8): 102 exit 0, skills-token-ratchet exit 1 (fixed by deletion, now 3157/3158), 8 exit 3 PREREQUISITE (unbuilt packages, shallow clone) -> after turbo build of the closure (62 tasks) and unshallow all re-ran exit 0 except check:i18n exit 1 (7 bundles drifted) -> regenerated + translated -> exit 0; check:i18n-stale-fill exit 0; check:i18n-coverage exit 0. Final head 5232c8b1: ratchet, nul-bytes, doc-authoring, skill-refs, skill-examples, i18n-stale-fill, skill-identifier-liveness, changeset-no-major, empty-changeset, adr-0087-registration all exit 0; check:generated 14/14 up to date. PR check-runs: in_progress at report time (not waited on).",
      "dogfood_battery": "n/a — no ! in the PR title and Clause-② carries the (widening) arm",
      "mcp_calls": "4 — mcp__github__issue_read get, issue_read get_comments x2, pull_request_read get_files (#27218); all reads, no MCP write tool",
      "api_writes": "2 — fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/27268/assignees os-bill), post-stamped POST /repos/objectstack-ai/objectstack/issues/27184/comments (this report)",
      "open_questions": [],
      "out_of_scope_findings": [
        "class: c · reach: named producer — @objectstack/formula inferFormulaReturn (packages/formula/src/formula-return.ts currencyOf maps every non-fixed config to dynamic), so a formula over a record-mode amount is stamped returnType currency with no currencyConfig (tenant currency) instead of { currencyMode: 'record', currencyField }; reachable only once this PR lands · evidence: currencyOf returns { mode: 'dynamic' } for parsed.data.currencyMode !== 'fixed' · dedupe words: formula currency stamp record mode, inferFormulaReturn currencyOf, currency formula returnType record · needs an owner inside R1 (epic PM to place; outside this card's claimed file surface)",
        "carrier: #27218 — merge overlap on CurrencyConfigSchema (second superRefine, CNY default removal, the same 12 currencyConfig ledger sites); this PR's byte-identical pins move with it when main is brought in · noted, not filed",
        "carrier: none — env: node-gyp header download from nodejs.org stalls through the proxy (better-sqlite3 install hangs); worked around with npm_config_nodedir=/opt/node22 · noted, not filed"
      ]
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:recordsBusiness objects, records, the views that show data, usable forms, searchdomain:specenhancementNew feature or requestpm:epicpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions