Skip to content

feat(units): show a quantity with its unit label (#35490) - #37449

Merged
objectstack-fleet[bot] merged 14 commits into
mainfrom
claude/project-thread-yzpuwp
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 14 commits into
mainfrom
claude/project-thread-yzpuwp

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

Fixes #35490
Fixes #37471

Clause-②: yes (widening)
Metadata-protocol: added

What

A quantity (unitConfig on a number field) now renders with its unit on every display face: the grid cell, the form (read-only and edited), and the detail row (DetailSection, the quick-look panel, RelatedList). A unit-code text field (unitMode: 'code') shows its unit's name (Open item 8 (A)).

  • Choosing a unit (Open item 8, ruled A: 「有下拉」, Units of measure: unit picker for a unit-code field and a quantity's unit field (ADR-0158 Open item 8) #37471). In a form, a unit code field is a searchable picker (UnitCodeField), never a typed box. That covers a text field declaring unitMode: 'code' and the unitField a record quantity on the same form points at; the form stamps that pointer (withUnitCodePointer) and hands the field its record. The picker lists the record's organization's non-retired sys_unit rows, then every standard code, each by its translated name (spec fallback) and limited to the declared unitDimension. It stores the code. Read-only, the field shows the unit's name, not the bare code.

  • Authorable key (Metadata-protocol: added). unitConfig is now declared on @object-ui/types' FormField / FormFieldSchema, by reference to the spec's FieldSchema.unitConfig, beside currencyConfig, so objectui validate accepts it on a hand-authored form field. @object-ui/types ships minor (the scale / currencyConfig precedent). The tolerant face now checks the key's value against UnitConfigSchema where it passed as an unknown key before.

  • Which unit. Fixed mode uses unitConfig.unit. Record mode reads the row's unitField. Grid, ListView and RelatedList add the unit column and organization_id to their $select when the unit column is not shown.

  • Name. An org unit (sys_unit, U3) shows its label. A standard code shows the platform's name for it in the reader's locale (L2, 2A): the spec English base STANDARD_UNIT_NAMES, and each platform bundle serves messages.standardUnit<CODE>. The UI reads app.messages.standardUnit<CODE> and falls back to the English base.

  • Decimals. These come from the unit row (org unit decimal_places, or the sys_standard_unit_setting row for a standard code, OI10 (A)). The row is the one whose organization_id matches the record's organization (note 7180167601). L4 holds: the display width is min(unit places, field scale).

  • Rounding (OI6, ruled A). The display rounds half away from zero (Intl halfExpand) at a fixed width. The stored value, footer totals (summed exact, then formatted), exports, the API and MCP stay exact. No marker is shown.

  • Bare code. A retired ("deleted") org unit, an unknown code, or a reader who may not read sys_unit (an external member, comment 7030066814) gets the bare code, never an error.

The rows are read once per data-source adapter for the session (the homeAmountPreview precedent). Each table is read on its own, so a refusal of one leaves the other usable.

Server-side home of the names (measured)

The platform-objects translation bundles, flat messages map, with single-segment keys standardUnit<CODE>. The keys are not dotted units.standard.<CODE> because FileI18nAdapter.resolveKey splits on . and walks the parts as nesting (the plugin-audit precedent). The console's served document lays bundles under app, so the UI key is app.messages.standardUnit<CODE>. English is copied from the spec base, never re-typed. Ten locales are translated, and a pin test holds every locale to exactly the 41 codes.

Acceptance notes

Verification

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CXM7nqtiQ3M9JqGAqL

#35490)

A number field declaring unitConfig draws its unit beside the number in
grid, list, form and detail, through one resolver in @object-ui/core and
one formatter in @object-ui/fields. Standard codes take the platform's
per-locale label and their organization's sys_standard_unit_setting row;
organization codes take their sys_unit label and decimal places. The
field's scale is the ceiling (ADR-0158 L4). A retired or unreadable unit
shows the bare code.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CXM7nqtiQ3M9JqGAqL
…35490)

Apply the rulings on ADR-0158 Open item 6 and L2:
- @objectstack/spec gains STANDARD_UNIT_NAMES, the English base name of
  every standard code, and standardUnitName (own-property, exact case).
- platform-objects bundles serve each code's name per locale as
  messages.standardUnit<CODE>; English is copied from the spec base.
- The UI reads app.messages.standardUnit<CODE> and falls back to the
  spec base; its own per-locale tables are removed.
- A quantity rounds at render, half away from zero, at fixed width
  min(unit places, field scale); stored values, totals, exports, API
  and MCP stay exact. No marker.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CXM7nqtiQ3M9JqGAqL
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation protocol:data tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/platform-objects, @objectstack/spec, touching 49 documentable anchor(s). ⚠️ 2 changed file(s) yielded no anchor (packages/spec/api-surface/data.json, packages/spec/export-origins/data.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/data-modeling/currency.mdx (via MMK (symbol, a field of const object STANDARD_UNIT_NAMES; a field of const object STANDARD_UNIT_NAME_TRANSLATIONS))
  • content/docs/data-modeling/units.mdx (via KGM (symbol, a field of const object STANDARD_UNIT_NAMES; a field of const object STANDARD_UNIT_NAME_TRANSLATIONS), MTR (symbol, a field of const object STANDARD_UNIT_NAMES; a field of const object STANDARD_UNIT_NAME_TRANSLATIONS))
  • content/docs/deployment/cli.mdx (via KGM (symbol, a field of const object STANDARD_UNIT_NAMES; a field of const object STANDARD_UNIT_NAME_TRANSLATIONS))
  • content/docs/frontend/fields.mdx (via KGM (symbol, a field of const object STANDARD_UNIT_NAMES; a field of const object STANDARD_UNIT_NAME_TRANSLATIONS), STANDARD_UNIT_NAMES (symbol, a top-level const object))
  • content/docs/protocol/diagram.mdx (via SEC (symbol, a field of const object STANDARD_UNIT_NAMES; a field of const object STANDARD_UNIT_NAME_TRANSLATIONS))
What this run could not see
  • 2 changed file(s) yielded no anchor (packages/spec/api-surface/data.json, packages/spec/export-origins/data.json) — pages documenting those are invisible to this run
  • 2 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 176 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 4925039a7558d6477323eeef7b1b16d89da01cc3 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 58db4ead191a0f528b47adbfe79e4756b86ff60c — the merge of head 37fca77eee7be2df4c6073dac7c5d9a628ca6552 into base 4925039a7558d6477323eeef7b1b16d89da01cc3, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 58db4ead191a0f528b47adbfe79e4756b86ff60c && git checkout 58db4ead191a0f528b47adbfe79e4756b86ff60c
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 4925039a7558d6477323eeef7b1b16d89da01cc3 37fca77eee7be2df4c6073dac7c5d9a628ca6552 && git checkout -B drift-repro 4925039a7558d6477323eeef7b1b16d89da01cc3 && git merge --no-ff 37fca77eee7be2df4c6073dac7c5d9a628ca6552

node scripts/docs-audit/affected-docs.mjs --json 4925039a7558d6477323eeef7b1b16d89da01cc3

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 4925039a7558d6477323eeef7b1b16d89da01cc3 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

… the component-type gate (#35490)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CXM7nqtiQ3M9JqGAqL
The number widget reads it, as it reads currencyConfig; the form-field
channel census requires every key it reads to be declared.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CXM7nqtiQ3M9JqGAqL
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

Final head: 7b7017e7be095a8b64cd73bbe0273cf94105c147. All 70 check-runs on it have completed: 61 success and 9 skipped (opt-in or path-selected lanes). None failed, and the PR merges cleanly. Since the PR opened, four CI fixes landed: the spec export-origins baseline gained the two new exports; the quantity form test loads @object-ui/react-runtime at collection (the test-source alias gate); the test regexes escape their NBSPs; and unitConfig is now declared on FormFieldSchema (and FormField) beside currencyConfig, because the number widget reads it (the form-field channel census). Ready for L1 and the seat's contract review (Clause-② yes, widening: two added @objectstack/spec exports, STANDARD_UNIT_NAMES and standardUnitName, plus the optional unitConfig key on the ui form field face).

Where the per-locale names are served (measured). The platform-objects translation bundles, in their flat messages map, with single-segment keys standardUnit<CODE>. The keys are not dotted, because FileI18nAdapter.resolveKey splits on . and walks the parts as nesting. The UI reads app.messages.standardUnit<CODE>, since the console lays the bundles under app. When no name is served, it falls back to the spec English base.

ADR-0158 amendment text (for the ADR owner; docs/adr/** is outside this card's fence)

Open item 6, settled (ruling A, objectstack#35490). A quantity's display rounds at render, half away from zero, at a fixed width. The width is min(the unit's decimal places, the field's scale), per L4. A field with no scale takes the unit's places. A unit with no places uses the field's own width. Only the display rounds. The stored value, a total (summed exact, then formatted), an export, the API and MCP keep the exact value. No marker is shown when the display hides places.

Open item 10, the row read. A standard code's decimal places come from the sys_standard_unit_setting row whose organization_id matches the record's organization. A record with no organization stamp matches a row with none. A record that carries no organization takes the row only when exactly one candidate exists. An org unit's places and label come from its own sys_unit row, chosen the same way.

L1 / Open item 11, the bare code. A retired org unit, an unknown code, and a reader who may not read sys_unit (an external member) see the bare code. They never see an error.

L2 (2A), where names live. The English base name of every standard code is STANDARD_UNIT_NAMES in @objectstack/spec. The platform serves each locale's name as messages.standardUnit<CODE> in the platform-objects bundles. The English bundle copies the spec base. A reader whose locale has no served name sees the English base.

Follow-up item (not built). Add an optional per-unit write-time over-precision refusal. A unit could declare that a value carrying more places than its decimal places is refused at write. It is refused and never rounded. This stays within L4: the field's scale remains the ceiling, and nothing rounds at write.

Deferred: platform-catalog row → #37431 (skills/** fence).


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head 7b7017e · 2026-11-26T07:08Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 7b7017e7be095a8b64cd73bbe0273cf94105c147
Local-runs: none
Scope: packages/spec/src/data/standard-units.ts + packages/spec/src/data/standard-units.test.ts, packages/platform-objects/src/apps/translations/standard-unit-names.ts, packages/platform-objects/src/apps/translations/standard-unit-names.test.ts, the eleven platform-objects bundle files (en, zh-CN, zh-Hant, ja-JP, ko, de, fr, es-ES, pt-BR, ru, ar), ui/packages/core/src/utils/unit-display.ts, ui/packages/fields/src/widgets/useQuantityUnit.ts, ui/packages/fields/src/widgets/quantity-format.ts, ui/packages/fields/src/widgets/QuantityText.tsx, ui/packages/fields/src/widgets/NumberField.tsx, ui/packages/fields/src/index.tsx, ui/packages/types/src/form.ts, ui/packages/types/src/zod/form.zod.ts, ui/packages/types/src/field-types.ts, ui/packages/components/src/renderers/form/form.tsx, ui/packages/plugin-grid/src/objectGridRowLoad.ts, ui/packages/plugin-grid/src/objectGridGenerateColumns.tsx, ui/packages/plugin-list/src/ListView.tsx, ui/packages/plugin-detail/src/RelatedList.tsx, ui/packages/plugin-detail/src/RecordDetailPanel.tsx, ui/packages/plugin-detail/src/fieldEnrichment.ts

Inputs read: card #35490 (body and all six comments), the PR body, the 44-file net diff against main, the 70 check-runs on the head (61 success, 9 skipped, none failed), and final-head comment 7185000835. Code outside the diff was read, not reviewed: ADR-0158 on main, file-i18n-adapter.ts#resolveKey, spec-translations.ts#transformSpecTranslations, setup.translation.ts, source-hash.ts, field-scale.ts, number-display.ts, useColumnSummary.ts, strict-authoring-face.ts, TextField.tsx, the two sys_* unit objects.

① Derived judgments

  • @objectstack/spec public surface: two added exports, nothing removed. Right. STANDARD_UNIT_NAMES (const) and standardUnitName (function), both from src/data/standard-units.ts. api-surface/data.json and export-origins/data.json each gain exactly those two rows and lose none, which matches the source diff.
  • @object-ui/types: one optional key, unitConfig, on FormField and FormFieldSchema, and on NumberFieldMetadata and TextFieldMetadata. Right as a widening. Each is SpecField['unitConfig'] by reference, beside currencyConfig. FormField has no index signature, so the TypeScript side is purely additive. FormFieldSchema is a looseObject, and the strict authoring face (StrictAnyComponentSchema, what objectui validate runs) is derived from it, so a hand-authored form field may now write unitConfig where the strict face refused it before. The PR adds the key to the test's "authorable key surface" list itself. See S3 for what that implies for the changeset.
  • @objectstack/platform-objects: each of the eleven bundles gains a messages group of 41 keys. Right. messages is not in HAND_AUTHORED_SECTIONS or GENERATED_SECTIONS, so withSourceFallback serves it verbatim. No bundle had a messages group before, so nothing is overwritten.
  • @object-ui/core and @object-ui/fields: new exports only (unit-display.ts; QuantityText, UnitCodeText, formatQuantity, quantityDisplayPlaces, useQuantityUnit, useStandardUnitLabel, readUnitCatalog). CellRendererProps and the widget props are read, not changed.
  • Accept sets on the server: none moved. No object definition, route, or engine file is in the diff.

② Semver level

Clause-②: yes (widening) — accurate for @objectstack/spec and for @object-ui/types. No export, key or accepted value is removed anywhere in the diff.

  • @objectstack/spec: patch with Metadata-protocol: none is right for the spec: two exports are not something a metadata author writes, and AGENTS.md's Post-Task rule 3 ships a non-protocol widening as patch.
  • @objectstack/platform-objects, @object-ui/core, fields, components, plugin-grid, plugin-list, plugin-detail at patch: right, on the same rule.
  • S3 (should-fix) — the changeset and the PR body declare Metadata-protocol: none, and @object-ui/types ships at patch, but the diff adds an authorable key. unitConfig is newly declared on FormFieldSchema, joins DECLARED_KEYS ("the AUTHORABLE key surface of FormField") in form-field-zod-coverage.test.ts, and is therefore newly accepted by objectui validate on a hand-authored form field. AGENTS.md: "a new key, accepted value or metadata type is added", and "a kind takes at least minor on a package the diff moves". The precedents for this exact move shipped as minor: scale and currencyConfig on the same face (18d7b48, objectui#11070) and the objectui#12130 keys (c0c2f79, 0665c3b). The claim said none "re-states from its diff"; the key arrived with the fourth CI fix and the line was not re-stated. The changeset body also never names the new form-field key; only comment 7185000835 does. Fix: Metadata-protocol: added in the changeset and the PR body, @object-ui/types: minor, and one sentence in the changeset body naming unitConfig on FormField / FormFieldSchema.
  • N1 (nit) — the tolerant face tightens on values: a form field carrying a malformed unitConfig passed FormFieldSchema as an unknown key and is now refused by the spec's UnitConfigSchema. Nothing read the key before, and the identical move for the objectui#11070 keys was declared a widening ("the tolerant face narrows on their values"), so the Clause-② arm stands. The changeset could say it in one line.

③ Boundary flags

  • OI6 = A, round at render: held. The only rounding in the diff is quantityFractionDigits in quantity-format.ts, fed to Intl.NumberFormat (default halfExpand) through formatDisplayNumber, whose scale option decides grouping only. No path writes a rounded value: the edited box still emits Number(val), no step or blur rule reads the unit's places, and no footer, export, API or engine file is touched. hidden is computed and nothing draws it.
  • Unit names = spec base + server-side translation: held. The English base is in the spec; the ten translations are in standard-unit-names.ts; the en bundle is built from STANDARD_UNIT_NAMES, not re-typed. No ui/packages/i18n file is in the net diff and no unit name string exists anywhere under ui/. The UI imports only standardUnitName as the fallback.
  • Keys and the dot split: held in code. standardUnitMessageKey returns standardUnit + code, the codes are [A-Z0-9]+, and the pin test asserts no key holds a dot. resolveKey then walks messages → standardUnitKGM. On the client transformSpecTranslations copies messages under app, so app.messages.standardUnitKGM is three intended segments. The one dotted spelling left is in the spec jsdoc: S1.
  • Note 7180167601, items 1 and 2: answered. pickRowForOrganization picks the row of the record's organization, never the first; quantityDisplayPlaces is min(unit places, scale).
  • Note 7180167601, item 3 (platform-catalog row): deferred honestly. skills platform catalog: add sys_standard_unit_setting (an organization's display decimals per standard unit code) beside sys_unit #37431 exists, is open (pm:queue, p3, domain:skills), and carries exactly this row with the reason (it regenerates a skills/** file).
  • Comment 7030066814 (external member): answered and pinned. Each table is read on its own; a refused read leaves that table unread and the code bare. Pinned in quantityDisplay-35490.test.tsx.
  • S2 (should-fix) — Open item 8's picker is neither built nor escalated, and Fixes #35490 closes the card that carries it. The card body lists "OI8, ruled A: a standalone unit field also renders with its label and gets the picker". The ruling record 7008524997 on Units of measure on the platform: a standard unit list, quantity fields that carry their unit, and conversion #35339 holds the accepted consequence 「有下拉」, and ADR-0158 Open item 8 on main names Units of measure R1: show a quantity with its unit label #35490 "the picker card". The diff draws the label in cells (UnitCodeText through TextCellRenderer) and stops there: no unit dropdown exists for a code field or for a quantity's unitField, and on the form face TextField does not read unitConfig at all, so a code field in a form shows the bare code even read-only. The PR body, its acceptance notes and the amendment text in 7185000835 do not mention the picker. Close it by building it, or by filing the picker card and naming it in the PR body and the amendment text, with Part of in place of Fixes if the card must stay open. The FormField.unitConfig jsdoc and the form.zod.ts comment also describe unitMode: 'code' on a text field; on this face nothing reads that mode yet, and the same note should say so.
  • Write-time over-precision refusal: honest, not owed now. L4 forbids rounding at write and R1 has four members; a refusal is a new rule that needs a new unit key and its own ruling. It is correctly marked "not built". N3 (nit): it has no card, so once the text is filed on ADR revisions, week of 2026-11-25: rolling checklist of ADR text out of step with main (one governed PR) #37245 the ADR would hold a promise nobody owns. File the card, or write it as a numbered Open item that names its owner, when the row is added.
  • SQL push-down: no finding. The one new read is readUnitCatalog: both unit tables, whole, once per adapter per session, joined to rows in the client by code and organization. A reason is given in the code (short reference lists, the homeAmountPreview precedent), and $expand cannot serve the join because a record stores the code, not an id (U4). The projection changes add columns to an existing $select; none adds a query. N4 (nit): a failed read is cached as "unread" for the session, so a transient error leaves codes bare until reload; $top: 2000 truncates in silence; and the read does not send $count: false, so each table also costs a count(*).
  • The four surfaces. Grid: unitConfig copied on all three column paths, unitField and organization_id added to the projection through the same two gates as the currency harvest. List: the same reads through addPredicateField. Detail: ENRICHED_FIELD_METADATA_KEYS, buildRecordDetailFields and RelatedList (projection and cell bag). Form: number joins the live-record widgets. One resolver and one formatter serve all four, so a quantity cannot draw differently between them. A form's values may lack organization_id; the resolver then answers only when exactly one row exists, which is the safe direction and is what the amendment says. The gap between surfaces is the code field on the form face, under S2.

④ Design judgment

packages/spec/src/data/standard-units.ts (hits).

  • The table holds against its ruling and its consumers. 41 names, keyed and ordered as STANDARD_UNITS; frozen; standardUnitName is an own-property lookup in exact uppercase, as standardUnitOf is. The pin test fails a code added without a name. H87 is "piece" (U2). The first consumers read it as designed: the en bundle copies it and useStandardUnitLabel falls back to it.
  • S1 (should-fix) — the jsdoc on STANDARD_UNIT_NAMES states the key the ruling's implementation rejected. It says each locale's name is served from "the platform translation bundles' messages, keyed units.standard. plus the code" (the code in angle brackets in the source). The served key is standardUnit plus the code, e.g. standardUnitKGM. The dotted form is exactly the one resolveKey would split into three nested segments and fail to find, and this sentence is the published contract a server-side reader (the export or MCP reader the same comment names) would follow. Every other mention in the diff uses the right key. Fix: name the single-segment key there (standardUnit followed by the code, e.g. standardUnitKGM).

Implementing files.

  • unit-display.ts: agrees with ADR-0158 U4, L1, L4 and Open item 10 and with the amendment text. A retired row, a missing row and an unread table all resolve to the bare code with no places. Decimal places outside 0..12 are ignored. Codes are never trimmed or case-folded.
  • quantity-format.ts: agrees with the OI6 ruling and with L4. resolveFieldScale returns undefined for a number field with no scale, so "a field with no scale takes the unit's places" is true in code.
  • useQuantityUnit.ts: agrees. t(key, { defaultValue: base }) returns the served name or the spec base on both the provider and the provider-less path.
  • standard-unit-names.ts and the bundles: agree. The locale set is pinned to the bundle set, and every locale to exactly the 41 codes.
  • form.ts, form.zod.ts, field-types.ts: agree with the spec member they reference; see S2 for the code mode on the form face and S3 for the changeset.
  • Grid, list, detail and form wiring: agree with the contract, as set out under ③.

The ADR-0158 amendment text in 7185000835 against the code. Consistent on Open item 6, L1 / Open item 11, L2 and the follow-up item. Two wordings to tighten when the row is filed on #37245 (no row for this PR is there yet, which is expected before landing):

  • N2 (nit) — Open item 10: "a record with no organization stamp" and "a record that carries no organization" read as the same case and are two in code: organization_id present and empty matches a row with none; organization_id not read at all takes a row only when exactly one exists. Open item 6: "a total (summed exact, then formatted)" is true, but a reader may take it to mean the unit's width. The footer is untouched by this diff: it draws a fixed-mode quantity's sum at the field's own width with no unit, and main already withholds the sum of a record-mode quantity.

Other nits:

  • N5 (nit) — messages sits outside the staleness mechanism, so a later edit of a spec English name leaves the ten translations served with no flag. The pin test checks key sets only.
  • N6 (nit) — tests: no negative half case (-1.5 at 0 places) pins "away from zero"; expect(value).toBe(1.5) on a number primitive cannot fail; nothing pins a footer or an export of a quantity as exact (they are exact because the diff does not touch them).

Findings open on this head: S1, S2, S3. No must-fix. Each should-fix earns a delta review of its fix; S2 and the PR-body half of S3 can close on the prose faces, S1 and the changeset half of S3 move the head.

Implemented-by: claude/project-thread-yzpuwp
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对

Head-sha: 7b7017e7be095a8b64cd73bbe0273cf94105c147
REWORK — L1, seat repo:objectstack#5: contract record 7185313489 (schema face, CONTRACT_REVIEW_TIER) reads PASS, with three should-fix findings and no must-fix. Both maintainer rulings hold in the tree (OI6 = round at render, display path only; spec English base names plus server-side single-segment standardUnit<CODE> keys). S1–S3 close before ACCEPT.

  1. Shape: open draft against main, 44 files (+2172/−42), Fixes #35490, Clause-②: yes (widening), Metadata-protocol: none. Not governed, 2214 lines ≤ 3000. l1-face is clean. Check-runs: 70 completed, 61 success, 9 skipped, 0 failed.
  2. Premise: there is no rounding on any stored, total, export or API path. No unit name table remains under ui/, and the pin test refuses a dotted key. The grid/list/detail/form relay is consistent for quantities. The platform-catalog row is on skills platform catalog: add sys_standard_unit_setting (an organization's display decimals per standard unit code) beside sys_unit #37431 (open). There is no SQL push-down question: the catalog read is whole-table, because a record stores a code, not an id.
  3. Owed before ACCEPT:
    • S1. The STANDARD_UNIT_NAMES jsdoc in packages/spec/src/data/standard-units.ts still says units.standard.CODE. That is the dotted form FileI18nAdapter splits. Correct it to standardUnit<CODE>.
    • S2. ADR-0158 Open item 8's picker (card body; ruling 7008524997 「有下拉」) is neither built nor carried, and on the form face a code field shows the bare code. Either build it, or file a picker card under Units of measure R1: show a quantity with its unit label #35490 and change the PR to Part of #35490, naming that card in the body and the amendment text. Fixes #35490 must not close the card that carries it.
    • S3. unitConfig is a new authorable key on FormFieldSchema. objectui validate newly accepts it, and the PR adds it to the authorable-key list itself. So per AGENTS.md: Metadata-protocol: added, @object-ui/types at minor (precedent: scale / currencyConfig, 18d7b48), and the changeset names the key. Fix it on both carriers.
      The same reviewer reads the delta.
  4. Accepted deviations (nits, record only, unless cheap in the same push):
    • N1: the tolerant face now refuses a malformed unitConfig (objectui#11070 precedent).
    • N2: two wording points in the amendment (organization stamp vs no organization; the footer total is formatted at the field's width with no unit).
    • N4: the catalog read caches a failure for the session, truncates silently at $top: 2000 and sends no $count: false.
    • N5: messages sits outside the staleness mechanism.
    • N6: no negative half case, one vacuous toBe(1.5), and no pin for footer or export exactness.
  5. Out of scope and where it went:
  6. Landing terms: ungoverned. Owed: S1–S3 closed, a same-head at-tier delta PASS, and an ACCEPT. Then the area lands it, and after landing files the ADR-0158 amendment row on ADR revisions, week of 2026-11-25: rolling checklist of ADR text out of step with main (one governed PR) #37245.

…ield key in the changeset (#35490)

Contract review S1 and S3: STANDARD_UNIT_NAMES' jsdoc names the
single-segment key standardUnit<CODE>; the changeset ships
@object-ui/types as minor with Metadata-protocol: added and names
unitConfig on FormField/FormFieldSchema. The form-face comments say
nothing there reads unitMode 'code' yet. Adds a negative half-rounding pin.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CXM7nqtiQ3M9JqGAqL
ADR-0158 Open item 8 (ruled A): a text field declaring unitMode 'code',
and the unitField a record-mode quantity on the same form points at,
draw UnitCodeField, a searchable picker of the organization's
non-retired units and the standard codes, by name and limited to the
declared unitDimension. It stores the code; read-only it shows the
unit's name. @object-ui/core adds unitPickerOptions and the pointer
helpers; the form stamps the pointer and hands the field its record.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CXM7nqtiQ3M9JqGAqL
…over (#37471)

The form already reads its configs' .field stash (a ledgered reader); the
core helper now takes the metadata alone, so the form-field channel
census keeps one reader of that key per module.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CXM7nqtiQ3M9JqGAqL
…unit name exports (#35490)

The PR declares Metadata-protocol: added. The level gate reads only
packages/**/src, and spec's public surface grew by STANDARD_UNIT_NAMES
and standardUnitName, so spec carries the minor beside @object-ui/types.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CXM7nqtiQ3M9JqGAqL
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

Final head: 37fca77eee7be2df4c6073dac7c5d9a628ca6552, replacing 7b7017e7. All 70 check-runs on it have completed: 61 passed and 9 were skipped (opt-in or path-selected lanes). None failed, and the PR merges clean. It is 46 files, +2576 / −44 (2620 changed lines).

L1 findings, closed

  • S1. The STANDARD_UNIT_NAMES jsdoc now names the key that is actually served: standardUnit followed by the code, e.g. standardUnitKGM. It is one segment, because the i18n adapter walks a dotted key as nesting.
  • S2: built, per the area's choice (a). Fixes #37471 sits beside Fixes #35490.
    • A text field that declares unitMode: 'code' now renders the unit picker on the form face (UnitCodeField, from the TextField branch). So does the unitField a record-mode quantity points at: the form stamps {unitMode:'code', unitDimension} onto that field (withUnitCodePointer).
    • The picker lists the organization's own non-retired sys_unit rows, then every standard code. It is filtered by unitDimension, labelled by the served name with the spec English base as fallback, and searchable by name or code. It stores the code.
    • Read-only, the field shows the unit's name, with the code in the title. A retired or unreadable code shows bare.
    • The FormField.unitConfig jsdoc and the form.zod.ts comment now describe a reader that exists.
    • Ablations (each red, then restored to HEAD): retired filter 4/56, pointer stamp 1/2, TextField branch 3/30.
  • S3. The PR body and changeset say Metadata-protocol: added, with @object-ui/types: minor, and the changeset names unitConfig on FormField / FormFieldSchema.
    • @objectstack/spec is also graded minor, for its two new exports. The level gate reads only packages/**/src, so the ui-side minor is invisible to it.
    • Spec already carries a pending major on the 19 line, so this changes no version.
  • N4, in part. The catalog reads send $count: false. Caching a failure for the session is now documented as deliberate: an external member's refusal is permanent, and a re-read would cost one request per grid cell. The silent $top: 2000 truncation and N5 go to Units of measure: review follow-ups of PR #37449 (catalog read failure caching and truncation; unit-name translations outside staleness) #37472.
  • Census. The form hands field metadata to quantityUnitCodePointers, so the field ledger row keeps its exact readers.

ADR-0158 amendment text (for the ADR owner; docs/adr/** is outside this card's fence)

Open item 6, settled (ruling A, objectstack#35490).

  • A quantity's display rounds at render, half away from zero, at a fixed width.
  • The width is min(the unit's decimal places, the field's scale), per L4. A field with no scale takes the unit's places. A unit with no places uses the field's own width.
  • Only the display rounds. The stored value, an export, the API and MCP keep the exact value. No marker is shown when the display hides places.
  • The list footer is unchanged. It draws a fixed-mode quantity's sum at the field's own width, with no unit. A record-mode quantity's sum stays withheld, as on main.

Open item 8, settled (ruling A, objectstack#37471).

  • A unit code field gets a picker on the form face. That is a text field with unitMode: 'code', or the unitField of a record-mode quantity.
  • The picker offers the organization's non-retired units, then the standard codes. Each is shown by its name in the reader's language and restricted to the field's unitDimension.
  • The picker stores the code.
  • Read-only, the field shows the unit's name. A retired or unreadable code shows bare.

Open item 10, the row read. A standard code's decimal places come from the sys_standard_unit_setting row whose organization_id matches the record's organization. Two cases differ:

  • A record whose organization_id was read but is empty matches the row that has none.
  • A record whose organization_id was not read at all takes a row only when exactly one candidate exists.

An org unit's places and label come from its own sys_unit row, chosen the same way.

L1 / Open item 11, the bare code. A retired org unit, an unknown code, and a reader who may not read sys_unit (an external member) see the bare code. They never see an error.

L2 (2A), where names live.

  • The English base name of every standard code is STANDARD_UNIT_NAMES in @objectstack/spec.
  • The platform serves each locale's name as messages.standardUnit<CODE> in the platform-objects bundles, and the English bundle copies the spec base.
  • A reader whose locale has no served name sees the English base.

Follow-up item (not built). Add an optional per-unit write-time over-precision refusal: a unit could declare that a value carrying more places than its decimal places is refused at write. It is refused and never rounded. This stays within L4, since the field's scale remains the ceiling and nothing rounds at write. Its card or owner is named when this row is filed on #37245.

Deferred:


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract-review-claim: session_01Utp6CYtTDvfPQDzMbZnN5X · head 37fca77 · 2026-11-26T08:24Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 37fca77eee7be2df4c6073dac7c5d9a628ca6552
Local-runs: none
Scope: packages/spec/src/data/standard-units.ts + ui/packages/fields/src/widgets/UnitCodeField.tsx, ui/packages/fields/src/widgets/TextField.tsx, ui/packages/fields/src/widgets/useQuantityUnit.ts, ui/packages/fields/src/index.tsx, ui/packages/core/src/utils/unit-display.ts, ui/packages/components/src/renderers/form/form.tsx, ui/packages/types/src/form.ts, ui/packages/types/src/zod/form.zod.ts

Delta review of the record on 7b7017e7be095a8b64cd73bbe0273cf94105c147. Read: the diff 7b7017e7..37fca77e (four commits, 15 files, +433 / -31), the PR body at this head, final-head comment 7186545236, card #37471 with claim 7185873293, card #37472, and the 70 check-runs on the head (61 success, 9 skipped, none failed). The delta holds no main merge: it has no merge commit and the merge-base with main is unchanged (8d60333638). Everything outside the delta stands as judged in the first record.

① Derived judgments

  • @object-ui/core: four added exports, nothing removed. Right. declaresUnitCode, quantityUnitCodePointers, withUnitCodePointer, unitPickerOptions (and the UnitPickerOption type). OrganizationUnitRow gains an optional dimension.
  • @object-ui/fields: two added exports, nothing removed. Right. UnitCodeField and useUnitCatalog. useQuantityUnit keeps its signature and its result; its body now reads through useUnitCatalog.
  • @objectstack/spec: no surface change in the delta. One jsdoc sentence. The api-surface and export-origins baselines are untouched, as they should be.
  • @object-ui/types: no shape change in the delta. Comment and jsdoc only.
  • A behaviour change on an existing face, declared. A text field that declares unitMode: 'code', and the unitField a record quantity on the same form names, now draw a picker where they drew a typed box. This is the ruled Open item 8 consequence, and the changeset and PR body state it.

② Semver level

Clause-②: yes (widening) — still accurate. The delta removes nothing.

  • S3: closed. The changeset and the PR body say Metadata-protocol: added, @object-ui/types is minor, and the changeset names unitConfig on FormField / FormFieldSchema. N1 is closed with it: the changeset now says the tolerant face checks the value.
  • The deviation, @objectstack/spec: minor: accepted. Three facts, each read in the tree at this head:
    • scripts/check-changeset-no-major.mjs asks that a PR declaring the kind grade at least one package whose packages/**/src/** it moves at minor or above. ui/packages/** is outside that glob, so the @object-ui/types minor cannot satisfy it. Of the two packages it can see, spec is the one that grew (two exports); platform-objects only gained data.
    • The gate's own text quotes the 2026-09-04 ruling: an additive widening of a published package's public surface takes at least minor. Two new exports are that. So minor on spec is a true statement about spec, not a label borrowed to pass a gate.
    • No version moves. .changeset/pre.json is mode: pre, tag: next; .changeset/37223-v19-line-opens.md holds a pending major on @objectstack/spec; spec and @object-ui/types sit in the one fixed group. The next cut is 19.0.0-next.N at either level. The only effect is that the entry is listed under Minor Changes in spec's changelog.
    • One residue, not a finding: the added kind belongs to @object-ui/types, and the gate cannot see that package. That is the gate's blind spot, already named in its own comments, and not this PR's to fix.

③ Boundary flags

④ Design judgment

packages/spec/src/data/standard-units.ts (hits). S1: closed. The jsdoc now names the served key as standardUnit followed by the code, one segment, and says why. It agrees with standardUnitMessageKey and with the adapter.

The picker.

  • unit-display.ts: declaresUnitCode is text plus unitMode: 'code'. quantityUnitCodePointers maps each record quantity's unitField to the quantity's unitDimension. withUnitCodePointer stamps a copy and never overrides a field's own unitConfig. unitPickerOptions scopes org rows to the record's organization when the record carries the key, else offers every readable row, de-duplicated by code. All of it is pure and pinned by five core tests.
  • TextField.tsx: the branch is keyed off the declaration, after the currency-code branch and before the read-only return, so every host that renders the text widget for a declared code field gets the picker. Hook order is unchanged.
  • UnitCodeField.tsx: hooks run before the read-only return. Read-only, it shows the name with the code as the title, and a retired or unreadable code bare, which is the face the cells draw. Edited, it is a popover with a searchable command list, matched on code and on name.
  • form.tsx: the pointer map is built once per field set from the fields' metadata, the stamp is applied to the metadata handed to the widget, and the live record is handed to a unit code field as it is to a quantity.
  • Accessibility. The trigger is a button with role="combobox", aria-expanded and aria-invalid, and it takes the form control's own props (id, described-by), so the field label names it. Options are reachable by role and by keyboard through the command list; the tests drive it by role. It is the same shape as CurrencyCodeField.
  • Tests. Core: five. Fields: read-only name, list and store, closed-picker name. Form: the stamp and the record hand-off, with a control field that gets neither. The half-away-from-zero pin now covers both signs, and the assertion that could not fail is gone (N6 closed for those two). The three ablations the PR body reports for the picker (retired filter, pointer stamp, TextField branch) are the dev's runs; this review is read-only and did not repeat them.

The amendment text in 7186545236 against the code. Consistent on every line. N2: closed — Open item 10 now separates "read but empty" from "not read at all", and Open item 6 says the footer is unchanged. The new Open item 8 line matches the picker as built and correctly limits it to the form face.

No must-fix, no should-fix.

Nits, none blocking:

  • N7 (nit) — the picker has no way back to empty. An optional standalone code field, once set, cannot be cleared in the form, where the typed box could. CurrencyCodeField has the same shape on purpose (a blank currency code is refused), and the ruling's wording is 「和币种栏一样」, so this follows the model; a standalone unit field can be optional, so it is worth a line on Units of measure: review follow-ups of PR #37449 (catalog read failure caching and truncation; unit-name translations outside staleness) #37472.
  • N8 (nit) — the pointer stamp lives in the form renderer only. A quantity's unitField edited outside it (grid inline edit, the detail page's in-place editor, a bulk-action dialog) is still a typed box, because that field declares nothing itself. The PR body and the amendment say "on the form face", which is true; an acceptance note naming those hosts would make the limit explicit.
  • N9 (nit) — organization scoping follows whether the form's values carry organization_id. A form that carries the key with no value (a new record under an isolating posture) would hide the organization's own units and offer standard codes only. No test covers a create form.
  • N10 (nit) — nothing pins search by name or by code, or the dimension restriction at component level (it is pinned in core).

S1: closed
S2: closed
S3: closed

Implemented-by: claude/project-thread-yzpuwp
Reviewed-by: session_01Utp6CYtTDvfPQDzMbZnN5X

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X

席位核对

Head-sha: 37fca77eee7be2df4c6073dac7c5d9a628ca6552
ACCEPT — L1, seat repo:objectstack#5

  1. Shape: open draft against main, Fixes #35490, Fixes #37471, Clause-②: yes (widening), Metadata-protocol: added. Not governed: 2620 lines ≤ 3000. The rework since 7b7017e7 is four commits, 15 files (+433/−31), with no main merge.
  2. Rework closed (delta contract record 7186636273, schema face, CONTRACT_REVIEW_TIER, same head):
  3. Gates: check-runs at 37fca77e: 61 success, 9 skipped, 0 failed. Merges clean.
  4. Accepted deviations:
    • @objectstack/spec: minor. check-changeset-no-major reads only packages/**/src, so the @object-ui/types minor cannot satisfy it. Spec really grew by two exports. Pre mode (next), the pending spec major (37223-v19-line-opens.md) and the shared fixed group mean no version moves.
    • New nits N7–N10 are record-only:
      • N7: the picker cannot be cleared back to empty, the same as the currency picker.
      • N8: the pointer stamp is form-only, so grid inline, detail in-place and bulk dialogs still show a typed box.
      • N9: org scoping follows the presence of the organization_id key on create forms.
      • N10: no component-level pin for search or dimension.
  5. Out of scope and where it went:
  6. Landing terms: ungoverned. Same-head at-tier PASS, no open must-fix or should-fix. The area marks it ready and lands it with --land, then files the ADR-0158 amendment row on ADR revisions, week of 2026-11-25: rolling checklist of ADR text out of step with main (one governed PR) #37245.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

Landing · area o5-D · 2026-11-26T08:33Z · on L1 ACCEPT 7186657457 and delta contract review PASS 7186636273 (CONTRACT_REVIEW_TIER) at 37fca77eee7be2df4c6073dac7c5d9a628ca6552

Probe Reading
check-governed-merges.mjs --pr 37449 NOT governed · 2620 changed lines ≤ 3000 · Clause-②: yes (widening), no narrowing arm
landing-k.mjs --pr 37449 K = 8 < 15 · label PR, no new locale pack after PRBASE · no shared book moved under this PR

State: ready + auto-merge now. Known overlap: PR #37436 (#36806) edits the same extraFields line in objectGridRowLoad.ts; whichever lands second merges main and keeps both entries. On MERGED the area closes out #35490 and #37471 (Fixes) and files the ADR-0158 amendment row on #37245 (N3 named there); #37431 and #37472 stay open.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 08:34
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit f71d488 Nov 26, 2026
71 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-yzpuwp branch November 26, 2026 09:05
os-bill pushed a commit that referenced this pull request Nov 26, 2026
Keeps both extraFields entries (lockOperandFields and #37449's quantityUnitFields) in objectGridRowLoad.ts.
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…writes keep it (uiReadonly / uiReadonlyWhen) (objectstack-ai#37436)

<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg8ZBQe4UHadd2fGHGeWRW9V)_

repo:objectstack#5 · os-bill · session_01Utp6CbdHk3orAeensH6EzS

Fixes objectstack-ai#36806

Clause-②: yes
Metadata-protocol: added
Skills-docs: follow-up objectstack-ai#37405

## 维护者速读

- 字段新增 `uiReadonly` / `uiReadonlyWhen`:控制台所有手工编辑面锁住该字段,动作、导入、API、流程照常写入。
- 写入仍由对象校验裁决(如 state_machine),引擎不读这两个键;`uiReadonly` 与 `readonly` 同为 true
时被拒。
- 控制台统一走 `@object-ui/core` 的 `fieldReadOnlyByHand`;看板顺带修好:`readonly`
分组字段此前可拖动且写入被静默丢弃。
- MCP describe_object 把两个键单列上报;导入映射与 Studio 读取保持原样。
- 返工(席位 L1 7183712080):`uiReadonlyWhen` 求值失败即锁定、编辑表单拒绝提交,`os validate`
检查该槽;表格与列表视图取回锁谓词的操作数;描述只列出已生效的界面(其余见 objectstack-ai#37448)。

## What changes

Ruling 7180466652 (scope items 1–6), surface per claim 7180490513 and
amends 7180683371, 7181406682, amend 3 and 7182190475.

**Spec (`packages/spec`)**
- `Field.uiReadonly: boolean` and `Field.uiReadonlyWhen` (CEL, the same
scope as `readonlyWhen`), both optional with no default (absent =
unlocked, so no parsed field grows a key), with describes and TSDoc.
- The field `superRefine` refuses `uiReadonly: true` beside `readonly:
true` at `['uiReadonly']` (every door that parses a field).
`uiReadonlyWhen` beside `readonlyWhen` is accepted.
- `deriveInlineGridColumns` skips a `uiReadonly` child field, as it
skips `readonly`.
- Liveness rows `uiReadonly` / `uiReadonlyWhen` (live); regenerated
reference docs, authorable-surface record and state counts.
- Studio field form (`field.form.ts`) offers both rows beside `readonly`
/ `readonlyWhen` (`uiReadonlyWhen` as a CEL code row). The label and
help text of each are translated in all 11 metadata-forms locale packs
(`packages/platform-objects`, the generator re-run after the leaf
values, so no fill hash is left); the translated-leaf count pin moves
837 → 839.

**Console (`ui/packages/**`)**
- `@object-ui/core`: `fieldReadOnlyByHand(def, record?, ctx?)`,
`fieldStaticallyReadOnlyByHand(def)`, `fieldHasConditionalHandLock(def)`
(new `evaluator/handLock.ts`). `resolveFieldRuleState` takes
`uiReadonlyWhen` (rules) and `uiReadonly` (statics) into its `readonly`
verdict; a faulted `uiReadonlyWhen` fails CLOSED (no server judges it),
unlike `readonlyWhen`.
- Hand surfaces swapped to the helper: create/edit dialogs
(`filterSystemFields`, `filterCreateModeFields`, `disabled`) and the
submitted payload (`sanitize.ts`); form renderer and wizard pass
`uiReadonlyWhen`; record page inline edit (`DetailSection`,
`InlineEditSaveBar`, `RecordDetailPanel`, stage path), highlight-strip
chip (`HeaderHighlight`), related list; grid inline edit
(`fieldInlineReadOnlyKind`, `cellReadOnlyKind` now judges the row, which
the data table's paste and multi-row staging read) and the required
prompt; kanban drag (`cardsMovable` and a refused `handleCardMove`);
calendar drag (`onEventDrop`, `endEditable`, and the drop handler over
the record); line-item grid (`deriveMasterDetail` carries
`uiReadonlyWhen` onto the column; `GridFieldWidget` folds it per row);
edit-form state lock (`editFormLockedByState`).
- Stays on raw `readonly`: import mapping (`importTargetFields.ts`),
Studio/designer reads, calendar quick-create's required exemption (it
mirrors the engine insert).

**Server**
- Engine untouched (`packages/objectql/**`): the strip keys on
`readonly` alone, so REST, import, actions and flows write a hand-locked
field and the object's validations judge each write.
- MCP `describe_object` reports `uiReadonly` / `uiReadonlyWhen` as their
own keys where set, on HTTP (`runtime/domains/mcp.ts`) and stdio
(`mcp/mcp-server-runtime.ts`); the tool description names them
(`mcp-http-tools.ts`).
- FieldSchema key censuses classify both keys: `driver-sql` storage
class (presentation), `metadata-core` FLS reference positions
(`uiReadonly: keep`, `uiReadonlyWhen: expression`), `/meta/types` field
count 87 → 89.

## Review rework (L1 7183712080, contract record 7183704697)

- **S1** Every surface passes the host predicate scope
(`usePredicateScope`) to `fieldReadOnlyByHand`: grid cell, record page
(inline edit, highlight chip, save bar, stage path), kanban drop,
calendar drop. The grid's own row load (`objectGridRowLoad.ts`) and
`ListView`'s `$select` fetch the operands of the `readonlyWhen` /
`uiReadonlyWhen` of every shown column, the kanban lane field and the
calendar start / end fields, through the same FLS and declared-field
gates as the other harvests.
- **S2** A `uiReadonlyWhen` that cannot be evaluated (a parse error, an
operand the row lacks, an unbound root) fails CLOSED
(`UI_READONLY_WHEN_FAULTED`): no server judges the hand lock, so the
field locks. The edit form refuses to submit and names the field and the
rule (`form.uiReadonlyWhenFaulted`, all 11 ui locales). `os validate`
checks the slot as it checks `readonlyWhen` (`validate-expressions.ts`:
the record-scoped check plus the field-rule root verdict, with its own
consequence clause).
- **S3(a)** `hydrateColumns` carries the child field's `uiReadonly` /
`uiReadonlyWhen` onto an authored line-item column, typed or not;
`GridFieldWidget` locks a `uiReadonly` column on every row. Gantt,
timesheet, swimlane, the assistant and N3 `palettePrefillField` are
objectstack-ai#37448.
- **S4** `uiReadonlyWhen` is judged on an existing record only: the
describe, the liveness note and the Studio help say so (help
retranslated in 10 locales, generator re-run, no fill hash).
- **Narrowing, N2** Both describes and the `describe_object` text name
the surfaces that honour the keys; `uiReadonly`'s describe says a
`required` field without `defaultValue` fails every console create.
- **N1** Changeset lines for `metadata-core`, `platform-objects`,
`lint`, `plugin-list`, `i18n`.

## Delta rework (contract 7186595753, L1 7186604968)

- **S5** The line-item grid judges `uiReadonlyWhen` on a stored line
only (`rowHasId`): a new line is not judged, as the create dialog does
not judge it. `ObjectGrid` has no inline add-record row (`addRecordForm`
opens the create dialog), so no second site exists.
- **S6** The FLS reference scrub (`metadata-core`) deletes a
`uiReadonlyWhen` that reads a field denied to the caller and now serves
the field `uiReadonly: true` in its place (unless it is already
`readonly`), so the lock never opens for that caller. The `ListView.tsx`
comment says so.
- **N4** This body's Console bullet now says fail-closed. **N6** The
form's hand-lock fault check short-circuits on `readonlyWhen` on both
evaluation paths. **N5** (detected kanban lane field) is carried on
objectstack-ai#37448.

## Main merge and queue fix

- `3eb2bcf8` merges main after objectstack-ai#37449 landed and keeps both
`...lockOperandFields` and `...quantityUnitFields` in `extraFields`.
`73681b48` regenerates `object.mdx` from the merged tree.
- `30090e73` adds the expression-conformance ledger row
`cel-field-ui-readonly-when` for
`data/field.zod.ts:FieldSchema.uiReadonlyWhen`
(`packages/qa/dogfood/test/expression-conformance.ledger.ts`: cel,
interpret, enforced, fail-closed, UI only, proof
`handLock-36806.test.ts`). The row was added after a merge-queue dequeue
(run 45802787226), because PR-side CI does not run
`packages/qa/dogfood/test/expression-conformance.test.ts`. That test now
passes 8 of 8 locally.

## Tests

- `packages/spec/src/data/field-ui-readonly.test.ts`: parse and absence,
the refusal (code `custom`, path, message) at the field and object
doors, controls, line-item column skip.
- `packages/qa/dogfood/test/ui-readonly-hand-lock-36806.dogfood.test.ts`
(booted stack, HTTP): a PATCH to the `uiReadonly` field lands with no
`X-ObjectStack-Dropped-Fields` (control: the `readonly` sibling is
stripped and advertised); the `state_machine` refuses an illegal move
with status 400, code `VALIDATION_FAILED` and its own message on the
PATCH, action and import doors; a create without the field lands on
`defaultValue`; an API create outside `initialStates` is refused by the
machine.
- `packages/runtime/src/domains/mcp-object-hand-lock-36806.test.ts` and
a block in `packages/mcp/src/__tests__/mcp-server-runtime.test.ts`: both
keys reported only where set, never folded into `readonly`.
- UI pins, each surface locked:
`core/evaluator/__tests__/handLock-36806.test.ts`,
`plugin-form/__tests__/dialogHandLock-36806.test.ts`,
`plugin-detail/__tests__/DetailSection.doubleClickEdit.test.tsx`
(hand-lock block),
`plugin-grid/objectGridCellFacts.handLock-36806.test.ts`,
`plugin-kanban/ObjectKanban.handLock-36806.test.tsx`,
`plugin-calendar/__tests__/ObjectCalendar.handLock-36806.test.tsx`,
`fields/widgets/GridField.handLock-36806.test.tsx`,
`plugin-form/deriveMasterDetail.test.ts` (line-item block); `types`
FormField coverage list gains `uiReadonlyWhen`.

## Acceptance notes

- Kanban side fix: the board read no field lock before, so a card
grouped by a `readonly` field was draggable and its PATCH was silently
stripped. Both locks now stop the drag.
- `uiReadonly` is `.optional()`, not `.default(false)`: absent means
unlocked, and no parsed field or snapshot grows a key.
- Overlaps objectstack-ai#37422 in object-lifecycle-panel-echo-decisions.test.ts count
pins (837 → 839 here); whichever lands second merges main and re-adds
its delta.
- objectstack-ai#37449: one-line union in objectGridRowLoad.ts `extraFields`; resolved
in the main merge `3eb2bcf8`, keeping both.
- Not in this PR: Gantt drag and in-place edit, the timesheet cell,
kanban swimlane drag, the assistant acting for a person, and
`palettePrefillField` (objectstack-ai#37448); skills pages (objectstack-ai#37405).
- No console screenshots: no example app declares either key, and adding
one is outside the claim's surface; the surface behaviour is pinned by
the UI tests above and ablated.

## Verification

Local, per os-dev local verification scope (CI runs the full farm):

- Pins: all new tests pass (spec 5, dogfood 6, runtime MCP 3, mcp stdio
block, 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 (the one red
before them was the form reconciliation pin, fixed by offering the
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. The remaining ui package suites are reported in
the final-head comment.
- Typechecks green: spec, runtime (incl. test typecheck), mcp, dogfood,
metadata-core, driver-sql, and `type-check` in 10 ui packages.
- Ablations (each mutation proven on disk, restored, tree clean):
- UI read-only pin: `fieldStaticallyReadOnlyByHand` without `uiReadonly`
→ 8 pins red across kanban, calendar, record page, dialogs and grid.
- Write-keeps pin: the engine strip (`rule-validator.ts`) also stripping
`uiReadonly`, built to dist (marker in 4 files) → 4 dogfood pins red
(PATCH, the machine's refusal on PATCH, action and import); restored,
rebuilt, marker absent.
- `dispatch-gates --commands`: 124 derived commands run. Reds not from
this diff: `check-plugin-teardown-shape --self-test` (shallow clone
cannot reach its pinned fixture commit), `check:platform-checklist`
(ABSENT SYMBOL `FlowItemMoreMenu` in areas/automation.json; neither file
is in this diff), `check:dual-build-cjs-loads` (prerequisite: unbuilt
packages, nothing measured).
- Rework (head 309363d): new pins core 4, grid cell 2 + harvest 4,
ListView 5, form refusal 4, line-item 2, lint 5. Suites green: ui core
4,800, i18n 2,028, components 4,996, fields 5,034, plugin-form 2,796,
plugin-grid 2,800, plugin-list 2,075, plugin-detail 3,970, plugin-kanban
585, plugin-calendar 515; lint 9,634; spec data 6,865; mcp 1,512;
platform-objects translations 610. `type-check` green in 9 ui packages
and lint; `check:generated --fix` re-checked clean.
- Rework ablations (each mutation landed on disk and was restored):
fail-open fault → 6 pins red (core, grid, form); grid harvest dropped →
harvest pins red; ListView harvest emptied → 3 red; form refusal off → 2
red; `withHandLock` static half off → 1 red; GridField static read off →
1 red; lint slot dropped → 4 red.
- Delta rework (S5, S6, N6): pins GridField new line, FLS scrub ×3, form
readonlyWhen short-circuit; ablations: each mutation turns its pin red
(S5 1, S6 1, N6 1), restored. metadata-core 1,064, fields 5,035,
plugin-form 2,796, components form 643 green; typechecks green.
- overlap-check: clean against main and every open PR except the objectstack-ai#37422
count pin and the objectstack-ai#37449 union line above.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01Utp6CXSuJCALDHFWaV6Bv5

<!-- signed: repo:objectstack#5 · os-bill ·
session_01Utp6CbdHk3orAeensH6EzS -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ut of step with main (week of 2026-11-25) (objectstack-ai#38289)

<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DDypKu7B9nwbu5WuV7AEio8)_

Fixes objectstack-ai#37245

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 用户能看到什么变化:用户无感;只在十份设计记录里补了带日期的说明,写明主线现在实际怎么做,原有的决定文字一个字没动。
- 为什么做:属于「每周设计记录修订」滚动清单(11 月 25
日这一周);清单每一行指出一处「记录写的和主线不一致」,这次一并补齐,免得照着记录干活的人被过时说法带偏。
- 出错会怎样:最坏是某条补充说明写得不准,读这些设计记录的人会碰到;纯文档、只增不删,可以直接撤回,不影响任何功能。
- 要你做什么:请审这些补充说明并亲手合并(设计记录须由你本人合)。

## What changes

Ten ADR files gain notes dated 2026-11-28. Every diff line is an
addition: 239 lines added, 0 removed. No original decision text is
rewritten, and no decision changes. Each note follows the note
convention its own record already uses.

Each row's "what is true now" was read against the code on `main` before
it was written. Where a row was wrong or had gone stale, the note says
what `main` does, and the table and the list under it say so.

| Row (comment id on the card) | ADR and section | Result |
|:---|:---|:---|
| Card body row (from objectstack-ai#37238) | ADR-0146, the 2026-11-24 amendment, "32
registered types" | **Landed. Row stale.** The row asks for 33; the
registry holds 35 entries on `main`. The note states no count and points
at the registry and at ADR-0084's table. |
| 7155511307, nit 1 | ADR-0160 D1, the door's page cap sentence |
**Landed. Row stale.** The row says the door has no page cap. PR objectstack-ai#37354
added one. The note says what `main` does: the list is cut one row under
the door's cap, not at it. |
| 7155511307, nit 2 | ADR-0160 D1, "only contains braces" | **Landed**
as the row asks. |
| 7155511307, nit 3 | ADR-0160 D3, the link-field sentence | **Landed as
a note that the sentence stands.** |
| 7161785832 | ADR-0158, Open items 9 and 12 | **Landed.** |
| 7178404228, anchor half | ADR-0066, line 146 | **No edit.** PR objectstack-ai#37621
already landed it (record 7198334624). |
| 7178404228, end-state half, with 7201928772 | ADR-0066 D2 ⑧ |
**Landed.** Its prerequisite, PR objectstack-ai#37371, is merged. The proposed text is
tightened in two places, listed below. |
| 7179515770 | ADR-0158 U3, U6, L4, Open item 10 | **Landed.** |
| 7184833647 | ADR-0159, Context, "One name already taken" (line 109) |
**Landed as a note. The anchor line is untouched.** This is not a
no-edit row: the anchor resolves, onto the opposite meaning. See below.
|
| 7187445064 | ADR-0158 L1, L2, Open items 6, 8, 10 and 11, and a new
Open item 13 | **Landed.** |
| 7195437501 | ADR-0010, the amendment note of 2026-11-24 | **Landed**,
with one arm `main` has gained since the row was written. See below. |
| 7212321297, first row | ADR-0067 D3 | **Landed. Row wording wrong.**
The note carries the revert rule that the `form` type brought. See
below. |
| 7212321297, second row | ADR-0160, implementation split, row 7's
bullet | **Landed.** The row places the stale path near line 425; it is
near line 491. |
| 7213085888 | ADR-0048 §3.5 | **Landed.** The row's ready text, dated
2026-11-28, with symbol anchors where it had line numbers. |
| 7215202653, corrected by 7215223685, with 7224476684 | ADR-0150 D3,
the note of 2026-11-26 | **Landed.** Item 2 of the first row said the
two doors were still open. The later row supersedes it: PR objectstack-ai#37948
merged, and both doors now refuse. |
| 7217585102 | ui ADR-0057, A2 and A3 | **Landed. Row stale on one
line.** The plan-marker line is written as `main` is today, after PR
objectstack-ai#37970, and not only as it was after PR objectstack-ai#37720. |

Comments that are not rows: 7186949648 (triage note), 7196224618 (a
one-row claim), 7196910014 (its report), 7198334624 (its landing record)
and 7237786310 (this claim).

**No row is held.** Every prerequisite is merged on `main`: PRs objectstack-ai#37219,
objectstack-ai#37240, objectstack-ai#37268, objectstack-ai#37354, objectstack-ai#37366 (which carried objectstack-ai#37422), objectstack-ai#37371, objectstack-ai#37389,
objectstack-ai#37423, objectstack-ai#37449, objectstack-ai#37640, objectstack-ai#37720, objectstack-ai#37818, objectstack-ai#37931, objectstack-ai#37948, objectstack-ai#37970, objectstack-ai#37065,
objectstack-ai#36138 and objectstack-ai#37021. The card has 19 comments as of this pull request; a
row added after comment 7237786310 is not in it.

### Where a note differs from its row

- **ADR-0146.** The row offers two forms, "give the count" or "point to
ADR-0084's table". The note takes the second. A count written today
would already be the third reading (32, then 33, now 35).
- **ADR-0160 D1, the page cap.** The row's premise was true when it was
written and is not now. `RecordContextDoor.pageCap` exists, and both
doors answer it. The note records the one-row difference between the
amendment's words and the code: a list whose cut plus its probe row
would pass the cap is cut one row under the cap.
- **ADR-0160 D3, the link field.** The note leaves the wording alone.
- **ADR-0066 D2 ⑧.** Two changes to the proposed text. The note says in
words that `viewAllFieldsReadVote` replaced `superuserFieldVote`, and
anchors only the function that exists. And it does not say that nothing
re-opens a lock across sets: another set's `viewAllFields` still makes a
hidden field readable, and another set's field row with `editable: true`
still grants the edit, because field grants union without deny.
- **ADR-0159, line 109.** PR objectstack-ai#37422 was merged into PR objectstack-ai#37366's branch,
so the anchor `view.zod.ts#defineForm` resolves and the gate is green on
it. It now resolves onto the `form` type's factory, while the paragraph
describes the Studio helper, which is `defineMetadataForm` today. The
paragraph is Context and describes the tree before the ruling was
carried out, so the note leaves it as written and states both names.
- **ADR-0010.** The row covers the three restore doors of PR objectstack-ai#37423. The
same rule has since gained a second refusal, from PR objectstack-ai#37640: a restore
that would write a version the platform registered into a package's row.
The note has one sentence on it. That sentence goes beyond the row; cut
it if the note should carry the row alone.
- **ADR-0067 D3.** The row asks for a note "naming `form` as a
translated metadata type". D3 is about undo granularity and has no such
notion. The contract reviews of PR objectstack-ai#37422 sent one fact to this record:
a `form` item is reverted only after every `view` row its commit edited
is put back, and it joins `failed[]` otherwise. The note records that.
- **ADR-0048.** The row's text was dated 2026-11-24. The note is dated
2026-11-28, the day it was written into the record.
- **ADR-0150.** Besides answering "Not judged yet", the note qualifies
one sentence of the 2026-11-26 note that said too much: the draft
discard is newly refused only over a stored package-less draft. Where it
was already refused, only its sentence moved.
- **ADR-0158.** Row 7179515770 points at a draft held by its seat, which
this session could not read. The notes are written from the two rows and
the code. Open item 13 is a new numbered item at the end of the list,
carried from the display card; it is marked not built and not settled.
- **ui ADR-0057.** The row asks for "what main does after objectstack-ai#37720".
`main` has moved once more: since PR objectstack-ai#37970 the entry's marker stands
for a write that waits for approval. The note says that, and that A5's
"Not recorded yet" bullet held until that pull request merged.

## Tests

Docs only. No package is touched, so no build closure and no package
test is owed for the change. No tested behaviour changed, so there is no
ablation.

What was checked by hand, on the committed text:

- Each phrase a note quotes from its ADR was compared with the base
file.
- Each verbatim maintainer quotation was compared, byte for byte, with
its record on GitHub.
- Each cited path and symbol exists on `main`. The one exception is
deliberate: the ADR-0160 note names `packages/spec/src/ai/skill.form.ts`
to say that no such file exists.
- Upstream moved ten commits while this was written (`e42520c67b` to
`e2a0e90025`). None touches an ADR file or a file a note cites.
`overlap-check` answers `VERDICT clean exit 0` against `origin/main` at
`e2a0e90025`, and no open pull request shares a file with this branch.

The local gate set is the `dispatch-gates --commands` derivation for
this change set, 27 commands, run on the final commit `c2c3345747`. Each
exit code was captured before any pipe. Reconciliation: `Run
reconciliation — 27 derived, 27 run, 0 NOT-MEASURED, 0 UNRUN`, all 27
with a recorded exit code.

<details><summary>ADR gates on c2c3345 (all exit 0)</summary>

| Command | Exit | Verdict line |
|:---|:---|:---|
| `pnpm check:adr-symbol-anchors` | 0 | `check-adr-symbol-anchors: 4525
anchors across 164 records resolve`, 0 line anchors survive. On the base
commit the same gate reads 4478. |
| `node scripts/check-adr-links.mjs` | 0 | `check-adr-links: 1268
relative link destination(s) under docs/adr/ resolve` |
| `node scripts/check-adr-links.mjs --self-test` | 0 | |
| `pnpm check:adr-anchors` | 0 | |
| `pnpm check:adr-index` | 0 | `adr-index --report: OK —
docs/adr/README.md is current, every record parsed` |
| `pnpm check:doc-authoring` | 0 | |
| `pnpm check:nul-bytes` | 0 | `check-nul-bytes: OK (scanned 28605 text
file(s)`, no raw control bytes |
| `pnpm check:closed-ceremony-text` | 0 | |
| `pnpm --filter @objectstack/lint run check:doc-formula-expressions` |
0 | run after building `@objectstack/formula` and `@objectstack/lint`
under the verify lock |
| `pnpm --dir ui run check:new-line-citations` | 0 | `VERDICT
new-cross-file-line-citations: 0 new citation(s)`. Not in the derived
list; run because a ui ADR changed. |

</details>

<details><summary>The other derived families on c2c3345 (all exit
0)</summary>

`node scripts/check-closing-keyword-parity.mjs` and its `--self-test`,
`node scripts/check-comment-mask-corpus.mjs`, `node
scripts/ci/plan-test-core-shards.mjs --self-test`, `pnpm
check:ci-filter-parity`, `pnpm check:cross-package-test-inputs`, `pnpm
check:driver-memory-census`, `pnpm check:gitlink-declared`, `pnpm
check:pm-governed-merges`, `pnpm check:pm-prior-rulings`, `pnpm
check:published-files`, `pnpm check:refd-timer-probe`, `pnpm
check:registry-log-declared`, `pnpm check:rest-log-spy-declared`, `pnpm
check:tier-file-adoption`, `pnpm check:undeclared-dep-imports`, `pnpm
check:watch-hint-literal`.

Before the push: `node scripts/check-commit-card-trailers.mjs --range
origin/main..HEAD` exit 0, one commit message, no card relation and no
model identifier in the trailer pair.

</details>

<details><summary>The ui scripts test family: one prerequisite failure,
then green</summary>

Derived command: `pnpm --dir ui exec vitest run scripts/`, run under the
verify lock with `--maxWorkers=2`.

- First run: `VERDICT command-exit 1`. `Test Files 1 failed | 171 passed
| 2 skipped (174)`, `Tests 1 failed | 5144 passed | 2 skipped (5147)`.
The one failure was
`scripts/__tests__/unit-registry-absence-collision.test.ts`, with
`Failed to resolve entry for package "@objectstack/client"`. The package
had no build output in the fresh worktree. That is a missing
prerequisite, not a verdict on this change.
- After building the `@objectstack/client` closure under the lock, the
same command on the same commit: `VERDICT command-exit 0`. `Test Files
172 passed | 2 skipped (174)`, `Tests 5145 passed | 2 skipped (5147)`.

</details>

Not run locally: the repository test project behind `test:repo`, which
CI runs on the pull request and on the merge group. Every other family
CI runs is read from this pull request's check runs, not re-run here.

## Acceptance notes

- **Changeset.** None, and the pull request carries `skip-changeset`.
`docs/adr/**` and `ui/docs/adr/**` ship in no package: the ui tree's
root is a private workspace root and `ui/docs` is under no package
directory.
- **Governed surface.** `docs/adr/**` lands by the maintainer's hand.
This pull request stays a draft; the seat hands it over.
- **The registry count.** The card row and the amendment both carry a
number. The repository rule for a volatile count is to remove it and not
to sync it, so the note adds none.
- **Seen and left alone.** These are outside the card and are not
changed here.
- ADR-0084, near line 226, says `form` is not a registered type. It is
about the working names of the 2026-07-01 table, and `form` is
registered now. It is a candidate row for next week's card of this name.
- One internal skill playbook and ui ADR-0056 still use the Studio form
helper's old name. The review of PR objectstack-ai#37366 already recorded both.
- Comments in the console's chat scope helper still describe the
`app:PKG:build` dock key and the Studio copilot.

## Verification

### Read first

1. `docs/adr/0066-unified-authorization-model.md`, the note of
2026-11-28 under D2 ⑧. It is the highest-risk hunk: one long paragraph
on authorization, and it supersedes parts of three earlier notes. Check
the sentences on what another set can still re-open, and the sentence
that stored sets are read with the new meaning and never rewritten.
2.
`docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md`,
the amendment note of 2026-11-28. Check the four cells and their
remedies (enable, enable, name the package, name the package) against
the ruling it quotes.
3.
`docs/adr/0158-units-of-measure-standard-unit-table-org-units-quantity-unit-declaration-base-quantity.md`,
the notes under Open items 6 and 10 and the new Open item 13. Both notes
quote the maintainer, and item 10's records the shape of a new system
object.

### Two-minute check

Run `git diff --numstat origin/main...HEAD` on this branch. Expect ten
rows, nine under `docs/adr/` and one under `ui/docs/adr/`, each with `0`
in the removed column, and 239 added lines in total. Then run `pnpm
check:adr-symbol-anchors` and expect exit 0 with a line that contains
`check-adr-symbol-anchors: 4525 anchors across 164 records resolve`.

---
_Generated by [Claude
Code](https://claude.ai/code/session_016WV4cxRDKprCtjpEdtiPFW)_

<!-- signed: repo:objectstack#1 · os-elon-musk ·
session_016WV4cxRDKprCtjpEdtiPFW -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:data size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant