diff --git a/docs/adr/0027-metadata-authoring-lifecycle.md b/docs/adr/0027-metadata-authoring-lifecycle.md index 0b56b31d859..f1017d43ec6 100644 --- a/docs/adr/0027-metadata-authoring-lifecycle.md +++ b/docs/adr/0027-metadata-authoring-lifecycle.md @@ -398,6 +398,21 @@ production DDL later, collaboration last. | **M4 — Advanced migration & DX** | Zero-downtime prod changes; full surface parity | expand-contract migrations · data backfill expressions · drift detection / health checks · CLI/AI/Git surface parity · marketplace dependency resolution | high (zero-downtime correctness) | additive to M2 executor | | **M5 — Collaboration** | Multi-author teams | edit locks → branch + merge → concurrent drafts; **retire §9 flat `package_id` rows** (migrate to version-bound) | high (merge semantics) | final consolidation | +> **Note (2026-11-24, [#36511](https://github.com/objectstack-ai/objectstack/issues/36511) of epic +> [#36510](https://github.com/objectstack-ai/objectstack/issues/36510)).** Row M2's "explicit, batched publish" is no longer +> how a person's edit goes live. The maintainer on the epic (2026-11-22), verbatim: +> 「studio目前的设计是不是太技术,通常每个元数据修改完直接点保存不就行了吗?除了AI会批量改,人类通常是改一个确认一个,是否建议调整」. +> In Studio's designers a person's Save writes the item's draft and then publishes that one item +> (`POST /api/v1/meta/:type/:name/publish`), so the edit is live at once +> (`ui/packages/app-shell/src/views/studio-design/studioSaveBar.tsx#publishSavedItem`; PRs +> [#36597](https://github.com/objectstack-ai/objectstack/pull/36597), +> [#36634](https://github.com/objectstack-ai/objectstack/pull/36634) and +> [#36652](https://github.com/objectstack-ai/objectstack/pull/36652)). Drafts and the package's batch publish +> (`POST /api/v1/packages/:id/publish-drafts`) remain, for an AI's changes. Studio's generic item page still has its +> own Save and Publish; [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md) +> D1's amendment of 2026-11-24 declares its move to the same model. The table is left as written; read row M2 with +> this note. + **Recommended MVP cut:** **M0 + M1 + M2** is the smallest end-to-end product — it delivers the whole "edit → stage → preview → publish → live" loop a low-code user expects, defers all the genuinely hard parts (cross-env promotion, diff --git a/docs/adr/0037-live-canvas-draft-preview.md b/docs/adr/0037-live-canvas-draft-preview.md index 15f276abd9c..e5cce53178f 100644 --- a/docs/adr/0037-live-canvas-draft-preview.md +++ b/docs/adr/0037-live-canvas-draft-preview.md @@ -129,6 +129,8 @@ Discussion after the proposal surfaced the integration question: the AI's design All write paths converge on the same draft rows; **Publish remains the single commit gate** shared by every surface. +> **Note (2026-11-24, [#36511](https://github.com/objectstack-ai/objectstack/issues/36511) of epic [#36510](https://github.com/objectstack-ai/objectstack/issues/36510); built by [#36597](https://github.com/objectstack-ai/objectstack/pull/36597), [#36634](https://github.com/objectstack-ai/objectstack/pull/36634) and [#36652](https://github.com/objectstack-ai/objectstack/pull/36652)).** A person's Save in Studio's designers still writes the item's draft row, and the item still goes live only through a publish. That publish is now the item's own, issued by the Save itself (`ui/packages/app-shell/src/views/studio-design/studioSaveBar.tsx#publishSavedItem`): a person editing sees no separate Publish step. The top bar's Publish, the package's batch gate, is drawn only while a draft is pending: an AI's draft, or a person's from Studio's generic item page, which still saves drafts until [ADR-0146](./0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md) D1's amendment of 2026-11-24 is built. So Publish remains the commit gate for those drafts, and is no longer a step of a person's edit in a designer. The sentence above is left as written; read "the single commit gate shared by every surface" with this note. + **Boundary rules (each one is a "we will NOT build"):** 1. **One truth.** The canvas has NO store of its own — no "AI workspace" parallel repository. It renders the same `sys_metadata` rows Studio edits. diff --git a/docs/adr/0050-form-layout-vs-presentation.md b/docs/adr/0050-form-layout-vs-presentation.md index 30d38318d0d..79915c82573 100644 --- a/docs/adr/0050-form-layout-vs-presentation.md +++ b/docs/adr/0050-form-layout-vs-presentation.md @@ -1,6 +1,6 @@ # ADR-0050: Form layout vs presentation — split the overloaded `FormView.type` -**Status**: Accepted (2026-10-28, letter A′ on #27032, ruling record 6464210455) — cutover card #27155 (spec) + #27159 (renderer); the 2026-10-20 amendment stands · **Amended** (2026-10-20, letter B′ on [#24692](https://github.com/objectstack-ai/objectstack/issues/24692), ruling record [`6281834942`](https://github.com/objectstack-ai/objectstack/issues/24692#issuecomment-6281834942), maintainer 「同意」) — the list add-record open mode is no longer declared on `addRecord`; see the note under Decision 2. +**Status**: Accepted (2026-10-28, letter A′ on #27032, ruling record 6464210455) — cutover card #27155 (spec) + #27159 (renderer); the 2026-10-20 amendment stands · **Amended** (2026-10-20, letter B′ on [#24692](https://github.com/objectstack-ai/objectstack/issues/24692), ruling record [`6281834942`](https://github.com/objectstack-ai/objectstack/issues/24692#issuecomment-6281834942), maintainer 「同意」) — the list add-record open mode is no longer declared on `addRecord`; see the note under Decision 2. · **Amended** (2026-11-24, [#36086](https://github.com/objectstack-ai/objectstack/issues/36086)) — two dated notes under Decision 2: on an object's list `navigation.mode` is deprecated and no longer picks how a record opens ([#35910](https://github.com/objectstack-ai/objectstack/pull/35910)), and the console's record create and edit forms are the object's own, no longer an internal form view ([#36543](https://github.com/objectstack-ai/objectstack/pull/36543)). Decision 2 and its 2026-10-20 note are left as written. **Deciders**: ObjectStack Protocol Architects **Builds on**: [ADR-0014](./0014-record-form-field-type.md) (record form field type), [ADR-0017](./0017-object-has-many-view.md) (object-bound views), [ADR-0049](./0049-no-unenforced-security-properties.md) (declared ≠ enforced discipline) **Consumers**: `@objectstack/spec` (`ui/view.zod.ts` `FormViewSchema`), `@object-ui/plugin-form` (`ObjectForm` + `TabbedForm`/`WizardForm`/`SplitForm`/`DrawerForm`/`ModalForm`), `@object-ui/app-shell` (`RecordFormPage`, `AppContent`, `useActionModal`), examples + templates form views. @@ -43,6 +43,10 @@ So `drawer`/`modal`/`split` *as `FormView.type` values* are **redundant with — > **Note (2026-10-20, ruling record [`6281834942`](https://github.com/objectstack-ai/objectstack/issues/24692#issuecomment-6281834942)):** the list add-record open mode is no longer declared on `addRecord` — `addRecord.mode` and `addRecord.formView` were retired (ADR-0049 enforce-or-remove); the create form is chosen by convention (`formViews.create` when declared, else `form` / `formViews.default`), how it opens stays the renderer's, and a per-list open mode, if ever wanted, is the list's existing `navigation.mode`, never a second enum. + > **Note (2026-11-24, [#35854](https://github.com/objectstack-ai/objectstack/issues/35854), ruling record [`7039654214`](https://github.com/objectstack-ai/objectstack/issues/35854#issuecomment-7039654214), maintainer 「废弃」; built by [#35910](https://github.com/objectstack-ai/objectstack/pull/35910)):** the note above names the list's `navigation.mode` as where a per-list open mode would live. On an object's list (a list view, an object's `listViews`) that key is now deprecated and no longer picks how a record opens. The console has one rule there for every reader: the record's name opens the full page, and the icon shown beside the name while the row is hovered opens the side panel (`ui/packages/app-shell/src/views/objectViewOpenAsPage.tsx#OpenInSidePanelButton`). On such a list `drawer`, `page` and `new_window` still parse and change nothing. `none` still means the rows open nothing (`preventNavigation: true` is the preferred spelling), and `openNewTab: true` still opens the page in a new tab. A page block that carries `navigation` (a list block, the timeline, an embedded view) still honours every value. The 2026-10-20 note is left as written; read its last clause with this note. + + > **Note (2026-11-24, [#36425](https://github.com/objectstack-ai/objectstack/issues/36425); built by [#36543](https://github.com/objectstack-ai/objectstack/pull/36543)):** the 2026-10-20 note says the create form is chosen by convention from the object's form views. The console no longer chooses one. Its record create and edit forms (the New and Edit dialog, the full-page form, and a create or edit an action opens) are the object's own: they list the object's fields, less a `showOnCreate: false` field on a create (`ui/packages/app-shell/src/utils/recordFormFields.ts#recordFormFieldNames`), laid out by the object's `fieldGroups` and following the rules on its fields. An internal form view (`formViews.create`, `form`, `formViews.default`) still installs and steers nothing there. A form view still decides its own form in two places: a public form (`sharing.enabled: true`), and a named form a `form`-type action opens. The 2026-10-20 note is left as written; read its convention clause with this note. + 3. **Remove `split` from `FormView.type`.** Master-detail is already `subforms` (single-record parent/child) + the list's `NavigationMode:'split'` (list+detail). A form-level `split` is a third, redundant spelling. 4. **`ObjectForm` drops its `drawer`/`modal`/`split` branches** (`DrawerForm`/`ModalForm` become caller-supplied containers; `SplitForm` retires in favour of `subforms`). It keeps `simple`/`tabbed`/`wizard`. diff --git a/docs/adr/0052-audit-is-not-the-activity-feed.md b/docs/adr/0052-audit-is-not-the-activity-feed.md index e2a5e98ab96..db5cc46422f 100644 --- a/docs/adr/0052-audit-is-not-the-activity-feed.md +++ b/docs/adr/0052-audit-is-not-the-activity-feed.md @@ -289,6 +289,33 @@ for genuinely semantic events that a field diff can't express. from becoming change-noise. Enforce-or-remove (ADR-0049) is satisfied: the flag now has a runtime consumer. + > **Note (2026-11-24, [#36290](https://github.com/objectstack-ai/objectstack/issues/36290), + > ruling record [`7076513167`](https://github.com/objectstack-ai/objectstack/issues/36290#issuecomment-7076513167)).** + > The opt-in default above is reversed. The maintainer's choices on the card, verbatim: + > 「默认显示,可逐个关闭」 and 「能看这个字段的人」. A changed field's old and new values now show on + > the record's activity timeline by default, on every object, with no flag. One rule decides it + > (`packages/spec/src/data/field-history-default.ts#resolveFieldHistory`): + > + > - An object turns the values off for all its fields with `enable.fieldHistory: false`. + > - A field turns its own off with `fieldHistory: false`. `trackHistory: false` is not an off + > switch: it reads as unset. + > - A credential field never shows them. + > - A type whose value has no one-line text, such as media, an embedded structured value, a + > vector or a signature (`FIELD_HISTORY_DEFAULT_OFF_TYPES`, same file), shows them only when + > the field opts in with `fieldHistory: true` or the older `trackHistory: true`. + > + > The object's `enable.trackHistory` keeps its meaning, the ledger view on the record page and + > the derived `history` verb, and turns no values off. A member sees the entries of every record + > they can open, and an entry serves a field's values only to a reader who is served that field + > (`packages/plugins/plugin-audit/src/activity-field-redaction.ts#redactActivityRows`). The audit + > ledger (`sys_audit_log`) is still not granted to members. Built by + > [#36399](https://github.com/objectstack-ai/objectstack/pull/36399), + > [#36580](https://github.com/objectstack-ai/objectstack/pull/36580), + > [#36613](https://github.com/objectstack-ai/objectstack/pull/36613), + > [#36641](https://github.com/objectstack-ai/objectstack/pull/36641) and + > [#36661](https://github.com/objectstack-ai/objectstack/pull/36661). Item 1 is left as written; read + > its opt-in sentence with this note. + 2. **Object-level milestone templates (P1, declarative).** For semantic events a raw diff can't name — *"Deal won — {name} ({amount})"* when `stage` enters `closed_won`, *"Case resolved — {subject}"* when `status` enters `resolved`. diff --git a/docs/adr/0066-unified-authorization-model.md b/docs/adr/0066-unified-authorization-model.md index a616b4229e4..a3a6e1da851 100644 --- a/docs/adr/0066-unified-authorization-model.md +++ b/docs/adr/0066-unified-authorization-model.md @@ -1,6 +1,6 @@ # ADR-0066: Unified authorization model — capability registry, secure-by-default posture, resource→capability contracts, dual-surface gates -**Status**: Accepted (2026-06-23) — D1–D5 + refinements ⑤/⑨ implemented (capability registry + `defineCapability` seeding, `access.default` posture with posture-gated superuser bypass, `requiredPermissions` AND-gates on object/field/action, `crudBucketForOperation`, `validateCapabilityReferences` lint); D4's UI half enforced in objectui ActionRunner. · **Amended** (2026-10-14, [ADR-0131](./0131-total-organization-ownership-no-null-organization-id.md) D2/D3/D13): the stored records this record names — `sys_permission_set` and `sys_capability` — are retired as row objects by #15204 stage 8 (`66949b7729`, 2026-10-13), and the seeders that filled them are retired under ADR-0131 D2; permission sets and capabilities are metadata-registry definitions, and the `sys_user_permission_set` assignment stays. The three-way separation stands; see the notes under the principle, D1, D5 and ⑨. · **Amended** (2026-10-29, ruling of record 6499781492 on #27506 — maintainer, verbatim: 「我们的平台设计目标是 agent 和人类使用同一套系统」「同意」): the browser-only half of D4's 2026-07 api clause is superseded — a `type: 'api'` action whose `target` is a same-origin platform path is dispatched by the platform action door (`POST /api/v1/actions//` and MCP `run_action`), which runs the D4 gate before forwarding; the `target` endpoint stays directly reachable and must still enforce the declared capability itself, the door's gate being the added check; an off-origin api action stays browser-only. The server half lands under #27506; see the note under D4. Landed: the server half by PR #27649 (2026-10-29); step 3, the console, by PR #27793 for #27611 (2026-10-30); the `sys_*` MCP follow-up by PR #27940 for #27681 (2026-10-30, ruling 6513869839) — see the 2026-10-30 note under D4. +**Status**: Accepted (2026-06-23) — D1–D5 + refinements ⑤/⑨ implemented (capability registry + `defineCapability` seeding, `access.default` posture with posture-gated superuser bypass, `requiredPermissions` AND-gates on object/field/action, `crudBucketForOperation`, `validateCapabilityReferences` lint); D4's UI half enforced in objectui ActionRunner. · **Amended** (2026-10-14, [ADR-0131](./0131-total-organization-ownership-no-null-organization-id.md) D2/D3/D13): the stored records this record names — `sys_permission_set` and `sys_capability` — are retired as row objects by #15204 stage 8 (`66949b7729`, 2026-10-13), and the seeders that filled them are retired under ADR-0131 D2; permission sets and capabilities are metadata-registry definitions, and the `sys_user_permission_set` assignment stays. The three-way separation stands; see the notes under the principle, D1, D5 and ⑨. · **Amended** (2026-10-29, ruling of record 6499781492 on #27506 — maintainer, verbatim: 「我们的平台设计目标是 agent 和人类使用同一套系统」「同意」): the browser-only half of D4's 2026-07 api clause is superseded — a `type: 'api'` action whose `target` is a same-origin platform path is dispatched by the platform action door (`POST /api/v1/actions//` and MCP `run_action`), which runs the D4 gate before forwarding; the `target` endpoint stays directly reachable and must still enforce the declared capability itself, the door's gate being the added check; an off-origin api action stays browser-only. The server half lands under #27506; see the note under D4. Landed: the server half by PR #27649 (2026-10-29); step 3, the console, by PR #27793 for #27611 (2026-10-30); the `sys_*` MCP follow-up by PR #27940 for #27681 (2026-10-30, ruling 6513869839) — see the 2026-10-30 note under D4. · **Amended** (2026-11-24, [#36086](https://github.com/objectstack-ai/objectstack/issues/36086), ruling of record 6912661484 on #34365): a permission set may carry `viewAllFields`, a read-only vote on every field of an object, built by [#36085](https://github.com/objectstack-ai/objectstack/pull/36085) — see the 2026-11-24 note under D2 ⑧. D2 ⑧ is left as written. **Deciders**: ObjectStack Protocol Architects **Builds on**: [ADR-0057](./0057-erp-authorization-core-business-units-and-scope-depth.md) (`readScope`/`writeScope` depth: own/unit/unit_and_below/org), [ADR-0058](./0058-expression-and-predicate-surface.md) (CEL predicate surface used by RLS); relates to cloud ADR-0016 (authz open/paid boundary) **Consumers**: `@objectstack/spec` (object/app/permission schemas), `@objectstack/plugin-security` (RLS/FLS compiler + enforcement), `../objectui` (ActionRunner + app/nav gating), `../cloud` (control-plane objects, e.g. `sys_license`) @@ -142,6 +142,8 @@ Captured for the record; **out of scope for Phases 1–4 above**. Each is anchor > **Note (2026-11-02) — a super-user set votes on every field of its object (#29106, ruling of record 6573563853, letter A).** In the field-permission merge, a permission set that holds the super-user bypass on an object now votes on **every** field of that object: `viewAllRecords` votes `readable: true`, and `modifyAllRecords` votes `readable: true` and `editable: true`. View All never grants an edit. Who holds the bypass is the row-level answer: the set's own entry for the object if it has one, otherwise its `'*'` wildcard. One function answers it, `holdsSuperuserBypass` (`packages/core/src/security/effective-object-permissions.ts`). `PermissionEvaluator.superuserBypassSets` reads it directly, and both field merges, `getFieldPermissions` and the row-blind `/auth/me/permissions` merge (`buildEffectiveFieldPermissions`), read it through `superuserFieldVote`. So every reader of the merge answers the same: the list projection, record read, the sort and filter gate, the field-level write gate, `/auth/me/permissions` and `os explain`. Before this, a set that granted the object through its super-user bits but declared no field entry cast no vote, so an app set's `readable: false` hid the field from a platform admin who also held the app set. Union without deny is otherwise unchanged. A caller who holds no super-user set on the object is still narrowed by a declared mask, and a field's `requiredPermissions` capability gate still applies to everyone. One consequence: a set can no longer withhold a field from its own View All / Modify All holders. To withhold a field, grant the object without those bits. Taking a field away from a super-user remains the job of the muting/deny layer ⑦ still owes. > **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 `superuserFieldVote` (`packages/core/src/security/effective-object-permissions.ts#superuserFieldVote`), 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. - **⑨ 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/0085-object-semantic-roles-over-surface-hint-blocks.md b/docs/adr/0085-object-semantic-roles-over-surface-hint-blocks.md index 09a7acc2487..97e8a03b9cd 100644 --- a/docs/adr/0085-object-semantic-roles-over-surface-hint-blocks.md +++ b/docs/adr/0085-object-semantic-roles-over-surface-hint-blocks.md @@ -120,6 +120,26 @@ Keys that merely hide/re-arrange correct information (`hideRelatedTab`, `showRef > field it places lands inside a group's member list, never above the parent's own fields on a > parent that declares no groups. +> **Note (2026-11-23, [#36366](https://github.com/objectstack-ai/objectstack/issues/36366), ruling on +> [#36635](https://github.com/objectstack-ai/objectstack/issues/36635)).** The 2026-11-20 note calls +> `relatedLists` "the one place" where §2's "keys that merely hide/re-arrange correct information +> are rejected at this layer" yields. There are now two places. `actionLayout` is the second, and +> it is a **ruled exception**, by the maintainer's ruling on #36635 (record +> [`7101013317`](https://github.com/objectstack-ai/objectstack/issues/36635#issuecomment-7101013317), +> 「36635 选 A」). This note does not claim that the key passes the admission test. The key only +> re-arranges an object's own actions. Its placement is the one the maintainer asked for on +> 2026-11-22, 「放在对象上,分列表和记录」: `ObjectSchema` and `ObjectExtensionSchema` carry an +> optional `actionLayout` with a `list` arm and a `record` arm +> (`packages/spec/src/data/object-action-layout.ts`), each naming at most three pinned actions in +> order, then the order of the "More" menu. An arm is a scope, not a page. The `record` arm orders +> every surface that draws a record's actions: the record header, the side preview, a phone's +> bottom bar and a list row's menus. The `list` arm has a single reader today, the list page +> toolbar. An object without the key draws as before. On an installed object only its paired +> `.custom` package writes the key (ADR-0146 D10's note of 2026-11-24). The guard keeps its force +> for every other key, above all per-page show/hide switches. Built by +> [#36629](https://github.com/objectstack-ai/objectstack/pull/36629); the row menus by +> [#36815](https://github.com/objectstack-ai/objectstack/pull/36815). + ### 3. Deletions (all evidenced zero-author) - **`detail` block removed from `ObjectSchema`** — all three typed keys. `renderViaSchema` retires *together with* the legacy monolith renderer path in objectui (separate execution PR; the key is only that path's steering wheel, deleting it alone saves nothing). `hideReferenceRail`/`hideRelatedTab` are removed outright (the former is a proven no-op for spec authors; the latter's raison d'être — overriding rail/tab dedup — died with the rail). diff --git a/docs/adr/0090-permission-model-v2-concept-convergence.md b/docs/adr/0090-permission-model-v2-concept-convergence.md index 0f0106ad106..5e3c69c8886 100644 --- a/docs/adr/0090-permission-model-v2-concept-convergence.md +++ b/docs/adr/0090-permission-model-v2-concept-convergence.md @@ -11,6 +11,7 @@ · **Amended** (2026-10-31, ruling of record 6545950368 on #28367, go as shaped) — D10 gains rule 5, the **agent forward credential**: an `api` action's in-process forward carries the agent principal in a credential the server mints itself, bound to that one forward, single-use, short-lived and unreachable out of process, never the caller's token or key and never a human session. Two cells of the credential-kind × target-door table flip from "refuse by name" to "accept with a forward credential" (an OAuth-connected agent at an identity route and at a platform route), and a scope-family rule bounds every target outside MCP. See the amendment under D10. · **Amended** (2026-11-08, [ADR-0151](./0151-ai-service-account-a-headless-agent-is-a-registered-principal-of-its-own.md), proposed, adopted by its merge) — D10 gains a second provenance for an agent principal: a registered **AI service account**, a `sys_user` row of kind `agent` that is its own authorization subject. It holds its own grants under rule 2's ceiling, enforced at evaluation, and authenticates with its own API keys; rule 1's intersection does not apply because it acts for nobody; rule 4 records it as `user_id` and leaves `performedBy` to the OAuth client. The 2026-09-16 note stands: a person's key stays that person's credential. See the note under D10. · **Amended** (2026-11-20, [#35731](https://github.com/objectstack-ai/objectstack/issues/35731)) — dated notes under D9 (the platform baseline contribution channel is for always-on platform services only) and under D10 (`performedBy` has a second producer, the in-product AI path). D9 and D10 are left as written. +· **Amended** (2026-11-24, [#36086](https://github.com/objectstack-ai/objectstack/issues/36086)) — dated notes under D5 (`viewAllFields` joins the high-privilege bits refused on an anchor binding) and under D12 (condition (a) of the organization boundary also refuses `viewAllFields` on `'*'`), both built by [#36085](https://github.com/objectstack-ai/objectstack/pull/36085). D5 and D12 are left as written. **Deciders**: ObjectStack Protocol Architects **Builds on**: [ADR-0049](./0049-no-unenforced-security-properties.md) (enforce-or-remove), [ADR-0056](./0056-permission-model-landing-verification.md) (permission-model landing verification), @@ -317,6 +318,14 @@ Replaces both the `member_default` builtin-set fallback and ADR-0056 D7's defaul > `sys_attachment.uploaded_by`, is one such door: a member removes an attachment they uploaded > and no other. The attachment member grant still carries read and create only. +> **Note (2026-11-24, [#36050](https://github.com/objectstack-ai/objectstack/issues/36050), built by [#36085](https://github.com/objectstack-ai/objectstack/pull/36085)) — +> `viewAllFields` is a high-privilege bit.** The lint bullet's list gains one entry: +> `viewAllFields` on any object entry of a set, the read-only field half of View All +> ([ADR-0066](./0066-unified-authorization-model.md) D2 ⑧, note of 2026-11-24). A set that carries +> it is refused on an `everyone` or `guest` binding, exactly as a set that carries `viewAllRecords` +> is (`packages/spec/src/security/high-privilege.ts#describeHighPrivilegeBits`). The bullet is left +> as written; read its list with this note. + ### D6 — Explain engine is P0; access-matrix snapshots gate publishes A contract `explain(principal, operation, object, record?) → decision + granting path` (which @@ -865,6 +874,15 @@ not just "who did". > it ([ADR-0095](./0095-authz-kernel-tenant-layer-and-posture-ladder.md)'s 2026-10-18 note under > D1), so #24136 keeps the three conditions above and gains no fourth. +> **Note (2026-11-24, [#36050](https://github.com/objectstack-ai/objectstack/issues/36050), built by [#36085](https://github.com/objectstack-ai/objectstack/pull/36085)) — +> condition (a) also refuses `viewAllFields` on `'*'`.** A set whose `objects['*']` entry carries +> `viewAllFields` is outside the organization boundary under condition (a), beside +> `viewAllRecords` and `modifyAllRecords` +> (`packages/plugins/plugin-security/src/delegated-admin-gate.ts#organizationBoundaryFailure`). On +> the wildcard the bit reads every field of every object, the fields other sets hide included. A +> set that carries the bit on a named object only stays inside. No fourth condition is added. The +> 2026-10-17 amendment is left as written; read its condition (a) with this note. + --- ## Consequences diff --git a/docs/adr/0138-guest-model-anonymous-principal-doors-grants-and-organization.md b/docs/adr/0138-guest-model-anonymous-principal-doors-grants-and-organization.md index 4cb1e93be39..e662f9b6334 100644 --- a/docs/adr/0138-guest-model-anonymous-principal-doors-grants-and-organization.md +++ b/docs/adr/0138-guest-model-anonymous-principal-doors-grants-and-organization.md @@ -33,6 +33,10 @@ class-2-shaped door ([the dated note under D2's table](#d2--the-closed-list-of-d recorded on the card in [`7043884056`](https://github.com/objectstack-ai/objectstack/issues/35848#issuecomment-7043884056)) — D2: the restriction profile `os validate --target` reads is admitted to the control-plane discovery role ([the dated note under D2's table](#d2--the-closed-list-of-doors)). +· **Amended** (2026-11-24, ruling C on [#36198](https://github.com/objectstack-ai/objectstack/issues/36198), +recorded on the card in [`7077639745`](https://github.com/objectstack-ai/objectstack/issues/36198#issuecomment-7077639745), +maintainer 「C」) — D2: the restriction profile is served on the unscoped route only; its environment-scoped twin is +withdrawn ([the second dated note under D2's table](#d2--the-closed-list-of-doors)). **Decided by**: the maintainer's ruling on [#22146](https://github.com/objectstack-ai/objectstack/issues/22146) (comment [`6054113537`](https://github.com/objectstack-ai/objectstack/issues/22146#issuecomment-6054113537), decision batch #290 item 1, 2026-10-08, 「22146 同意」): **A on all eight questions, and G2 on the @@ -356,8 +360,7 @@ until that approval it binds nothing. The vendor accept route is unchanged by th (recorded on the card in [`7043884056`](https://github.com/objectstack-ai/objectstack/issues/35848#issuecomment-7043884056); the review record it answers is [`7038862149`](https://github.com/objectstack-ai/objectstack/pull/35838#issuecomment-7038862149), finding F1) admits one more route into the **discovery** role of the control-plane family below, not a door class: -`GET {basePath}/discovery/restriction-profile`, and its environment-scoped twin -`GET {basePath}/environments/:environmentId/discovery/restriction-profile` where environment scoping mounts it. What +`GET {basePath}/discovery/restriction-profile`. What it serves: a constant open profile, a `RestrictionProfileSchema` value that restricts nothing, with `versions { spec, skills }`. Its `allowedFlowNodeTypes` is the profile's whole node-type vocabulary, the approvals plugin's `approval` / `approval_revise` included; it is not a statement of which plugins this kernel runs, so @@ -374,6 +377,19 @@ the handler (`packages/rest/src/discovery-routes.ts#registerDiscoveryEndpoints`) `isAuthGateAllowlisted` would change no answer and would only add a standing exemption, on every mount base, from the ADR-0069 held-user gate and from `shouldDenyAnonymous`. Ledgered in `packages/rest/src/rest-route-ledger.ts`. +**Amended 2026-11-24 — the restriction profile is served on the unscoped route only.** Ruling C on +[#36198](https://github.com/objectstack-ai/objectstack/issues/36198) (2026-11-22, recorded on the card in +[`7077639745`](https://github.com/objectstack-ai/objectstack/issues/36198#issuecomment-7077639745), maintainer 「C」) +withdraws the environment-scoped twin, `GET {basePath}/environments/:environmentId/discovery/restriction-profile`, +which the 2026-11-20 note first admitted beside that route. The note's route clause is rewritten to match, the one +place this amendment changes earlier text. Why: the twin's handler reads no host input, so it answered the constant +open profile for any environment id, including on a host that enforces a narrower profile and serves that one +through its own route on the unscoped path. Nothing read the twin. It is not mounted +(`packages/rest/src/discovery-routes.ts#registerDiscoveryEndpoints`, PR +[#36531](https://github.com/objectstack-ai/objectstack/pull/36531)): a request to it gets the host's ordinary not-found +answer. A server that mounts the scoped base alone (`projectResolution: 'required'`) therefore serves no restriction +profile. The unscoped route is unchanged. + **Outside the guest model by construction**, and not on the list: - the control-plane allowlist (`packages/core/src/security/auth-gate.ts#isAuthGateAllowlisted`: 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 69d859ef732..586740bdaab 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 @@ -305,6 +305,47 @@ Where each of the epic's fifteen decisions is written: | 14 | Human drafts that exist at rollout | this amendment, *One save model* | | 15 | "From Studio" travels in the address | this amendment, *A dashboard or a report opens in the app* | +> **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 +> 打开了」. What is edited there, without opening Studio: +> +> - **The app's layout, in design mode** (`ui/packages/app-shell/src/layout/designMode.tsx`), entered from the +> app-name menu ([D5](#d5)'s note of the same date) and never offered on a phone. It edits the app's menu +> ([#36363](https://github.com/objectstack-ai/objectstack/issues/36363)) and, on an object's pages, which actions are pinned +> in the header ([#36366](https://github.com/objectstack-ai/objectstack/issues/36366), the object's `actionLayout`, +> [D10](#d10)'s notes). Changes are staged: Save commits them together, Cancel drops them. +> - **A dashboard, on its own page** ([#36372](https://github.com/objectstack-ai/objectstack/issues/36372)), and **a report, on +> its builder page** ([#36374](https://github.com/objectstack-ai/objectstack/issues/36374)). Each has its own Save. Design +> mode and these two editors exclude each other +> ([#36692](https://github.com/objectstack-ai/objectstack/issues/36692)). +> - **A list or kanban view's settings, on the view** +> ([#35955](https://github.com/objectstack-ai/objectstack/issues/35955), +> [#36370](https://github.com/objectstack-ai/objectstack/issues/36370)). +> +> Each save is one item's. The item's draft is written with the first-write pin and that item is published in the +> same act (`ui/packages/app-shell/src/views/runtime-metadata-persistence.ts#saveAndPublishRuntimeMetadata`, ruling +> record [`7058616478`](https://github.com/objectstack-ai/objectstack/issues/35955#issuecomment-7058616478)). Over a draft +> already pending on the item nothing is written and the save says so: a draft left in Studio is never overwritten, +> and never published on its saver's behalf. Every write is judged again by the server's metadata doors. +> +> Where a save lands follows [D2](#d2) and [D3](#d3) for the menu, the action arrangement and a dashboard: the +> item's own package when the server lists it writable, otherwise the paired `.custom` package, asked of the ensure +> door. There the app and a dashboard are written as declared overrides, and the action arrangement as the pair's +> object extension ([D10](#d10)). A view created in the app is saved into the app's package when that is writable, +> otherwise into its pair. A report's save, and a change to an existing view's settings, name no package: the server +> addresses the item's stored row in a package when its rows are bound to exactly one, and the package-unbound row +> otherwise. +> +> Built by [#36397](https://github.com/objectstack-ai/objectstack/pull/36397) (the mode), +> [#36437](https://github.com/objectstack-ai/objectstack/pull/36437) (the menu), +> [#36629](https://github.com/objectstack-ai/objectstack/pull/36629) (the action arrangement), +> [#36405](https://github.com/objectstack-ai/objectstack/pull/36405) (the dashboard), +> [#36644](https://github.com/objectstack-ai/objectstack/pull/36644) (the report builder), +> [#36411](https://github.com/objectstack-ai/objectstack/pull/36411) (the kanban's view settings) and +> [#36848](https://github.com/objectstack-ai/objectstack/pull/36848) (the two editors apart from the mode). D1 and the +> amendment above are left as written; read "Studio owns all metadata" with this note. + ### D2 — One mechanism: a customization of an installed package is an item of its paired `.custom` package, and overriding an existing item is a declaration in that item's body {#d2} **Where a customization lives.** Every change a customer makes to an installed base — HotCRM — is an item of the @@ -621,6 +662,30 @@ still draw nothing. (#27356 row 12, letter B; landed as PR #28076, 2026-10-30.) Maintainer, verbatim: 「「Edit {app} in Studio」代码包/已安装包一律不画,合理吗?ai写完代码,人类需要进去确认啊」. +> **Note (2026-11-24, [#36363](https://github.com/objectstack-ai/objectstack/issues/36363), +> [#36485](https://github.com/objectstack-ai/objectstack/issues/36485) and +> [#36758](https://github.com/objectstack-ai/objectstack/issues/36758)).** D5 names two places that draw the bridge, the app +> switcher row and the app bar entry. From 768 px up the app shell now draws no top bar, and the page's button group +> carries nothing that opens Studio or edits the app (`ui/packages/app-shell/src/layout/ShellPageActions.tsx`, PR +> [#36621](https://github.com/objectstack-ai/objectstack/pull/36621)). There the entries are two rows of the sidebar's +> app-name menu (`ui/packages/app-shell/src/layout/SidebarAppMenu.tsx`, PR +> [#36789](https://github.com/objectstack-ai/objectstack/pull/36789); the maintainer's ruling on #36758: +> 「编辑布局+编辑应用两行」, and on the wording, 「设计布局 编辑应用」): +> +> - **"Design layout"** (zh 「设计布局」) turns on the design mode for the app on screen ([D1](#d1)'s note of the +> same date) and opens no Studio. It is drawn for the principals D5's gate admits, for a writable package and a +> read-only one alike. On an installed app the mode's changes are saved as this environment's customization, in the +> App's paired `.custom` package ([D3](#d3); PR [#36437](https://github.com/objectstack-ai/objectstack/pull/36437)). For a +> read-only package it is not drawn where the customization door is walled off for the caller: an organization wall, +> and a caller who is not a platform administrator. +> - **"Edit app"** (zh 「编辑应用」) is D5's bridge: it opens the app's package in Studio. For a read-only package the +> row reads "View in Studio" (zh 「在 Studio 中查看」) behind an eye, never a pencil. +> +> Where a top bar is still drawn, below 768 px and on an app's documentation pages, D5's two places are as D5 says: +> the app switcher's Studio row keeps the pencil or the eye, and so does the bar's own entry where the bar has room +> for it. Kernel packages and an unread or failed package list still draw nothing. D5 is left as written; read "the +> app bar entry" with this note. + ### D6 — Not done, recorded so silence cannot be read as consent {#d6} - **No per-organization override.** ADR-0131 D6's environment scope stands: `.custom` is the environment's package; @@ -783,6 +848,37 @@ name suffixed, the base untouched (N-23c). > automatic arrangement stays and the boot log names the placement. Studio shows such an item read-only with its > source package, as it shows a contributed item ([D3](#d3)). +> **Note (2026-11-24, [#36498](https://github.com/objectstack-ai/objectstack/issues/36498), built by +> [#36517](https://github.com/objectstack-ai/objectstack/pull/36517)).** The rule of the 2026-11-22 note has one exception: +> the paired `.custom` package of the App the object belongs to. Maintainer, verbatim: +> 「软件包字段、子表自定义分三种,原始软件包,继承软件包和环境管理员覆盖,继承软件包 我记得已经有一套标准,只能申明插入位置,原始软件包、环境管理员 +> 应该可以申明完整的配置」. The pair's object extension may declare `fieldGroups` and `relatedLists`, in the shape an +> object declares them in. Each key it writes replaces, whole, the result of the base's arrangement and every +> extension's placements; a key it does not write keeps that result. Nothing is merged entry by entry. A field no +> group lists still shows, after the last group. A tab no entry names still shows, after the listed ones: only +> `{ list, hidden: true }` hides it. The registry fold applies the pair's keys last, after the placements +> (`packages/objectql/src/registry-custom-arrangement.ts#applyCustomArrangement`). +> +> Any other package that writes either key on an extension is refused by one judge +> (`packages/metadata-protocol/src/protocol-extension-arrangement.ts#judgeExtensionArrangement`): at the save, the +> restore and the draft promotion of the item (`VALIDATION_ERROR` / 400), at `os validate` and `os build`, and at +> marketplace install. The refusal prescribes `place`. A `.custom` package that is not the object's pair is not +> applied, and the boot log names it. Where the App's pair and a per-package pair an earlier version created both +> write a key, the App's pair is served ([D3](#d3)). The 2026-11-22 note is left as written; read "the base's +> arrangement stays the base's" with this note. + +> **Note (2026-11-24, [#36366](https://github.com/objectstack-ai/objectstack/issues/36366), built by +> [#36629](https://github.com/objectstack-ai/objectstack/pull/36629)).** `actionLayout` is the third key of that exception +> (`packages/spec/src/data/field-customization.ts#CUSTOM_ARRANGEMENT_KEYS`). It arranges an object's actions for one +> scope each, in a `list` arm and a `record` arm +> ([ADR-0085](./0085-object-semantic-roles-over-surface-hint-blocks.md) §2's note of 2026-11-23). On an object +> extension only the object's paired `.custom` package may write it. Any other package is refused by the same judge +> at the same doors; for this key the refusal prescribes the action's own `locations` and `order`. Each arm the pair +> writes replaces the served arm for that scope, whole; an arm it does not write stays. The server's doors refuse the +> shape, not the reference: a name that is no action of the object, or one not placed in the arm's scope, is refused +> by design mode's Save and by the CLI rule +> (`packages/lint/src/validate-object-action-layout.ts#validateObjectActionLayout`) only. + ### D11 — Migration, then closure: package-less overlay rows become declared overrides, the package-less write closes, and the stopgaps retire {#d11} - **Migrate** (N-16, Q5). Every `sys_metadata` row with `package_id` NULL that overlays an item a code package ships diff --git a/docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md b/docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md index 8a44d15c6dc..9d8eb8ec1c8 100644 --- a/docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md +++ b/docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md @@ -189,6 +189,16 @@ Why the platform computes `matches` instead of leaving the whole rule to the mod > - **What this note amends, and what the amended sentences first said.** This note amends rule 1 in place, and it narrows the point ruled on #34691, fork F1, option B, which the note above records as "offered for a question and never selected". The narrowing is for a dimension offered to a term whose candidates are all dimensions: it is put in no question, and it may be used as the grouping the question asked for with no choice put to the person first. Both halves of that point are narrowed for it, "never selected" included. A measure candidate, and every candidate of a term with a measure among its candidates, stays as ruled: offered for a question and never selected. Rule 1's parenthesis read "(it may be offered in rule 3's question, never acted on)": neither half holds for such a dimension. The third point of the note above opened "With candidates, the AI asks in rule 3's form and acts on none." and ended at "the choice is the person's." Two sentences stand as written and are read with this scope: the headline of the note above ("offered for a question and never selected") and the option C point of the note under rule 1 ("offer such a word for a question"). > - **State on `main`.** The executor and both texts landed with PR #35156. This PR changes no executor and no shape. It brings one more text to the same sentence: step 2 of the published ask skill (`skills/objectstack-ask/SKILL.md`), which `GET /mcp/skill` serves. The spec carries the scope and not the sentence: the `candidates` description of `packages/spec/src/ai/dataset-tools.zod.ts#ListDatasetsOutputSchema` and the doc comment of `packages/spec/src/ai/dataset-tools.zod.ts#DatasetTermCandidateSchema` say what such a term's candidates are offered for, a possible grouping and not a question, and give the reader no instruction, because AI guidance text does not enter the spec ([M1](#m1--where-the-ai-facing-text-of-a-measure-or-dimension-lives), ruled A). +> **Amendment note (2026-11-24, [#34996](https://github.com/objectstack-ai/objectstack/issues/34996) — PR [#36509](https://github.com/objectstack-ai/objectstack/pull/36509)): for an unknown word beside a grouping word, rule 4 governs the unknown word, and rule 5 is the rule for a question that names no number.** +> Rules 4 and 5 both apply to a call such as `["sales orders", "status"]`, where one word matches nothing and another matches only a dimension. The rules above do not say which governs. +> +> - **The reading.** A word with no measure hit, no dimension hit and no candidate, sent beside a grouping word, is read as the word for the thing measured. That is rule 4: the labelled fallback to the object query tools, and nothing is asked. +> - **Rule 5 keeps the question that names no number.** The executor writes "which number is meant" outright only where the words settle it: every word sent equals only a dimension, or has only dimensions among its candidates (`packages/services/service-analytics/src/dataset-next-step.ts#composeDatasetNextStep`). +> - **The conditional sentence.** The reading is a presumption. The unknown word may be a filter value or a second grouping, in a question that names no number. The executor sees words, not which of them names the number, so the client judges: beside a fallback the `list_datasets` note ends with one conditional sentence, "Only when the question has no word for a thing measured, ask the user which number they mean instead." The unconditional question is never written beside a fallback sentence. `list_datasets`' description (`packages/services/service-analytics/src/dataset-tools.ts#LIST_DATASETS_DESCRIPTION`) states the same reading. +> - **Not covered.** A call with no grouping word and only an unknown word (`["west region"]`) gets the fallback sentence without that closing condition. +> - **What does not change.** What counts as a hit (rule 1), and `decision`, `terms`, `matches` and `candidates`. A word that equals several measures, and a word with a measure among its candidates, are still asked about (the notes of 2026-11-17 and 2026-11-19). +> - **State on `main`.** Landed with PR #36509. The card stays open for its evaluation round. + ### D4 — Permissions: the tools add no gate and bypass none Measured in [Context](#the-executor-and-its-gate-chain-measured-on-originmain). The binding statements: diff --git a/docs/adr/0151-ai-service-account-a-headless-agent-is-a-registered-principal-of-its-own.md b/docs/adr/0151-ai-service-account-a-headless-agent-is-a-registered-principal-of-its-own.md index 52aa5e42bec..153dfbc2de5 100644 --- a/docs/adr/0151-ai-service-account-a-headless-agent-is-a-registered-principal-of-its-own.md +++ b/docs/adr/0151-ai-service-account-a-headless-agent-is-a-registered-principal-of-its-own.md @@ -11,6 +11,7 @@ - **Amended** (2026-11-10, [#32060](https://github.com/objectstack-ai/objectstack/issues/32060)): a dated note under [What builds on this](#what-builds-on-this) records what O3 and O4 shipped. The status line above is left as it is. - **Amended** (2026-11-15, [#33689](https://github.com/objectstack-ai/objectstack/issues/33689)): a dated note under [D3](#d3--its-authority-its-own-grants-under-the-agent-ceiling) records that rule 3 holds unchanged under the amended action-confirmation contract. The status line above is left as it is. - **Amended** (2026-11-20, [#35731](https://github.com/objectstack-ai/objectstack/issues/35731)): a dated note under **Leaves unchanged** records the second producer of `performedBy`, the in-product AI path. The status line above is left as it is. +- **Amended** (2026-11-24, [#36086](https://github.com/objectstack-ai/objectstack/issues/36086)): a dated note under [D3](#d3--its-authority-its-own-grants-under-the-agent-ceiling) records that the agent ceiling also clears `viewAllFields`. The status line above is left as it is. --- @@ -100,6 +101,14 @@ ADR-0118 refused a seeded "system" pseudo-user for two reasons: seeding writes t > as before, and it refuses an account through > `packages/runtime/src/action-execution.ts#isAiServiceAccountCaller` whatever the call sends. +> **Amendment note (2026-11-24, [#36050](https://github.com/objectstack-ai/objectstack/issues/36050) — PR [#36085](https://github.com/objectstack-ai/objectstack/pull/36085)): the ceiling also clears `viewAllFields`.** +> The fourth bullet's list gains one bit. `viewAllFields` is the read-only field half of View All +> ([ADR-0066](./0066-unified-authorization-model.md) D2 ⑧, note of 2026-11-24). The clamp at evaluation clears it on +> every `objects` entry, the `'*'` wildcard included, beside `viewAllRecords` and `modifyAllRecords` +> (`packages/plugins/plugin-security/src/agent-ceiling-clamp.ts#AGENT_CEILING_OBJECT_KEYS`), and assigning a set +> that carries it to an account is refused by name. Left standing, the bit would let an agent principal read every +> field another of its sets hides. The bullet is left as written; read its list with this note. + ### D4 — Its credentials: dedicated API keys, minted by a person - **API keys, one or many.** Each key row carries `user_id` = the account and `active_organization_id` = the account's organization. An account may hold several keys (rotation, one per deployment); they remain one identity. 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 c76231389bb..b0b1fa4958d 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 @@ -1,6 +1,6 @@ # ADR-0158: Units of measure — a closed standard unit table in the spec, organization-owned units, a quantity field that names its unit, and a base quantity stored at write -**Status**: Accepted — 2026-11-19, ruled on objectstack#35339 (ruling record [`7001193034`](https://github.com/objectstack-ai/objectstack/issues/35339#issuecomment-7001193034), maintainer 「先不考虑 hotsrm,先处理平台任务,你的意见我同意」); L1 picked by the maintainer the same day on a decision card, option A 「可改,只影响以后」 (ruling record [`7003532733`](https://github.com/objectstack-ai/objectstack/issues/35339#issuecomment-7003532733)), and the rest of L1 and L2 settled by the owning seat, per the analysis recommendation. `docs/adr/**` is Tier H (Prime Directive #14): this record lands by an authorised approval and the maintainer's merge. **This record declares; it implements nothing** — no schema, no code, no changeset. The R1 cards follow it, as the ruling's "Next" says. · **Amended** (2026-11-20, [#35489](https://github.com/objectstack-ai/objectstack/issues/35489) and [#35492](https://github.com/objectstack-ai/objectstack/issues/35492), under the owning seat's contract review): L3 records the `unitConfig` key as shipped, and Open items 3, 6, 8, 9, 11 and 12 carry the R1 settlements of the membership card and the backfill card. +**Status**: Accepted — 2026-11-19, ruled on objectstack#35339 (ruling record [`7001193034`](https://github.com/objectstack-ai/objectstack/issues/35339#issuecomment-7001193034), maintainer 「先不考虑 hotsrm,先处理平台任务,你的意见我同意」); L1 picked by the maintainer the same day on a decision card, option A 「可改,只影响以后」 (ruling record [`7003532733`](https://github.com/objectstack-ai/objectstack/issues/35339#issuecomment-7003532733)), and the rest of L1 and L2 settled by the owning seat, per the analysis recommendation. `docs/adr/**` is Tier H (Prime Directive #14): this record lands by an authorised approval and the maintainer's merge. **This record declares; it implements nothing** — no schema, no code, no changeset. The R1 cards follow it, as the ruling's "Next" says. · **Amended** (2026-11-20, [#35489](https://github.com/objectstack-ai/objectstack/issues/35489) and [#35492](https://github.com/objectstack-ai/objectstack/issues/35492), under the owning seat's contract review): L3 records the `unitConfig` key as shipped, and Open items 3, 6, 8, 9, 11 and 12 carry the R1 settlements of the membership card and the backfill card. · **Amended** (2026-11-24, [#36086](https://github.com/objectstack-ai/objectstack/issues/36086)): a dated note under Open item 12 records the raw-aggregate set [#36060](https://github.com/objectstack-ai/objectstack/pull/36060) built. The item is left as written. - **Date**: 2026-11-19 - **Decided by**: the maintainer, 2026-11-19T06:01:58Z, in the design discussion for #35339, verbatim and untranslated: @@ -770,6 +770,25 @@ amended with each answer, the way ADR-0144's open items were. The aggregate half stays with [#35491](https://github.com/objectstack-ai/objectstack/issues/35491). + *Note (2026-11-24, [#36086](https://github.com/objectstack-ai/objectstack/issues/36086)):* the aggregate half is + settled on [#35491](https://github.com/objectstack-ai/objectstack/issues/35491) and built by + [#36060](https://github.com/objectstack-ai/objectstack/pull/36060). The raw aggregates are `sum`, `avg`, `min` and + `max` over a `record`-mode quantity. Each is refused unless the query groups by the quantity's own `unitField`. + - **ObjectQL aggregate.** Refused `INVALID_FIELD` / 400 before any driver is asked + (`packages/objectql/src/record-unit-aggregate-door.ts#assertRecordUnitAggregatesGrouped`). + - **`summary` field.** Refused `INVALID_METADATA` / 422 when the object is registered + (`packages/objectql/src/record-unit-aggregate-door.ts#RecordUnitSummaryRefusedError`). A roll-up has no group, + so R1 refuses every roll-up of a `record`-mode quantity, as L3 says. + - **Analytics cube measure.** Refused `INVALID_FIELD` / 400, judged on each query + (`packages/services/service-analytics/src/cube-record-unit-door.ts#assertRecordUnitAggregatesGrouped`). A query + is grouped when one of its dimensions is the unit field on the measure's own object. A filter that pins one + unit is not a grouping. + - **Not judged.** `count` and `count_distinct`, a `fixed`-mode quantity, and a number with no `unitConfig`. + + No error code is added. A dataset is judged when it is queried, as currency is; the build-time guard for both + families is not built and is [#36083](https://github.com/objectstack-ai/objectstack/issues/36083). The sentence + above is left as written. + ## Verification notes Each reading below was taken at `3819afec`. To re-check one, run its command on a newer `origin/main`; the comment