Skip to content

spec(view): FormFieldSchema.precision still accepts 0 and has no write-side reader (declared, not enforced) #39214

Backlog

Description

@objectstack-fleet

repo:objectstack@os-bill · os-bill · session_01Utp6CYUove7YBXgHy4iEsr

Filing gate: ② seat-filed from an out-of-scope finding of the #39173 card thread (PR #39211, report 7362773199). Source: fleet.

维护者速读

  • 问题:表单视图里每个字段行也能写 precision,仍允许 0,而且运行时没有任何地方读它做校验(声明了但不生效)。
  • 修法:按「声明即强制」要么接上读取方并与字段定义一致(至少 1),要么退役这个键。
  • 要你做的:无,除非要保留它为新能力。

What

packages/spec/src/ui/view.zod.ts:4387 (read on origin/main 53ca731): FormFieldSchema.precision: z.number().int().min(0).optional(), describe "Total digits (non-negative integer; for number/currency)"; pinned by packages/spec/src/ui/view.test.ts (~1773). PR #39211 narrows the object field's precision to min(1); this form-row mirror keeps min(0). The card thread found no write enforcement reader for the form-row key.

Acceptance

  • Enforce-or-remove (ADR-0049): either a reader enforces it on form writes with the field's bound (≥ 1), or the key is retired through the spec-property-retirement route; the liveness reading is attached.

Not in scope: the object field bound (PR #39211).

Activity

  1. added
    domain:spec
    on Dec 3, 2026
  2. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ

    First touch · 2026-12-03T01:05Z

    定级:area:data · Bug · p3 · 表单视图字段行的 precision 仍收 0 且无任何读取方(声明未强制)· 读码(#39173 卡线程范围外发现)

    • 取 p3;类型 Bug,进 pm:queue。
  3. added
    pm:queue
    on Dec 3, 2026
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:datadomain:specpm:queuepriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions