diff --git a/docs/adr/0010-metadata-protection-model.md b/docs/adr/0010-metadata-protection-model.md index af0589aba8a..37fa8970c0a 100644 --- a/docs/adr/0010-metadata-protection-model.md +++ b/docs/adr/0010-metadata-protection-model.md @@ -246,6 +246,8 @@ Every artifact carries a `_provenance` field: > **Amendment note (2026-11-24, #37013 — PR #37021).** The enum gained a fourth value, `platform`: a record the platform's own code registers at boot (a built-in skill, agent or tool). It is read at the item's own top-level `_provenance` key only. The metadata service sets it on that registration only; every other write the service and the metadata protocol make (a write without the option, the in-memory seeding, the loader save, the protocol's save door, a rollback, and the protocol's restore doors) stores the body without it; a rollback whose row is the platform's own record is refused (`409`), and an undo that puts a row back as the same operation found it (a refused batch publish's, a failed batch row write's) restores the row's own stored bytes. A served body carries the value on its top level only when the stored item does: a body served from a loader other than the stored rows' and a published snapshot are served without it. The artifact door refuses an item that carries it (`VALIDATION_ERROR` at `_provenance`). A stored row re-registered at boot keeps it only when the row held it. It is a store-slot marker only (ADR-0150 D4's note of the same date). +> **Amendment note (2026-11-28, #37130 — PR #37423; #37604 — PR #37640; carried by #37245).** On the note above, "a rollback whose row is the platform's own record is refused (`409`)". The refusal covers every restore door, not the metadata service's `rollback` alone. A restore whose row is the platform's own record is refused `409 RESOURCE_CONFLICT`, before anything is written, at the metadata service's `rollback` and at the metadata protocol's `rollbackMetaItem` and the restore limb of `revertCommit`. The three doors ask one rule (`packages/metadata/src/loaders/database-loader.ts#refusePlatformRecordRestore`); the protocol's two reach it through the overlay store's version restore, which they ask to refuse the platform's record. In `revertCommit` the refused item is reported in `failed[]` with that code, nothing is written for it, and the commit's other items still revert. The same rule also refuses, with the same code, a restore that would write a version the platform registered into a package's row (#37604). An undo that puts a row back as the same operation found it is not asked the rule, as the note above says of it. Pinned in `packages/metadata-protocol/src/protocol.platform-mark-rollback.test.ts` and `packages/metadata/src/loaders/database-loader.test.ts`. + Rules: - Overlay rows targeting a `package` artifact respect L3 + L4. diff --git a/docs/adr/0048-cross-package-metadata-collision.md b/docs/adr/0048-cross-package-metadata-collision.md index 74f809b70f6..8e61cc5b8ee 100644 --- a/docs/adr/0048-cross-package-metadata-collision.md +++ b/docs/adr/0048-cross-package-metadata-collision.md @@ -346,6 +346,34 @@ as future work, not part of this decision. > seed data (the import copies none), and the hosted-cloud default namespace > (objectstack-ai/cloud#3624). +> **Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245); from +> #36166 — PR #37065, following #35823 — PR #36138).** On the amendment's rename sentence, "a name +> that lacks the package's prefix takes it in front". On the unmanaged rename path that sentence has +> three bounds. +> +> 1. **A package that declares no `namespace`** is refused, not renamed, when no object name carries +> the namespace derived from its id and two or more object names share a first segment. Each +> object of each such group is refused (`400 INVALID_REQUEST`), whether every object shares +> the segment (#36138) or a stray object stands beside the group (#36166); the stray is not named +> and does not lift the refusal. So two-word short names the package repeats (`purchase_order` +> beside `purchase_item`) are refused too, and declaring `namespace` lifts the refusal +> (`packages/metadata-protocol/src/package-unmanaged-install.ts#derivedNamespaceContradiction`). +> 2. **A package that declares a `namespace`** is refused for each object name the namespace-prefix +> judge refuses under it +> (`packages/spec/src/kernel/namespace-prefix.ts#validateObjectNamespacePrefix`, asked by +> `packages/metadata-protocol/src/package-unmanaged-install.ts#declaredNamespaceContradiction`). +> The rename has no declared prefix in such a name to replace, and every authoring door already +> refuses that name. +> 3. **Decided to stay as written:** a namespace-less package's single object, foreign prefix or not +> (`demoasset_asset` alone copies as `TARGET_demoasset_asset`), because one name cannot tell a +> two-word short name from a foreign prefix. Namespace-less object names that share no first +> segment (`purchase_order` beside `asset_owner`, bare `asset` beside `site`) also stay as +> written. +> +> A body that writes the id-derived namespace out as `namespace` is judged as declared, so bound 2 +> applies to it and the shapes in bound 3 are refused for it. Each refusal is raised before the base +> exists. Pinned in `packages/metadata-protocol/src/package-unmanaged-install.test.ts`. + ### 3.6 The package-id URL is transparent; a friendly alias is optional A reverse-domain URL — `/apps/com.acme.crm/page/home` — is **self-describing**: diff --git a/docs/adr/0066-unified-authorization-model.md b/docs/adr/0066-unified-authorization-model.md index 63981702311..4b00e97af85 100644 --- a/docs/adr/0066-unified-authorization-model.md +++ b/docs/adr/0066-unified-authorization-model.md @@ -144,6 +144,8 @@ Captured for the record; **out of scope for Phases 1–4 above**. Each is anchor > **Note (2026-11-15) — a set's own `readable: false` row wins over that set's own View All vote (#33828, maintainer ruling on the card, letter A).** The ruling, as the card states it: "A, platform. An explicit `readable: false` field-permission row on a permission set must win over that same set's View All (`viewAllRecords`) field vote. This amends ADR-0066 D2 ⑧ as amended by ruling of record 6573563853." In the field-permission merge, a set that holds View All on an object (its own entry for the object if it has one, otherwise its `'*'` wildcard) and does not hold Modify All on it casts **no read vote on a field its own `fields` row declares `readable: false`**. That row is the set's whole say on the field, so a set can grant View All on an object and still hide a field of it from its holders. "Explicit" is literal: an omitted `readable` parses to `true` and is never a mask. The rest of the 2026-11-02 note stands. **Another** set's View All or Modify All on the object still makes the field readable (and, under Modify All, editable) for a caller who holds both sets, which is the platform-admin case ruling 6573563853 fixed. The same set's View All still votes on every field it does not mask itself. View All never granted an edit, so an edit lock beside it binds as before. **Modify All is unchanged, kept until the field-axis split (#34365), by the maintainer's ruling on the card of 2026-11-16 (6909362597, letter A), verbatim 「保持现状,只给警告」 (keep the current behaviour, warn only):** a set that holds `modifyAllRecords` on the object still votes `readable: true` and `editable: true` on every field of it, its own rows included, so its own `readable: false` or edit lock binds none of its holders. This note replaces, **for View All only**, the 2026-11-02 note's sentence "a set can no longer withhold a field from its own View All / Modify All holders"; for Modify All that sentence still holds, and a field is withheld from a Modify All set's holders by granting the object without that bit. One function answers the per-field vote, `superuserFieldVote` (`packages/core/src/security/effective-object-permissions.ts`), asked with the field's name by both field merges, `getFieldPermissions` and the row-blind `/auth/me/permissions` merge (`buildEffectiveFieldPermissions`), so every reader of the merge answers the same. The lint rule `security-superuser-field-mask-inert` reports only a row its own set's Modify All unbinds; a `readable: false` beside the set's own View All is no longer reported. Taking a field away from a caller whom another set serves it to remains the job of the muting/deny layer ⑦ still owes. > **Note (2026-11-24) — a set may carry `viewAllFields`, a read-only vote on every field of an object ([#36050](https://github.com/objectstack-ai/objectstack/issues/36050), step 2 of the field-axis split [#34365](https://github.com/objectstack-ai/objectstack/issues/34365), ruling of record 6912661484; built by [#36085](https://github.com/objectstack-ai/objectstack/pull/36085)).** `ObjectPermissionSchema` accepts an optional `viewAllFields` beside `viewAllRecords` and `modifyAllRecords`. A set that carries it on an object (its own entry for the object if it has one, otherwise its `'*'` wildcard) casts a read vote, never an edit vote, on every field of that object. The 2026-11-15 rule holds for it: the set's own `readable: false` row on a field beats the set's own bit. The vote is cast inside the one function that calls `holdsViewAllFields` (`packages/core/src/security/effective-object-permissions.ts#holdsViewAllFields`), and both field merges call that function, so both field merges answer the same. The bit grants nothing else: no access to the object, no record (it is not part of `holdsSuperuserBypass`), no admin posture. `admin_full_access` and `organization_admin` carry it on `'*'`. That changes no answer today, because their View All and Modify All already cast the same vote. The `organization_admin` variant granted without the record bypass does not carry it. On `'*'` the bit also votes on the fields of `private`-posture objects while opening none of them; narrowing that reach would be a maintainer ruling. The notes of 2026-11-02 and 2026-11-15 stand: View All and Modify All still vote on fields. The end state of the split, where they stop voting on fields, is [#36055](https://github.com/objectstack-ai/objectstack/issues/36055) and is not built. + + > **Note (2026-11-28) — the end state: View All and Modify All cast no field vote ([#36055](https://github.com/objectstack-ai/objectstack/issues/36055), step 3 of the field-axis split [#34365](https://github.com/objectstack-ai/objectstack/issues/34365), ruling of record 6912661484, letter A; built by [#37371](https://github.com/objectstack-ai/objectstack/pull/37371), protocol 19).** The notes of 2026-11-02, 2026-11-15 and 2026-11-24 above describe the vote before this step, and each is superseded where it has View All or Modify All vote on a field. From protocol 19 a set's `viewAllRecords` or `modifyAllRecords` on an object widens the records the set reaches and casts no vote in either field merge. The one object-wide field vote is `viewAllFields`: it votes `readable: true` on every field of the object and never `editable: true`, and a set's own explicit `readable: false` row on a field beats that set's own bit (the 2026-11-15 rule, now carried by `viewAllFields` alone). One function casts it, `packages/core/src/security/effective-object-permissions.ts#viewAllFieldsReadVote`, which replaced `superuserFieldVote`; both field merges ask it, `getFieldPermissions` and the row-blind `/auth/me/permissions` merge (`packages/core/src/security/effective-object-permissions.ts#buildEffectiveFieldPermissions`). **What follows.** A set's own field rows now bind beside its own Modify All, as they already did beside its own View All: its `readable: false` row hides the field from its holders, and a row of its own without `editable: true` locks it. That replaces the 2026-11-15 note's passage "Modify All is unchanged". Another set's View All or Modify All re-opens no field a set hides or locks. 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 still union without deny. No object-wide bit casts an edit vote any more, so the built-in admin sets read every field through `viewAllFields` on `'*'` and no longer edit a field another held set locks. **Source is converted, stored sets are not.** The ADR-0087 conversion `permission-view-all-fields-beside-record-bypass` writes `viewAllFields: true` beside either bit in a source migrated with `os migrate meta --from 18`, and nowhere else. It is off the authoring load path, and it is refused by id at the artifact door (`packages/metadata-core/src/artifact-forward-conversion.ts#DEFAULT_FLIPS_NOT_REPLAYED_HERE`) and at every stored-row seam (`packages/spec/src/conversions/stored.ts#STORED_ROWS_NOT_REWRITTEN`). So a permission set stored in `sys_metadata` is read with the protocol 19 meaning and is never rewritten (ruling of record 7177446075, letter A); where its holders should still read every field, the fix is to add `viewAllFields: true` to the entry. The conversion does not keep Modify All's edit vote, and no bit restores it. The error direction is fewer fields read or edited, never a field opened. The lint rule `security-superuser-field-mask-inert` is retired, and `security-cross-set-field-reopen` reports the `viewAllFields` re-open only. The upgrade guidance is the migration entry `permission-view-all-modify-all-cast-no-field-vote`. - **⑨ Authoring-time validation for capability references** *(recorded 2026-07 pre-launch architecture assessment)*. `systemPermissions` / `requiredPermissions` are free strings today; a typo (`mange_users`) fails closed at runtime — the safe direction — but is undiscoverable: nothing reports that the referenced capability exists nowhere. When D1 lands the `sys_permission` registry, add the authoring/publish-gate lint alongside it: referencing an unregistered capability warns at author time (consistent with ADR-0049 honesty and the contract-first Prime Directive — reject at the producer, don't tolerate at the consumer). **Landed (2026-07):** `validateCapabilityReferences` in `@objectstack/lint` warns (never errors — cross-package capabilities and the fail-closed runtime make a hard gate wrong) when a `requiredPermissions` reference resolves against neither the built-in set (`@objectstack/spec` `PLATFORM_CAPABILITY_NAMES`), nor a capability the stack grants via a permission set's `systemPermissions`, nor a `sys_capability` seed row. Wired into `os validate` and `os lint`. `systemPermissions` (the declaration side) is deliberately not flagged. > **Note (2026-10-14) — ⑨'s seed-row source is gone.** With `sys_capability` retired by #15204 diff --git a/docs/adr/0067-commit-history-and-rollback-for-ai-authoring.md b/docs/adr/0067-commit-history-and-rollback-for-ai-authoring.md index 7cce092409f..bc70934eccf 100644 --- a/docs/adr/0067-commit-history-and-rollback-for-ai-authoring.md +++ b/docs/adr/0067-commit-history-and-rollback-for-ai-authoring.md @@ -84,6 +84,8 @@ All metadata writes in a turn execute inside **one `engine.transaction()`**; any - `rollbackToPackageCommit(commitId)` — revert the package's HEAD back through every commit after the target, as one transaction. This is the "一层一层回退" the founder described — **commit-granular, not per-artifact** (§Resolved-1). *(Amended 2026-11-14: not one transaction; one `revertCommit` per commit, each step's failures collected — see the Amendment of that date at the end.)* - Revert restores **metadata** deterministically. Its effect on **data** is governed by §5. +**Note (2026-11-28, #37245; from card #37086, PR #37366, which carried PR #37422).** One kind of item does not revert on its own. The 2026-11-14 Amendment says a revert runs per item, and that stands for every item but a `form`. `revertCommit` walks a commit's plan newest first, with every `form` item after every `view` row the commit edited (`packages/metadata-protocol/src/protocol-package-commits.ts#revertWalkOrder`), and a `form` item is taken back only once each of those rows stands again as it stood before the commit. While one of them is in `failed[]`, the `form` item is put in `failed[]` too, nothing is written for it, and the form stays as published (`packages/metadata-protocol/src/protocol-package-commits.ts#editedViewsNotPutBack`). The scope is the commit, because a plan does not record which form a row carried. The reason is [ADR-0159](./0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md) D5: a `form` publish removes or re-saves the old-shape `view` row that carried the form and records it as an edited row of the same commit, so an undo that took the form back without that row would leave the address with neither. Pinned in `packages/rest/src/public-form-two-type-withdrawal.test.ts` ("a commit revert that cannot put back … its `form` publish edited keeps the form as published and lists it in failed[]"). + ### D4 — The confirm gate, relocated ADR-0045 gated *publish* (a human confirms before anything visible changes). This ADR relocates the gate to the only place revert can't save you: diff --git a/docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md b/docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md index 5b00ade9646..e5ffd816376 100644 --- a/docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md +++ b/docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md @@ -338,6 +338,16 @@ touched in two places, and the rest of it stands. **The amendment declares; the same day; the same record). Datasources were Setup's already; Studio's menu is to stop drawing a row for them (ADR-0084). +> **Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245), from +> [#37238](https://github.com/objectstack-ai/objectstack/issues/37238)).** The amendment above reads "All 30 types" as +> every registered type, and counts 32 at one commit. That number is a reading of that commit, and this decision keeps +> no count: the registry has gained types since (`ai_context`, then `form` and `knowledge_source`) and will gain more. +> "Every registered type" is each entry of +> `packages/spec/src/kernel/metadata-plugin.zod.ts#DEFAULT_METADATA_TYPE_REGISTRY`, however many there are. +> [ADR-0084](./0084-application-builder-information-architecture.md)'s type-to-group table lists them by group, and +> the dated notes under that table say at which commit each reading was taken and which registered type has no row +> yet. This note states no new count. + > **Note (2026-11-24, epic [#36359](https://github.com/objectstack-ai/objectstack/issues/36359)).** D1 and the amendment above > speak of Studio. The running app is an editing surface too, for a workspace administrator. The maintainer's words > on the epic (2026-11-22), quoted in part: 「我同意先做页面上的「编辑」」 · 「按这个改,重画」 · 「而且不需要 studio diff --git a/docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md b/docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md index 788b12ad891..e75a9675a09 100644 --- a/docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md +++ b/docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md @@ -253,6 +253,19 @@ A caller with no package (an environment item, a context-free door, an MCP clien > > Code: `packages/metadata-protocol/src/protocol-save.ts#packagelessHolderRefusal`, the one judgment the four doors ask, and `#disabledHoldersCustomizationRefusal`. Pins: `packages/runtime/src/domains/meta-disabled-holder-served-stack.test.ts` ("the package-unbound row of a name only the disabled D ships is hidden with it", "a package-unbound draft of a name only the disabled D ships", "a package-unbound row beside the disabled holder's own row") and `packages/objectql/src/disabled-holder-packageless-row-doors.test.ts` (review#2 S3). +> **Amendment note (2026-11-28, #37608 — PR #37818; #37851 — PR #37948; carried by #37245).** Two sentences of the 2026-11-26 note above no longer describe `main`. No decision changes: the maintainer's ruling on #37851 (record 7216539589, 2026-11-27, verbatim 「两处都拒绝」) carries the same judgment to the two doors that note left open. +> +> - **The bullet "Not judged yet: the per-item publish and the per-item rollback" is answered.** Both doors now ask the disabled-holders judgment where they name no package, and each refusal is `409 RESOURCE_CONFLICT` with nothing written (`packages/metadata-protocol/src/protocol-history-and-publish.ts#promoteDraftForPublish`, `packages/metadata-protocol/src/protocol-package-commits.ts#rollbackMetaItemUnaudited`; each asks `packages/metadata-protocol/src/protocol-save.ts#packagelessHolderRefusal` for that judgment alone). While every package that holds the name is disabled: +> - a publish that reads the package-less draft or writes the package-less active row is refused, with the enable as its remedy (#37608); +> - a rollback that restores the package-less row is refused, with the enable as its remedy (#37608), and so is a rollback that would store that row again from its history when none is stored now (#37851); +> - a publish of the disabled package's own draft into its own row is refused, and its remedy is to name the package, `?package=` (#37851); +> - a rollback of the disabled package's own row is refused, and its remedy is to name the package, `?package=` (#37851). +> +> So "no write lands on a hidden item" holds for these two doors as it does for the four writes. The last two cells prescribe `?package=` because they write the package's own row. The four-writes bullet's "it is never `?package=`" speaks of the cells where a package-less row or draft is the hidden customization, and it stands for them. Where the ADR-0146 D11 close applies, the publish and the rollback naming no package answer that close first, as the save and the delete do. A publish with no draft stored keeps its `NO_DRAFT`. A publish or a rollback that names the package, and every read, answer as before. +> - **"So what this change newly refuses is the draft discard in every cell" says too much.** Over a stored package-less draft, the draft discard moved from `200` to the `409`. Where it was already refused over a stored package-less row with no draft (the `409` with the `?package=` sentence), only its sentence moved, to the enable sentence. The rest of that sentence stands. +> +> Pins: `packages/objectql/src/disabled-holder-packageless-row-doors.test.ts` ("[ADR-0150 D3, the 2026-11-26 note] the per-item publish and the rollback naming no package, while every holder is disabled"). The upgrade guidance is the migration entry `disabled-holder-package-less-row-bare-write-refused`. + **Two consequences of the rule, as R (#31637) implements it.** - **(a) A package caller never resolves to an environment-authored item by bare name.** A package cannot declare a dependency on the environment, so an environment item is in no package's closure. A name that only an environment item holds is refused for a package caller (`outside-closure`), and the refusal names the environment as the holder. **This is a declared narrowing**, added by this record within the letter of the ruled rule. Today `getItem` serves the bare slot first to every caller (D4's overlay row), so a package flow's `template: welcome` filled by an environment-authored template is served today and refused once its reader is wired. It is carried by the E rows that wire a package caller (E1–E6, E8) and by U only through G1's door: Studio's held id travels as `?package=` (`client.meta.getItem`), so at the door it is the exact qualifier (D5), never a caller. G1 declares what that refuses. It cannot be measured on a package tree (HotCRM holds no environment), so the D10 upgrade report names each such reference as the migration finds it. diff --git a/docs/adr/0158-units-of-measure-standard-unit-table-org-units-quantity-unit-declaration-base-quantity.md b/docs/adr/0158-units-of-measure-standard-unit-table-org-units-quantity-unit-declaration-base-quantity.md index b0b1fa4958d..6eea03339eb 100644 --- a/docs/adr/0158-units-of-measure-standard-unit-table-org-units-quantity-unit-declaration-base-quantity.md +++ b/docs/adr/0158-units-of-measure-standard-unit-table-org-units-quantity-unit-declaration-base-quantity.md @@ -177,6 +177,14 @@ rule: a read grant on the member baseline for a new system object. (`packages/spec/src/system/constants/platform-object-names.ts#PLATFORM_OBJECTS_BY_PACKAGE`), and the name `sys_unit` is ruled. +*Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245); from +[#35498](https://github.com/objectstack-ai/objectstack/issues/35498), built by +[#37389](https://github.com/objectstack-ai/objectstack/pull/37389)):* a standard code never becomes a `sys_unit` row. +The decimal places an organization sets for a standard code are kept in a separate organization-owned object, +`sys_standard_unit_setting` +(`packages/platform-objects/src/system/sys-standard-unit-setting.object.ts#SysStandardUnitSetting`), of which the +platform also ships zero rows. [Open item](#open-items) 10's note of the same date describes it. + ### U4 — Quantity shape > **U4 · Quantity shape.** A `number` field gains a unit declaration that mirrors `currencyConfig`: @@ -207,6 +215,14 @@ admitted by this record. The last sentence is settled under [L4](#l4--u6s-decimals-and-the-fields-scale): the field's `scale` governs storage and is the ceiling, and a unit's decimal places are only its display default. +*Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245); from +[#35498](https://github.com/objectstack-ai/objectstack/issues/35498), built by +[#37389](https://github.com/objectstack-ai/objectstack/pull/37389)):* a unit's decimal places have one home for each +kind of code. An organization's own unit keeps them on its `sys_unit` row, in `decimal_places`. A standard code keeps +them on the organization's `sys_standard_unit_setting` row for that code ([Open item](#open-items) 10, ruled A). U1's +table carries no default, so a standard code with no row has no display default of its own and is drawn at the field's +own width. + ### U7 — Releases > **U7 · Releases.** @@ -281,6 +297,15 @@ Whose each part is: So no ratio lock exists, and no quantity table is scanned for "used". An edited old row is left to a later card, R2's ([Open item](#open-items) 5). +*Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245); from +[#35490](https://github.com/objectstack-ai/objectstack/issues/35490), built by +[#37449](https://github.com/objectstack-ai/objectstack/pull/37449)):* the display of "show the code without a label" +is built. A retired organization unit, a code that is neither a standard code nor a `sys_unit` row the reader can +read, and any organization unit read by someone who may not read `sys_unit` (an external member) are each shown as the +bare code, with no decimal places of the unit's own, and never as an error +(`ui/packages/core/src/utils/unit-display.ts#resolveQuantityUnit`, +`ui/packages/fields/src/widgets/useQuantityUnit.ts#readUnitCatalog`). + ### L2 — Organization-unit label translation > How org-unit labels are translated. No row-data translation mechanism was found. @@ -298,6 +323,21 @@ on the same card; beyond those words it is the seat's settlement, not the mainta The deferred card is [#35404](https://github.com/objectstack-ai/objectstack/issues/35404). +*Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245); from +[#35490](https://github.com/objectstack-ai/objectstack/issues/35490), built by +[#37449](https://github.com/objectstack-ai/objectstack/pull/37449)):* 2A's "platform-shipped per-locale label table" +for standard codes is built in two places, by the maintainer's answer of 2026-11-26 on the display card's decision +card, verbatim 「spec 基准名 + 服务端翻译」 (relayed in claim amendment +[`7183517867`](https://github.com/objectstack-ai/objectstack/issues/35490#issuecomment-7183517867) on that card). The +English base name of every standard code is in the spec +(`packages/spec/src/data/standard-units.ts#STANDARD_UNIT_NAMES`). The platform serves each locale's name as the +message `standardUnit` followed by the code, in the platform-objects bundles +(`packages/platform-objects/src/apps/translations/standard-unit-names.ts#standardUnitMessageKey`), and the English +bundle copies the spec base. A reader whose locale has no served name sees the English base +(`ui/packages/fields/src/widgets/useQuantityUnit.ts#useStandardUnitLabel`). Organization-unit labels are as 2A says: +one label per unit, with their translation left to +[#35404](https://github.com/objectstack-ai/objectstack/issues/35404). + ### L3 — U4's key spellings, and following a parent > The key spellings from U4. @@ -416,6 +456,14 @@ The `scale` it names is the existing key, enforced on writes of a `number` field display default does at render, are [Open item](#open-items) 6. For a standard code, a unit's org-editable decimal places have no home: [Open item](#open-items) 10. +*Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245)):* the last sentence above no +longer holds. A standard code's decimal places have a home, the organization's `sys_standard_unit_setting` row for +that code ([Open item](#open-items) 10, ruled A, built by +[#37389](https://github.com/objectstack-ai/objectstack/pull/37389)). The settlement quoted above binds that value as +it binds an organization unit's: a display default only, never above the field's `scale`, and nothing is rounded at +write by it. What the display default does at render is [Open item](#open-items) 6's second half, settled on the +display card: the display rounds, at the smaller of the unit's decimal places and the field's `scale`. + ## Releases U7 is the ruled plan; this table restates it and adds nothing. @@ -596,6 +644,20 @@ amended with each answer, the way ADR-0144's open items were. ([#35490](https://github.com/objectstack-ai/objectstack/issues/35490)) and the decimal-places setting card ([#35498](https://github.com/objectstack-ai/objectstack/issues/35498)) add them, so nothing reads a required scale today. A declared `scale` stays what L4 names it: the ceiling. The display half stays with R1's display card. + *Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245)), second half:* settled on + the display card ([#35490](https://github.com/objectstack-ai/objectstack/issues/35490), built by + [#37449](https://github.com/objectstack-ai/objectstack/pull/37449)), by the maintainer's answer of 2026-11-26 on + its decision card, verbatim 「A 渲染时四舍五入」 (relayed in claim amendment + [`7183517867`](https://github.com/objectstack-ai/objectstack/issues/35490#issuecomment-7183517867) on that card). + - A quantity's display rounds at render, half away from zero, at a fixed width + (`ui/packages/fields/src/widgets/quantity-format.ts#formatQuantity`). + - The width is the smaller of the unit's decimal places and the field's `scale`, per L4. A field with no `scale` + takes the unit's places. A unit with no places of its own is drawn at the field's own width + (`ui/packages/fields/src/widgets/quantity-format.ts#quantityDisplayPlaces`). + - 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, and + it withholds a `record`-mode quantity's sum. 7. **The release of each declaration.** U7 lists readers; U8 binds each key to its reader's release ([Releases](#releases)). 8. **A unit code with no quantity beside it: a ruling is owed.** U4 puts the unit declaration on the `number` field, @@ -623,6 +685,14 @@ amended with each answer, the way ADR-0144's open items were. standalone `unitMode: 'code'` field the same way it reaches a `unitField`. The field has no quantity beside it, so its blank is owed nothing and is never written, with or without a `""` entry ([#35492](https://github.com/objectstack-ai/objectstack/issues/35492)). + *Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245)):* the picker is built + ([#37471](https://github.com/objectstack-ai/objectstack/issues/37471), by + [#37449](https://github.com/objectstack-ai/objectstack/pull/37449)). A unit code field gets a picker on the form + face: a `text` field with `unitMode: 'code'`, or the `unitField` of a `record`-mode quantity + (`ui/packages/fields/src/widgets/UnitCodeField.tsx#UnitCodeField`). It offers the organization's non-retired units, + then the standard codes, each by its name in the reader's language and restricted to the field's `unitDimension` + (`ui/packages/core/src/utils/unit-display.ts#unitPickerOptions`). It stores the code. Read-only, the field shows + the unit's name, and a retired or unreadable code shows bare. 9. **Which writes U5 judges.** The membership card states it for three cases: a code written; a quantity written beside a resting code that is no longer a member (an org unit deleted under L1); and a quantity written beside a blank code. The two precedents this record mirrors answer differently. The record validator judges a @@ -682,6 +752,16 @@ amended with each answer, the way ADR-0144's open items were. Version Packages release until the backfill door merged (release pairing A, [#35492](https://github.com/objectstack-ai/objectstack/issues/35492) `7037347112`), so no release carries the stricter write without its door. + + *Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245)):* the re-point that the + last bullet above leaves to [#35885](https://github.com/objectstack-ai/objectstack/issues/35885) is built by + [#37268](https://github.com/objectstack-ai/objectstack/pull/37268). A stored `record`-mode quantity whose + `unitField` is re-pointed onto a field that held no stored unit before the save (a field new in that save, or one + that was not stored before it) raises `unit_mode_to_record` on the quantity, for the blank units beside it. A + re-point onto a stored text field that the save makes a unit code field is reported once, as + `unit_code_field_declared` on that field. A re-point onto a field that already was a unit code field still raises + nothing in R1 (the sibling of `currency_field_repointed`). The rest of that bullet stands. Pinned in + `packages/objectql/src/protocol-destructive-unit-mode.test.ts`. 10. **U6's decimal places for a standard code: a ruling is owed.** U3: `sys_unit` "holds org-added units only, and the platform ships zero rows", and org codes live in a namespace no standard code enters. U1 is a closed spec constant. U6 makes a unit's decimal places "an org-editable default" and argues from Rec 20, which is to say from @@ -689,6 +769,39 @@ amended with each answer, the way ADR-0144's open items were. name `sys_unit` fields. For a standard code such as `KGM` or `H87` the value has nowhere to be stored or edited, and R1's display member is its first reader. The question sits between U3 and U6 and owes the maintainer a ruling. Not settled here. + *Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245)):* ruled A on + [#35339](https://github.com/objectstack-ai/objectstack/issues/35339) (record + [`7008551416`](https://github.com/objectstack-ai/objectstack/issues/35339#issuecomment-7008551416), 2026-11-19). + The question, as the decision card put it: 「千克、件这类标准单位显示几位小数,组织能改吗?」. Picked, verbatim: 「组织可改,新开一处设置」. Built on + the decimal-places setting card ([#35498](https://github.com/objectstack-ai/objectstack/issues/35498), by + [#37389](https://github.com/objectstack-ai/objectstack/pull/37389)). The home is a `sys_*` object beside + `sys_unit`, following `sys_unit.decimal_places`, and not a settings key like ADR-0144 D4's + `localization.currency`: `sys_standard_unit_setting` + (`packages/platform-objects/src/system/sys-standard-unit-setting.object.ts#SysStandardUnitSetting`). The seat + settled its shape on that card (claim amendments `7178077326`, `7178144166` and `7179529249`): + - **One row per standard code an organization has set.** `code` is a `text` column admitted by a format rule over + exactly U1's codes, in exact uppercase. It is unique within the organization and immutable after create. The + platform ships zero rows. + - **`decimal_places`** is a whole number from 0 to 12, `sys_unit`'s range, and is required. L4 binds it as it + binds an organization unit's: a display default only, never above the field's `scale`, and nothing rounds at + write. + - **Clearing is deleting the row.** The standard code then has no display default of its own. While a row remains, + the organization's own delete is refused `409 DELETE_RESTRICTED`. + - **Grants.** Every member reads it (`member_default`, read only). `organization_admin` creates, edits and + deletes. An external member holds no read, as with `sys_unit`. Every create, edit and delete is audited, with + the old and new values kept. + - **Tenancy.** `organization_id` is injected on every row. Under the `isolated` posture the tenant wall keeps + another organization's rows out of every read and write; `single` raises no wall and `group` walls by + membership. + - **The row a display reads** ([#35490](https://github.com/objectstack-ai/objectstack/issues/35490), by + [#37449](https://github.com/objectstack-ai/objectstack/pull/37449)). A standard code's decimal places come from + the row whose `organization_id` matches the record's. A record whose `organization_id` was read and 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 organization unit's places and label come from its own `sys_unit` row, chosen + the same way (`ui/packages/core/src/utils/unit-display.ts#pickRowForOrganization`). + + Pinned in `packages/platform-objects/src/system/sys-standard-unit-setting.object.test.ts` and + `packages/plugins/plugin-security/src/default-permission-sets.standard-unit-setting.integration.test.ts`. 11. **A deleted code created again.** The seat's L1 settlement allows deleting an org unit and makes a unit's code and dimension immutable after create. That does not survive a delete followed by a new create of the same code. A `sys_*` row has no recycle bin, and a deleted row frees its unique value at once @@ -725,6 +838,11 @@ amended with each answer, the way ADR-0144's open items were. delete's own cascade removes its units. It is not built in R1. Until [#35812](https://github.com/objectstack-ai/objectstack/issues/35812) lands, the refusal holds for that cascade too, so an organization that holds a unit cannot be deleted. + *Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245)):* the display card + ([#35490](https://github.com/objectstack-ai/objectstack/issues/35490), built by + [#37449](https://github.com/objectstack-ai/objectstack/pull/37449)) answers the question the note of 2026-11-19 + left to it. A resting row shows a retired unit's bare code, not the label still on file, as L1 wrote for a deleted + unit ([L1](#l1--the-ratio-lock)'s note of the same date). 12. **R1's backfill and its raw aggregates.** The backfill mirrors `os migrate record-currency-codes` loosely. That door writes one code, the operator's, into the rows whose code is blank (`packages/objectql/src/record-currency-backfill.ts#backfillRecordCurrencyCodes`); the unit door rewrites free @@ -789,6 +907,24 @@ amended with each answer, the way ADR-0144's open items were. families is not built and is [#36083](https://github.com/objectstack-ai/objectstack/issues/36083). The sentence above is left as written. + *Note (2026-11-28, [#37245](https://github.com/objectstack-ai/objectstack/issues/37245)):* on the backfill's "Dry + run and apply" point above, the sentence "A preview cut short at its row limit is reported as truncated". Since + [#37268](https://github.com/objectstack-ai/objectstack/pull/37268) (card + [#35885](https://github.com/objectstack-ai/objectstack/issues/35885)), a walk cut short at its row limit judges + only the rows it examined, in a dry run and in an apply run alike. An apply run writes those rows, and the report + says that the rows past the limit were not judged, as the currency backfill's report does. Such a run is not + complete. A mapping entry whose key is itself stored as a unit code, and that no row used, is named in the report + (`packages/objectql/src/unit-code-backfill.ts#backfillUnitCodes`). Pinned in + `packages/objectql/src/unit-code-backfill.test.ts`. +13. **A unit's own refusal of over-precise values at write (added 2026-11-28, + [#37245](https://github.com/objectstack-ai/objectstack/issues/37245); not built).** Open item 6 is settled as + display rounding only, so a value the field's `scale` admits with more places than its unit's decimal places is + stored exactly and shown rounded. An optional rule on a unit could refuse such a value at write instead: refused, + never rounded. That stays within L4, since the field's `scale` remains the ceiling and nothing rounds at write. + The item is carried from the display card ([#35490](https://github.com/objectstack-ai/objectstack/issues/35490)). + Its owner is seat repo:objectstack#5 (area o5-D, `area:data`). No card is open for it; one opens when a consumer + asks. Not settled here. + ## Verification notes Each reading below was taken at `3819afec`. To re-check one, run its command on a newer `origin/main`; the comment diff --git a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md index 468fda42d84..8e335e5d959 100644 --- a/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md +++ b/docs/adr/0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md @@ -108,6 +108,8 @@ Measured on `62692b7f8b` with `git grep -lE "formViews|viewKind: 'form'|viewKind `packages/spec/src/ui/view.zod.ts#defineForm` is a published export, and it is **not** this type's factory: it builds a schema-bound form for Studio's metadata editors (`data.provider: 'schema'`), used by 17 `*.form.ts` modules under `packages/spec/src`. The obvious factory name and the obvious file suffix for the new type both collide with it in meaning. [Ruled question 1](#q1) settles the name: it goes to the new type and the Studio helper is renamed. The suffix follows the name ([D2](#d2)); that step is the owning seat's routing on question 1's logic and is not in the ruling's words. +**Note (2026-11-28, #37245).** The paragraph above is Context: it describes the tree before [ruled question 1](#q1) was carried out, and it is left as written. Its anchor still resolves, onto the opposite meaning. On `main`, `packages/spec/src/ui/view.zod.ts#defineForm` is this type's factory. The Studio helper the paragraph describes is `packages/spec/src/ui/view.zod.ts#defineMetadataForm`, and its modules are named `*.metadata-form.ts`. Both changes landed for card #37086 in PR #37366, which carried PR #37422. + --- ## Decision diff --git a/docs/adr/0160-record-scoped-ai-inquiry.md b/docs/adr/0160-record-scoped-ai-inquiry.md index 4021b018c51..a8405625782 100644 --- a/docs/adr/0160-record-scoped-ai-inquiry.md +++ b/docs/adr/0160-record-scoped-ai-inquiry.md @@ -170,6 +170,11 @@ body: - `orderBy`: `{ field, order }[]`, the shape of `packages/spec/src/data/query.zod.ts#SortNodeSchema`, on the child's own fields only. The direction is spelled `order`; that schema refuses `direction` by name. Without `orderBy` the read names no order, and the rows come in the data engine's order. - `limit`: a positive integer, the most rows this list carries. It is at most the service's row cap for one related list (`packages/services/service-record-context/src/record-context-tools.ts#RECORD_CONTEXT_RELATED_MAX_ROWS`: 20 on `main` at `6211ddf4`, and this record still sets no number). Without `limit` the cap applies. Like the pack's other bounds (**v1 keys** above), a `limit` over the cap is refused at parse and is never lowered silently at call time; `get_record` refuses a `related` `limit` over its own cap the same way. A door whose own page cap is lower than a `limit` that parsed cuts the list at that cap, and the cut is stated like any other ([D3](#d3)). +**Note (2026-11-28, card [objectstack#37245](https://github.com/objectstack-ai/objectstack/issues/37245)).** Two sentences of the bullets above, read against `main`. The review of PR [objectstack#37240](https://github.com/objectstack-ai/objectstack/pull/37240) raised both (record 7155394437). Neither changes a decision. + +- **"A string that only contains braces is a literal."** Read it as "a value that merely contains braces". A comparand is refused only when the whole string is one wrapped token, with or without a leading `$`, so `'acme {x} deal'`, `{a}{b}` and `{{x}}` are literals. That is the platform's rule for a wrapped token (`packages/spec/src/data/context-tokens.zod.ts#FILTER_TOKEN_WRAPPED_RE`), and the pack's parser asks that rule and nothing more (`packages/spec/src/ai/ai-context.zod.ts#comparandRefusal`). +- **"A door whose own page cap is lower than a `limit` that parsed cuts the list at that cap".** When the second amendment was written, the door had no such member. PR [objectstack#37354](https://github.com/objectstack-ai/objectstack/pull/37354) (row 11) added it: `packages/services/service-record-context/src/door.ts#RecordContextDoor.pageCap`, an optional member that the `/mcp` door and the stdio bridge both answer with the deployment's page cap (`packages/types/src/query-read-limits.ts#resolveQueryReadPageCap`). The service asks it once in a call that reads a related list. A list whose cut plus its one probe row would pass the cap is read with at most the cap and cut one row under it, so the probe row still fits and the service still knows whether the cut removed anything. So such a list is cut one row under the door's cap, not at it, and the cut is stated like any other. The same reading applies where [D3](#d3), "The body", says "at the door's page cap", and where point 14 says a door "still cuts the list there". A door without the member, or one that answers no cap, cuts nothing below the service's own cut. Pinned in `packages/services/service-record-context/src/__tests__/record-context-tools.test.ts` ("a door whose page cap is below the cut plus its probe row is asked for at most its cap; the list is cut one row under it, and stated"). + The link filter stays the service's: `where` is joined to it with `$and`, so no `where` can reach a child row of another root. An example, for an application whose current text lives on a child: `where: { is_current: { $eq: true } }`, `orderBy: [{ field: 'sort_no', order: 'asc' }]`. **Declared here, read in row 11.** The three keys land with their render-service reader in one PR ([Implementation split](#implementation-split-after-acceptance), row 11; ADR-0049). Until that PR merges, the schema that row 5 landed (`packages/spec/src/ai/ai-context.zod.ts#AiContextRelatedSchema`) is strict on `object`, `field` and `fields`, and refuses each of the three keys at parse. @@ -237,6 +242,8 @@ The root object's gates are unchanged ([D4](#d4), "Order of judgement"). A root - **The hidden field is one the pack uses structurally.** A hidden lookup in `fields` is a hidden field: it is dropped as above and never expanded. A `related` entry on a child the caller is served, whose link field that caller's schema hides, is a read the record tools refuse this caller, so the whole section is dropped, with the same statement. A `related` entry whose `where` or `orderBy` names a field this caller cannot query on is dropped whole too, with the same statement, and the field is never named (second amendment, 2026-11-25). The fields a caller can query on are the security service's answer for that caller (`packages/spec/src/contracts/security-service.ts#getQueryableFields`), and a field outside that answer is one the caller cannot query on. That is wider than a hidden field. It takes in a field the caller's schema hides, a field the schema shows while field-level security withholds it, a field this caller is served masked, a field that either party may not read when an agent asks on a person's behalf, and a computed field that reads any of these. Rows chosen or ordered by a value disclose it, a masked value included. So where the security plugin is installed, its engine middleware refuses a caller's filter or sort on each such field (`packages/plugins/plugin-security/src/predicate-guard.ts#assertReadableQueryFields`), judged on the one map that answer is computed from (`packages/plugins/plugin-security/src/security-plugin-object-inputs.ts#computeQueryGuardFieldPerms`). The service judges the entry before it reads, so that refusal is never reached and a field-level rule still never refuses a pack. Where there is no such answer, that contract says what a consumer does: every field that declares a masking rule counts as one the caller cannot query on. A masked field listed in `fields` is still carried as served; only filtering or ordering by it drops the section. A `where` or `orderBy` field the published definition lacks is an author defect and fires nothing, as above: the section is left out, and a filter is never read with one of its conditions removed. A hidden `body` field drops the body section, with the same statement. These are field-level rules, so they omit and state. Only an object-level refusal applies to the whole call. A child the caller is not served at all is settled at object level, in step 1: it is left out with the same statement, and it never reaches this rule. - A masked value is carried as served. The render adds no masking and removes none. +**Note (2026-11-28, card [objectstack#37245](https://github.com/objectstack-ai/objectstack/issues/37245)).** On the third bullet above, where it says a `related` entry "whose link field that caller's schema hides" is dropped: the sentence stands as written. Whether the link field takes the rule that `where` and `orderBy` take is held with the owner seat. + This is how ruling 2's sentence — "A field hidden from the caller reads 'not visible to you'" — holds beside ADR-0106 D1, which removes such a field whole because a kept name "still leaks existence". The model is always told that something is not visible. It is told which field only when the caller's own schema already shows that field. **Labels.** A field entry carries `name`, `label` and the value as served, plus a display form where the stored value is not what a person reads: the option label for a select-family field, the display name for a lookup. Labels are the metadata service's at the caller's locale, as ADR-0149 D2 localizes a dataset. @@ -492,6 +499,8 @@ The lanes of rows 5–10 are the epic's, and three of them understate the work. - Row 8's key is a spec key, with its liveness row. - Row 9 has a half in this repository. The maintenance contract in `packages/spec/src/system/constants/platform-tool-names.ts` asks for the tool's name in `#PLATFORM_TOOLS_BY_PACKAGE` and for a `chatbot.tool.get_record_context` label in every pack under `ui/packages/i18n/src/locales/`. The name joins with cloud's registration and not earlier: a group there is the exact set a cloud package registers. So between row 8 and row 9 the `skill.tools[]` lint rule (`packages/lint/src/validate-ai-tool-references.ts`) reports `get_record_context` for a skill kept out of MCP (`mcpPrompt: false`) that declares `context`. The report is a warning, it is expected, and it is true: until row 9 no in-product runtime serves the tool. +**Note (2026-11-28, card [objectstack#37245](https://github.com/objectstack-ai/objectstack/issues/37245)).** The first bullet above names `packages/spec/src/ai/skill.form.ts`. No file of that name is on `main`. PR [objectstack#37366](https://github.com/objectstack-ai/objectstack/pull/37366) renamed the Studio form helper to `packages/spec/src/ui/view.zod.ts#defineMetadataForm` and its modules from `*.form.ts` to `*.metadata-form.ts`, so the precedent is `packages/spec/src/ai/skill.metadata-form.ts#skillForm`. Row 7's form landed beside it, as `packages/spec/src/ai/ai-context.metadata-form.ts#aiContextForm`. + **The seventh amendment's cards (2026-11-27).** The amendment adds no row. Topic objectstack#37853 files the work, and three of its cards build from this record: objectstack#37856 retires `ask_ai` (row 6, [D7](#d7)); objectstack#37861 rewrites the console's focus state ([D6](#d6)); and objectstack-ai/cloud#5113 makes row 9 read on demand and stores the focus with the conversation ([D8](#d8)), with objectstack-ai/cloud#4986 rescoped under it. Two questions the topic's other cards answer are not this record's: where the shell draws the button (objectstack#37858), and which conversation an opening shows (objectstack#37860, under ObjectUI ADR-0057 as card objectstack#37855 amends it). **The epic's "Done when" (seventh amendment, 2026-11-27).** Under "Done when", epic objectstack#36996 read: "On a record page with an `ask_ai` action, in an edition with the in-app assistant, the first answer needs no tool call beyond the context read; the focus survives navigation; the same context is served by `get_record_context` over MCP on the open edition; the open edition shows no AI button." With this amendment it reads: "On a record page, in an edition with the in-app assistant, a new conversation opened from the shell's 「问 AI」 button is about that record, with no `ask_ai` action and no pin. A first question that refers to the record needs no tool call beyond one context read (`get_record` where the object has no pack) and draws no question back about which record is meant; a question that does not refer to the record reads no context. The focus survives navigation; the same context is served by `get_record_context` over MCP on the open edition; the open edition shows no AI button." The epic's body is brought to that wording when this amendment merges. diff --git a/ui/docs/adr/0057-console-ai-chat-one-conversation-docked.md b/ui/docs/adr/0057-console-ai-chat-one-conversation-docked.md index a53b65d5875..33d237d4f21 100644 --- a/ui/docs/adr/0057-console-ai-chat-one-conversation-docked.md +++ b/ui/docs/adr/0057-console-ai-chat-one-conversation-docked.md @@ -439,6 +439,18 @@ and in the dock outside any authorable app. This extends A1's direction ("the `app` axis becomes always present for `build`") to the one surface A1.b had kept product-only. Implemented under objectui#10926. +**Note (2026-11-28, objectstack#37245) — the key, as `main` stands.** No +decision changes. Since objectstack#37720 retired the build chat frontend, the +dock no longer computes the `app:PKG:build` key. Its conversation is keyed on +the product alone in every app, and a turn names the current app only as its +`activeApp`, with no package bound, whether or not a build agent is in the +catalog (`@object-ui/app-shell`, `layout/ChatDockConversation.tsx`; pinned in +`layout/__tests__/ChatDock.requestContext-30043.test.tsx`, "a build agent in +the catalog binds no package"). The Studio copilot that this amendment names +as sharing the thread was removed by the same change. The helper that spells +an app-bound key is now called with a package only by an app's AI inquiry page +(A4), for `ask`. + ## Amendment A3 (2026-11-17, Accepted) — one drawer, maximized in place **What it changes.** §3's focus mode ("`/ai` = the same panel maximized"), A2's @@ -551,6 +563,29 @@ C3) reaches the drawer through those addresses, not through a query parameter on every page. Implemented under objectstack#34608 (the drawer) and objectstack#34610 (building with the app draft in the main area). +**Note (2026-11-28, objectstack#37245) — two lines of the Decision above, as +`main` stands.** No decision changes. The paths are `@object-ui/app-shell`'s. + +- **"Three surfaces keep their own chrome … Studio's copilot in its right + slot".** Studio has no copilot of its own since objectstack#37720 retired + the build chat frontend: the copilot panel and its top-bar entry were + removed, so there is no copilot slot to widen. Studio's right slot holds the + open item's properties (`views/studio-design/StudioRightSlot.tsx`). The + surface still takes an injected panel through its `aiSlot` seam, which + nothing in this repository fills. The other two surfaces the bullet names + are not touched by this note. +- **"It carries the plan-awaiting-approval marker the floating button carried + (objectui#11666)."** No plan is proposed any more: the plan card left with + the build chat (objectstack#37720). The entry still carries the marker. + Since objectstack#37860 (PR objectstack#37970; A5, row 3) it stands for a + write the AI proposed that waits for the user's approval, in any + conversation of the signed-in user, as a mounted chat last read it + (`assistant/writeApprovalPending.ts`, published by + `console/ai/ChatPane.tsx`, read by `layout/AssistantTopBarButton.tsx`). A5's + "Not recorded yet" bullet says that nothing has published to the assistant + bus since objectstack#37720 and that write approvals do not reach it. That + held until objectstack#37970 merged. + ## Amendment A4 (2026-11-27, Accepted) — an app's AI inquiry page **What it changes.** One exception to A3's "One container" ("In the console