Skip to content

spec: a field a person changes only through actions — read-only on every UI surface, still writable by the API, import and action writes, judged by validations #36806

Done
3 of 3 issues completed

Description

@objectstack-fleet

repo:hotcrm#1 · huangyiirene · session_01J8VVAmQQaqVXpJepCqm4Xa

Filing gate: ③ · Source: maintainer — her answer in the hotcrm project thread on 2026-11-24 to the seat's question 「订单状态做不成只读,#2716 先上三个按钮吗?」, choosing 「先上按钮,只读等平台」 (ship the three actions now; the read-only half waits for a platform capability, filed here). Ruling recorded on objectstack-ai/hotcrm#2716.
Grade: area:data · Feature · p2 (inherits the p2 of the hotcrm card it blocks part of) · reach: measured on @objectstack 18.6.0 by the hotcrm lane (report objectstack-ai/hotcrm#2716 comment 7101256352) · evidence measured.
Reader: whichever seat triages domain:spec / area:data; on landing, the hotcrm seat adds the read-only line to the sales order (hotcrm#2716's remaining half).
Dedupe: searched readonly field action writable, readonlyWhen drops action write, field editable only through action, ui readonly field api writable (24 hits incl. closed). Nearest: #35068 (closed; taught "gated action + field lock", see below), #35403 (closed; owner_id read-only on the default form, a built-in special case, not an authorable key), #32666 (closed; flow writing a readonly field). None asks for this key.

维护者速读

  • 用户能看到什么变化:作者可以把一个字段(比如订单状态)标成「界面只读」,表单、行内编辑、看板拖拽、高亮条都不能改,只能点「确认订单」这类按钮改;接口和导入照常能写,仍由校验规则(状态机)把关。
  • 为什么做:业务对象的状态普遍应该只经按钮流转(Salesforce Activate、Odoo/SAP Confirm),今天的 readonly 会连按钮、接口、导入的写入一起静默丢掉。
  • 出错会怎样:漏掉某个界面入口,用户仍能直接改状态(数据仍由状态机兜底,不会错);回滚即去掉这个键。
  • 要你做什么:无,已由你在 hotcrm 线程里选定。

What happens today (18.6.0, read again on main 4c93f88)

Asked

A field-level authoring key (name is the spec owner's call; for example editable: 'actions' or uiReadonly: true) meaning:

  1. Every console surface treats the field as read-only: create and edit dialogs, the record page's inline edit, the highlight-strip chip, grid inline edit, kanban drag between columns grouped by this field, bulk edit.
  2. Write paths keep it: REST create/update, import, declarative and script action writes, flows. Each write is judged by the object's validations (a state_machine rule included), exactly as an ordinary field.
  3. Optional, the spec owner's call: whether an insert may set it, or only its defaultValue applies on create from the UI.
  4. objectstack validate refuses it together with readonly: true (contradictory), and the field describe and the data skill say when to use which.

Done when

On a test object with a state_machine rule on status and the new key: the console offers no way to edit status (all surfaces in 1.); a declarative update action, a PATCH and an import update each change it when the machine allows and are refused with the machine's message when it does not; describe_object (MCP) reports the field as not UI-editable.

Blocks part of: objectstack-ai/hotcrm#2716 (Status read-only on the sales order).

Sub-issues

Sub-issues

3 of 3 Issues completed
Loading 3 sub-issues

Activity

  1. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbcAmwZGHVnPE8xJwr

    Decision analysis · 2026-11-26T00:52Z · readings at origin/main d558de0 (re-checked this act; the area's readings at b8c8c88 still hold)

    维护者速读

    • 问题:订单状态这类字段,业务上只该通过「确认订单」按钮流转。今天把它标成只读,按钮、接口、导入的写入会被一起静默丢掉;hotcrm 的销售订单只读半边因此等着平台。
    • 选项:A 新增一个「界面只读」开关,表单、行内编辑、看板拖拽、高亮条都不能改,按钮、接口、导入照常能写并由状态机把关,界面新建时只用默认值,约 1–2 个 PR;B 把这个意思塞进现有「可编辑」一词,但那个词已经是权限授予的用语,会把「界面不能改」和「允许写」混成一个词;C 给现有的只读键加一个「仅界面」取值,但引擎今天看到只读为真就丢写入,正好与所求相反;D 不加键,hotcrm 继续等。
    • 推荐 A:它和现有只读键并排成一对,「只读」管所有写入门,「界面只读」只管人手改,作者一眼分得清,其它主流平台(Salesforce 页面布局只读 vs 字段安全只读)也是这么分的。
    • 不定会怎样:hotcrm 销售订单的状态仍能在表单里直接改,只靠状态机兜底;卡在决策箱,区域不开工。

    Analysis

    Background

    readonly: true on a field is a server boundary: every non-system write is stripped on INSERT and UPDATE (packages/spec/src/data/field.zod.ts:3047; strip at packages/objectql/src/validation/rule-validator.ts:2260, if (!def?.readonly && !runtimeOwned) continue;). The hotcrm sales order needs the opposite split for status: no console surface edits it, but a declarative action, a PATCH and an import update may change it and the state_machine rule judges them. The maintainer chose 「先上按钮,只读等平台」 on hotcrm#2716 (2026-11-24); this card is the platform half. The area released the claim before code because the card leaves the key's name to the spec owner and no same-concept key exists (git grep -nE "uiReadonly|editable: *'actions'|readonlyInUi|actionOnly" → 0 hits).

    History worth knowing: ADR-0092 (2026-09) recorded readonly as "a UI hint, not a server boundary" and named that as the ADR-0049 hole; the readonly strip (#2957, then #34752/#35089 for roll-ups) closed it. So the plain word readonly was deliberately promoted to the strong meaning. A UI-only lock is a second, distinct fact about a field, and it must not reuse the word that was just hardened.

    Governing text

    • ADR-0049 (enforce-or-remove): a declared key is enforced on every surface it names — the new key must bind every console surface the card lists, or not exist.
    • ADR-0085 §2 admission test for future keys: a key binds the object across surfaces; "if the honest name for the key contains a page name, it fails." ui names a channel (the console as a whole), not a page; every listed surface is bound. Passes, and it is the closest call in this analysis.
    • packages/spec/src/data/field.zod.ts:3047 (readonly describe): "server-enforced on BOTH write paths … symmetric with readonlyWhen". A 'ui' value would contradict this describe.
    • packages/spec/src/security/permission.zod.ts:1126–1127: editable is the permission-set field grant ("may write"), served per caller at packages/spec/src/api/auth.zod.ts:193. The word is taken, with the opposite meaning.
    • Precedent for a boolean UI-intent key with a contradiction refusal: showOnCreate (field.zod.ts:3012, refusal at :3341 beside required: true, landed feat(spec): a field can say it is not asked for when a record is created (showOnCreate) #36449).
    • Prior rulings: check-prior-rulings --card 36806 --terms readonly,uiReadonly,editable,readonlyWhen → 14 ADR hits, none rules on a UI-only read-only key (they rule on master-detail refusals of a readonly master, FLS editable bits, roll-up write guards); 0 ruling comments on this thread.

    Protocol declaration

    Adds one authorable field key (Clause-② yes, Metadata-protocol: added). No change to readonly, readonlyWhen, or the permission grant.

    Premises (each with its re-check)

    1. No same-concept key exists in spec or any producer. git grep -nE "uiReadonly|readonlyInUi|actionOnly|editable: *'actions'" -- packages examples ui → 0 hits (re-checked d558de0).
    2. The engine strips on a truthy readonly, so a string value would be stripped on every write. git grep -n "readonly && !runtimeOwned" -- packages/objectql/src/validation/rule-validator.ts → :2260.
    3. editable already means the permission-set write grant. git grep -n "write: 'editable'" -- packages/spec/src/security/permission.zod.ts → :1126.
    4. The console already has a single read-only verdict path the new key can join: ui/packages/core/src/evaluator/fieldRules.ts:503 (statics.readonly === true || readonlyWhen), plus the direct def.readonly reads the area listed (plugin-form autoLayout.ts:290/:329, sanitize.ts:202; plugin-detail DetailSection.tsx:651, InlineEditSaveBar.tsx:422; HeaderHighlight.tsx:227; plugin-grid inline-edit-options.ts:59). git grep -nE "readonly === true|def\.readonly|\.readonly\b" -- ui/packages | wc -l.
    5. Kanban drag reads no field read-only flag today (ui/packages/plugin-kanban/src/ObjectKanban.tsx ~2084, object grant only) — a static readonly groupBy field is draggable and the PATCH is silently stripped. git grep -n "readonly" -- ui/packages/plugin-kanban/src/ObjectKanban.tsx → 1 hit, the TypeScript readonly array modifier at :495, no field flag read. Fixed for both keys by the same read.

    The question

    What is the name and shape of the field key meaning "every console surface treats it as read-only; API, import, action and flow writes keep it and are judged by validations", and (card item 3) may a console create set it?

    Options × real cost × workload

    What What the customer sees Workload (lane · PRs · measured precedent)
    A uiReadonly: boolean (default false). Console surfaces (create/edit dialogs, record-page inline edit, highlight chip, grid inline edit, kanban drag, calendar drag) read readonly === true || uiReadonly === true through one @object-ui/core helper; the engine never reads it; objectstack validate refuses it beside readonly: true; MCP describe_object reports it as its own field. Item 3: a console create omits the field and the server applies defaultValue, exactly as readonly is treated by the console today; API/import/action inserts may set it, judged by the state machine's initial states. Status cannot be typed anywhere in the console; the Confirm button, API and import change it under the state machine. area o5-D (domain:spec + ui) · 1 PR, or 2 if the console half is split · spec half precedent #36449 showOnCreate +160/−2, 13 files; console half: ~10 read sites swap to one helper, no exact precedent (#36543 +1688/−2775 is the internal-forms removal and overstates it).
    B editable: 'actions' on the field. Same behaviour, but the word editable now means "may write" on a permission set and "UI cannot write" on a field; and the value lies, since API, import and flows also write it. Same as A plus a permanent terminology collision; not costed further.
    C Widen readonly to boolean | 'ui'. Until every !def.readonly site in the engine and console is rewritten, 'ui' is truthy and is stripped on every write — the opposite of the ask; a shape change on a shipped, server-enforced key; the describe at :3047 becomes false. spec + objectql + ui · ≥2 PRs · breaking changeset; the readonly-strip family #34752 +536/−8 shows the engine side alone is not small.
    D No key. Authors use readonly: true plus a script action (system context keeps the write). The button works; API and import writes to status are still silently dropped, so the hotcrm sales order cannot be driven by integrations or imports. Does not meet the card or the maintainer's hotcrm choice. 0 PRs; hotcrm#2716's read-only half stays open.

    Naming variants of A considered and not taken: readonlyInUi (same meaning, reads worse beside readonlyWhen), lockedInUi / userEditable: false (introduce a second vocabulary for "read-only"), an enum such as changedBy: 'actions' (open-ended values nobody asked for, and dishonest for API/import writes). Item 3 variant not taken: "editable on create, locked afterwards" is a different concept (set-once) with no asker; showOnCreate already covers the opposite intent.

    Business translation

    • A: the field gets a "page layout read-only" switch next to the existing "field-level security read-only" switch — Salesforce's two-tier model (layout read-only lets the API write; FLS read-only blocks it); Odoo's and ServiceNow's field readonly is the UI-only tier.
    • B: labelling the switch with the permission team's word for "allowed to write".
    • C: giving the FLS switch a third position that today's wiring reads as "on".
    • D: telling customers to drive order status only from inside the app.

    Four axes

    ① Long-term fit (≥50%). In two years a field carries two independent write facts: whether a person may change it by hand in the console, and whether any non-system write may change it at all. The mainstream model is exactly this pair (Salesforce page-layout read-only vs field-level security read-only). A keeps the strong fact on the plain word readonly, which the platform deliberately hardened (ADR-0092 → readonly strip), and adds the weak fact under a name that says its scope. It passes ADR-0085 §2 (binds every surface, names a channel, not a page), and it shrinks special cases: the console gets one helper for both keys and the kanban gap is closed on the way. B widens the meaning of a permission word; C changes the shape of a shipped server-enforced key; D leaves the platform without a way to model the most common lifecycle pattern (status flows through actions). A is the only option that is a terminal state.

    ② Real business pull. Measured: hotcrm#2716 (sales order status, maintainer-chosen 2026-11-24), measurement comment 7101256352 on 18.6.0 shows the action, PATCH and import writes all dropped with reason=readonly. The hotcrm lane adds the read-only line the day this lands. One asker, one field — but it is the generic lifecycle pattern (Salesforce Activate, Odoo/SAP Confirm), not a hotcrm-only shape.

    ③ AI-authoring error resistance. A is a closed boolean beside a boolean of the same family; the describe states the one difference (writes keep it) and objectstack validate refuses it beside readonly: true at every parse door (loud, at author time, the showOnCreate + required precedent). An AI that picks the wrong key sees one of two loud outcomes: readonly drops its own action write with a dropped-fields header, or validate refuses the contradiction. B makes the same word mean "may write" and "cannot write" depending on where it sits — an AI will write editable: true on a field expecting a grant. C fails silently: an author writes readonly: 'ui', the UI locks, and the action write is stripped with reason=readonly, which is the exact failure the card is filed about. D teaches a workaround (script action for system context) that still drops API and import writes silently.

    ④ Startup focus. One key, no per-row variant (no uiReadonlyWhen now; readonlyWhen already strips and nobody asked), no new gate (the refusal rides the existing field superRefine, not a new lint). Item 3 takes the zero-mechanism answer (the console treats it as readonly already does). The pull is measured and maintainer-chosen, so this is not speculative surface; declining (D) does not remove a key, it leaves a measured need unmet.

    os-decision-facets
    ① Long-term fit: A completes the readonly pair (UI-only vs server-enforced) under distinct names; shrinks special cases — one console helper for both keys, kanban gap closed with it; no alignment debt.
    ② Business pull: measured — hotcrm#2716 sales order status, maintainer-chosen; action, PATCH and import writes all dropped today (reason=readonly).
    ③ AI error resistance: closed boolean, contradiction refused loudly at validate beside readonly: true; the rejected spellings fail silently (C) or collide a permission word (B).
    ④ Startup focus: one key, no per-row variant, no new gate; item 3 reuses the console's existing readonly treatment.
    Prior rulings read: readonly,uireadonly,editable,readonlywhen → 14 hits; none on a UI-only lock (ADR-0055 §1, ADR-0092 D1/D4, ADR-0099 D2, ADR-0106 D1 rule adjacent facts); thread: none; repo: objectstack-ai/objectstack

    Recommendation

    A — uiReadonly: boolean, with item 3 = a console create applies only defaultValue. Terminal state: a field declares readonly (nobody but the system writes it) or uiReadonly (no person types it; declared writes change it under validations), never both; the console asks one helper; describe_object tells an agent both facts separately.

    Not B: the permission grant owns editable, and the value would misdescribe API/import writes. Not C: truthy strip makes 'ui' do the opposite until the whole tree is rewritten, on a shipped key. Not D: leaves the measured need unmet and teaches a silent-drop workaround.

    Confidence gaps: (i) hotcrm#2716's ruling comment was not readable from this session (403; the card's quotation of the maintainer's choice is the source); (ii) the exact count of console read sites is the area's reading at b8c8c88, re-grep at code time; (iii) ADR-0085 §2 is the closest call — ui as a channel name; if the maintainer reads "ui" as a surface name, the honest alternative is readonlyInUi, same shape and behaviour.

    Self-check: 只看①选 A;②③④ 是否翻转:否。Workload between A and the alternatives differs by less than 3×, so it does not bear on the letter.

    Post-ruling execution

    On the maintainer's answer this thread records Ruled: on the card and tells area o5-D; o5-D re-claims and the card thread builds on claude/project-thread-zjehmt from b8c8c889. Build order: (1) spec key + describe + superRefine refusal beside readonly: true + liveness ledger row + generated artefacts + MCP describe_object field; (2) @object-ui/core helper isFieldUiReadonly(def) and the console surfaces swap to it (plugin-form, plugin-detail, highlight chip, plugin-grid, kanban drag, calendar drag); import mapping and studio reads stay on raw readonly; (3) pin tests: write-keeps (no x-objectstack-dropped-fields on PATCH), state-machine refusal message surfaces, console surfaces locked, validate refusal; (4) Skills-docs: follow-up for the data skill text (when to use which key) under the weekly skills card. One PR if the overlap check with #37314/#37366 on field.zod.ts allows, else spec first.

    Related

    hotcrm#2716 (blocks part of) · #35068 (closed, script action keeps the write) · #35403 (closed, owner_id built-in special case) · #32666 (closed, flow writing a readonly field) · #36425 / #36449 (showOnCreate precedent) · #34752, #35089 (readonly strip family) · open PRs #37314, #37366 touch field.zod.ts.

  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbcAmwZGHVnPE8xJwr

    Ruled: A — uiReadonly: boolean, extended to the long-term two-tier field-lock model · 2026-11-26T02:06Z

    维护者速读

    Ruling record

    Maintainer's words (decision thread 「裁决 #36806 只读字段命名」, 2026-11-26): tapped option A 「新增 uiReadonly 布尔键」 on the decision card at 2026-11-26T01:59Z, and wrote 「按长远模型」 at 2026-11-26T01:59Z after 「我说的合理的方案是从元数据应用实际可能发生的业务需求角度出发,不等卡」 and 「考虑长远合理的方案」. Analysis: comment 7179210173 on this card; the extension beyond that comment's option A was discussed and accepted in the thread.

    Governing text: ADR-0049 (a declared key is enforced on every surface it names); ADR-0085 §2 (admission test: binds every surface, names no page — ui names the console as a channel); packages/spec/src/data/field.zod.ts:3047 (readonly is server-enforced on both write paths; unchanged); packages/spec/src/security/permission.zod.ts:1126 (editable is the permission grant; not reused); ADR-0092 (history: readonly promoted from a UI hint to a server boundary — the reason the hand lock needs its own name).

    Freshness gate: no comment on this card after the analysis (7179210173); body last edited before it. Premises of the analysis re-checked at origin/main d558de0 this act (0 same-concept keys; strip at rule-validator.ts:2260 keys on def.readonly; readonlyWhen strip is update-path only, engine-insert.ts:1353). Blocked-by: none on this card.

    The model (ruled whole, landed in phases)

    Server lock — no client may write Hand lock — no person edits by hand; API, import, actions and flows write, judged by validations
    Always readonly (exists) uiReadonly (this card)
    Conditional (CEL over record) readonlyWhen (exists; P\true`= set once on create — the RAPreadonly:update/ ODataCore.Immutable` shape; no new key) uiReadonlyWhen (this card)

    Two levels: field and object. The object-level uiReadonlyWhen (#37402) hand-locks the whole record when TRUE; a field's own uiReadonly / uiReadonlyWhen wins over the object's default (uiReadonlyWhen: P\false`keeps a field editable inside a locked record). An object-levelreadonlyWhen` is the symmetric completion the model allows later; not filed.

    "By hand" = create/edit dialogs (and the submitted payload), record-page inline edit, highlight-strip chip, grid inline edit and multi-row save, kanban drag, calendar drag, duplicating a record from the console, and an in-app assistant acting for a person. Not by hand = REST create/update, import (including the console import wizard's mapping), declarative and script actions, flows.

    Naming rule (cite this ruling): a ui-prefixed twin of a key is admitted only where the console's and the server's answers to the same question legitimately differ. Read-only is the only such concept today: visibility has one tier (the server side is permission masking, requiredPermissions / FLS readable, a different key) and required-ness has one tier (the server; the console mirrors requiredWhen for feedback). uiVisibleWhen and uiRequiredWhen are refused by this rule.

    This card's scope (phase 1, area o5-D re-claims)

    1. packages/spec/src/data/field.zod.ts: uiReadonly: boolean (default false) and uiReadonlyWhen (CEL predicate, same scope as readonlyWhen). Describes state: every console surface read-only by hand; API/import/action/flow writes keep it, judged by validations (a state_machine rule included); a console create omits the field and the server applies defaultValue (card item 3, ruled); API/import/action inserts may set it, judged by the machine's initial states.
    2. Contradiction: uiReadonly: true beside readonly: true refused in the field superRefine (the showOnCreate + required precedent, field.zod.ts:3341), path ['uiReadonly']; uiReadonlyWhen beside readonlyWhen is allowed (the server lock is the stricter one), the describe says so. No new gate.
    3. Console: one helper in @object-ui/core answers "is this field read-only by hand now" = readonly === true || readonlyWhen TRUE || uiReadonly === true || uiReadonlyWhen TRUE (the predicate halves through fieldRules); every hand surface listed above swaps its direct readonly read for it. Kanban drag gains the read it lacks today (side finding: ObjectKanban.tsx ~2084 reads no field lock, so a static readonly groupBy field is draggable and its PATCH silently stripped) — fixed for both keys. Import mapping (importTargetFields.ts) and studio/designer reads stay on raw readonly. Duplicating a record rides spec: an object declares when a whole record is read-only by hand (object-level uiReadonlyWhen), fields override it, and duplicating a record takes the locked fields' defaults #37402.
    4. MCP describe_object (packages/runtime/src/domains/mcp.ts describeServedObject): both keys reported as their own fields, not folded into readonly; tool description names them.
    5. Engine: no change; packages/objectql never reads either key. Pin tests: PATCH to a uiReadonly field carries no x-objectstack-dropped-fields; the state machine's refusal message surfaces on the PATCH, the import and the action; validate refuses the contradiction; each hand surface is locked.
    6. Clause-②: yes, Metadata-protocol: added, Skills-docs: follow-up #37405 (the data skill section and the ADR land there, Tier H).

    Build order inside the card: spec → helper → surfaces → MCP → tests; one PR, or spec-first if the field.zod.ts overlap with #37314 / #37366 forces it (area-lease overlap check before each push). Resume-from: claude/project-thread-zjehmt@b8c8c889.

    Filed by this ruling

    State transition (same stroke)

    needs-user-decision → pm:queue; assignee none; area o5-D re-claims under its standing area order (the maintainer, 2026-11-25T23:33Z: 「开一个专区,接 data 的 p1 p2」).

  3. added
    pm:queue
    and removed
    needs-user-decision
    on Nov 26, 2026
  4. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

    Claim: area o5-D round 2 · 2026-11-26T02:07Z · area:data p2, re-claimed after the maintainer's ruling (ruling record 7180466652: option A 「新增 uiReadonly 布尔键」 + 「按长远模型」; area order 「开一个专区 ,接 data 的 p1 p2」, 2026-11-25T23:33Z)
    Area: o5-D
    Session: session_01Utp6CbdHk3orAeensH6EzS
    Thread session: session_01Utp6CXSuJCALDHFWaV6Bv5
    Account: os-bill
    Branch: claude/project-thread-zjehmt
    Worktree: the card thread's own checkout
    Domain: domain:spec
    Seat: repo:objectstack#5
    File surface: packages/spec/src/data/field.zod.ts (uiReadonly, uiReadonlyWhen, describes, the uiReadonly + readonly refusal) and spec generated artefacts via their generators plus the liveness ledger rows; one helper in ui/packages/core/** and every hand surface the ruling lists under ui/packages/** (create/edit dialogs + payload sanitize, record-page inline edit, highlight-strip chip, grid inline edit + multi-row save, kanban drag, calendar drag); packages/runtime/src/domains/mcp.ts (describeServedObject + tool description); tests named for the card; root .changeset/. ⛔ packages/objectql/** (engine untouched), ⛔ import mapping (importTargetFields.ts) and studio/designer reads, ⛔ record duplicate (#37402), ⛔ skills/** and docs/adr/** (#37405). Stop on breach and report.
    Container & model: L, mode:thread, model: default (dispatch-gates --tier: "no path-derived mandate"), effort: high
    Clause-②: yes
    Metadata-protocol: added
    Skills-docs: follow-up #37405
    Responsibility: n/a — not a defect card (Feature, ruled)
    Thread-read: 7180466652
    Premise: holds — re-checked by the ruling at origin/main d558de0 (0 same-concept keys; the strip at rule-validator.ts ~2260 keys on def.readonly; readonlyWhen strip is update-path only, engine-insert.ts ~1353).
    Pre-claim lane: packages/spec/** → domain:spec; ui/** and packages/runtime surfaces stay in this lane per area-lease 留道 (the ruling settles the key).
    Pre-claim deps: none (Blocked-by: none). Hot files: open PRs #37314 and #37366 touch field.zod.ts; overlap-check before each push; spec-first split allowed by the ruling if the overlap forces it.
    Prior rulings read: 7180466652 (this card; scope 1–6 and the naming rule, binding), analysis 7179210173; ADR-0049, ADR-0085 §2, ADR-0092 as the ruling cites.
    Serial constraints cleared: #37314, #37366 (field.zod.ts); ui surfaces re-scanned by the thread before its first push.
    Resume-from: claude/project-thread-zjehmt@b8c8c889
    Scope: ruling scope items 1–6. Fixes #36806.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 26, 2026
  6. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

    Claim amendment to comment 7180490513 (area o5-D) · 2026-11-26T02:18Z
    File surface (adds): packages/spec/src/data/inline-grid-columns.ts (deriveInlineGridColumns skips uiReadonly: true as it skips readonly) and ui/packages/plugin-form/src/**/deriveMasterDetail.ts (passes uiReadonlyWhen beside readonlyWhen). Reason: the master-detail dialog's inline line-item grid is a hand surface under ruling 7180466652 ("every hand surface"); without it a uiReadonly child field draws an editable cell.

  7. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

    Claim amendment to comment 7180490513 (area o5-D) · 2026-11-26T03:06Z
    File surface (adds):

  8. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

    Claim amendment to comment 7180490513 (area o5-D) · 2026-11-26T03:52Z
    File surface (adds): packages/spec/src/data/field.form.ts (offer uiReadonly and uiReadonlyWhen beside readonly / readonlyWhen; uiReadonlyWhen as type: 'code', language: 'expression', as readonlyWhen); the 11 metadata-forms locale packs packages/platform-objects/src/apps/translations/*.metadata-forms.generated.ts through their generator only (⛔ no hand edits to generated files); the row-count pin that counts field-form rows (e.g. object-lifecycle-panel-echo-decisions.test.ts), moved only by what this change moves.
    Reason: metadata-form-zod-reconciliation.test.ts refuses a key the Zod accepts and the form does not offer. The area picks offering the rows over a ledger entry: a key an author can declare only in source or over the API is a gap the next card would have to close, and the long-term answer costs one form row each now (maintainer standing guidance on #36806: design for the realistic long-term need, don't defer obvious sibling needs).
    Fences unchanged otherwise. Overlap-check each added file before the push.

  9. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

    Claim amendment to comment 7180490513 (area o5-D) · 2026-11-26T03:58Z · clarifies amendment 3
    The metadata-forms locale packs take in-place edits of the NEW leaf string values only (label and helpText for uiReadonly and uiReadonlyWhen, every locale), as the files' own header directs ("Edit translations in place … only the leaf string values"), followed by a generator re-run that drops the fill hashes; the same route #36425 took for showOnCreate. ⛔ No structural edit, no other leaf. Reason: the catalog pins (field-panel-echo-decisions.test.ts, object-lifecycle-panel-echo-decisions.test.ts) refuse unauthored English fills.

  10. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS
    os-dev-report

    {
      "issue": 36806,
      "status": "done",
      "branch": "claude/project-thread-zjehmt",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37436",
      "session": "session_01Utp6CXSuJCALDHFWaV6Bv5 (card thread; area session_01Utp6CbdHk3orAeensH6EzS)",
      "premise_still_valid": true,
      "summary": "Ruling 7180466652 scope 1-6 at head 62c400a2 (55+ files, +1.6k lines). Spec: Field.uiReadonly / uiReadonlyWhen (optional, no default), refusal of uiReadonly beside readonly at ['uiReadonly'], line-item column skip, liveness rows, regenerated artifacts, Studio field form rows translated in all 11 locale packs (amends 3/4). Console: one verdict in @object-ui/core (fieldReadOnlyByHand / fieldStaticallyReadOnlyByHand) read by dialogs + payload, record inline edit + stage path, highlight chip, grid inline edit + multi-row save, kanban drag (new lock read; also fixes a readonly lane field being draggable with a silently stripped PATCH), calendar drag, line-item grid. MCP describe_object (HTTP + stdio) reports both keys as their own fields; engine untouched.",
      "tests": "New pins all pass: spec field-ui-readonly (5), dogfood ui-readonly-hand-lock-36806 (6: PATCH lands with no X-ObjectStack-Dropped-Fields, readonly sibling stripped as control; state_machine refusal 400 VALIDATION_FAILED + machine message on PATCH, action and import; create lands on defaultValue; initialStates refusal), runtime MCP (3), mcp stdio block, ui core (6), dialogs (2), record page (2), grid (4), kanban (4), calendar (5), line-item grid (2+1). Package suites: spec 28,424 passed after the form rows; runtime 12,030; mcp 1,512; driver-sql 4,551; metadata-core 1,061; metadata-protocol 23,435; platform-objects 2,161; ui core 4,797, types 10,512, fields 5,033, plugin-form 2,795, plugin-detail 3,970, plugin-grid 2,794, plugin-kanban 585, plugin-calendar 515 (components and app-shell: CI Test UI shards green). Typechecks green: spec, runtime (+test typecheck), mcp, dogfood, metadata-core, driver-sql, type-check in 10 ui packages. Ablation 1 (ablation-replace): fieldStaticallyReadOnlyByHand without uiReadonly -> 8 pins red (kanban, calendar x2, record page x2, dialogs x2, grid); restored blob == HEAD. Ablation 2: rule-validator strip also stripping uiReadonly, objectql built (JS emitted, DTS failed on the type), dist preflight marker in 4 files -> 4 dogfood pins red; restored, rebuilt, preflight --absent clean, tree clean.",
      "gates": "dispatch-gates --commands: all 124 derived commands run locally. Fixed in this PR: driver-sql builtin-column-collision, metadata-core object-schema-fls-references, metadata-protocol meta-types count (amend 7181406682), spec metadata-form-zod-reconciliation (form rows, amends 3/4), platform-objects count pin 837->839. Non-diff reds: (1) check-plugin-teardown-shape --self-test exit 3: shallow clone cannot reach pinned fixture commit 621a4876; an environment fact, red on main in this container too. (2) check:platform-checklist exit 1: ABSENT SYMBOL FlowItemMoreMenu in docs/qa/platform-checklist/areas/automation.json; neither file differs between base b8c8c889 and main 7d50dc8b and the symbol is only in a comment there, so red on main too. (3) check:dual-build-cjs-loads exit 3: prerequisite not met (unbuilt dist), nothing measured on either. (4) spec check:skill-examples exit 3 was a prerequisite miss (client-react unbuilt); after building it, exit 0. i18n: check:i18n and check:i18n-stale-fill exit 0. CI on 62c400a2: 61 success, 9 skipped, 0 failed (Lint & Repo Gates, Type Check UI, Test UI 1-16/16, Test Core 1-10/10, Build & E2E UI all success).",
      "dogfood_battery": "n/a: no ! in the PR title and Clause-2 is yes without a (narrowing) arm",
      "mcp_calls": "1: subscribe_pr_activity (claude-code-remote); no GitHub MCP writes",
      "api_writes": "2 relay strokes: pr_create (#37436, assignee os-bill) and this os-dev-report comment; plus git push",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none, noted: lint CEL authoring check for uiReadonlyWhen (packages/lint) not added",
        "carrier: none, noted: kanban swimlane-field drag does not read the hand lock",
        "carrier: none, noted: docs-drift bot lists 11 hand-written pages naming FieldSchema; none documents readonly semantics needing uiReadonly beyond the generated field reference, which is regenerated here",
        "carrier: #37405: skills pages for uiReadonly / uiReadonlyWhen"
      ],
      "deviations": [
        "First push of the WIP branch happened before overlap-check (clean afterwards); head 62c400a2 was pushed before reading an overlap verdict against #37422 (count-line arithmetic in object-lifecycle-panel-echo-decisions.test.ts, Acceptance note in PR); push now gated on the overlap-check exit.",
        "uiReadonly is .optional(), not .default(false).",
        "No 1280x800 zh-CN screenshots: no example app declares either key and adding one is outside the surface; surface behaviour pinned by UI tests and ablated.",
        "Ablation 2 mutated packages/objectql temporarily (trap-restored, rebuilt, tree clean); nothing in packages/objectql is in the diff.",
        "PR carries assignee os-bill per the claim's Account line (os-dev rule 2)."
      ]
    }

    read 2026-11-26T05:29Z · head 62c400a

  11. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

    Claim amendment to comment 7180490513 (area o5-D) · 2026-11-26T05:43Z · on L1 REWORK 7183712080 and contract record 7183704697
    File surface (adds): packages/lint/src/validate-expressions.ts (+ its test) so os validate checks uiReadonlyWhen as it checks readonlyWhen (S2's lint slot rides this PR); the operand read-before-verdict for kanban and calendar beside the grid's (S1).
    Carried out of this PR: Gantt drag and in-place edit, timesheet cell write, kanban swimlane drag, the in-app assistant acting for a person, and palettePrefillField (N3) → #37448 (filed now under this card). Until it lands, the uiReadonly describe and the describe_object text name the surfaces that honour it (S3).

  12. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

    Claim amendment to comment 7180490513 (area o5-D) · 2026-11-26T11:02Z · on the merge-queue dequeue of PR #37436 at 10:59Z
    File surface (adds): packages/qa/dogfood/test/expression-conformance.ledger.ts, a row of its own classifying data/field.zod.ts:FieldSchema.uiReadonlyWhen (ADR-0060). Merge-queue run 45802787226, job "Dogfood Regression Gate (3/3)", failed expression-conformance.test.ts with "UNCLASSIFIED surface — add a ledger row (ADR-0060): data/field.zod.ts:FieldSchema.uiReadonlyWhen". The PR-side CI does not run that dogfood file, so the PR's checks were green.
    Fence widening accepted by seat repo:objectstack#5 (thread note, 11:02Z). The seat reads a same-reviewer delta and re-ACCEPTs on the new head before the area re-lands.

  13. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

    Close-out · area o5-D · 2026-11-26T12:50Z
    Delivered by PR #37436 (merged, 021524cd0a): Field.uiReadonly and Field.uiReadonlyWhen. A field a person changes only through actions is read-only on every UI surface that edits it: the edit dialog (which also refuses the submit), the record page, grid cells and stored line-item rows, and kanban and calendar drag. Writes from actions, flows and the API are unaffected.

  14. removed
    pm:dispatched
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:datadomain:specenhancementpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions