Skip to content

Commit 85857b2

Browse files
committed
docs(adr): dated notes bring five ADR passages in step with main
Append-only notes dated 2026-11-20, each beside the passage it corrects; no decision text is rewritten. - ADR-0090 D10 rule 4 and the 2026-09-20 note; ADR-0151 "Leaves unchanged": ExecutionContext.performedBy has a second, server-constructed producer, the in-product AI path (agentId, conversationId, confirmationId), since PR #34018. - ADR-0113 "Author-time fence": the formula visibleWhen warning fires only for a formula the form cannot compute, since PR #35475. - ADR-0149 "Leaves unchanged": every dataset face answers declared members only, ruling 6902027136, PR #34198. - ADR-0126 sections 1.1, 2, 3 and 9: capability is runtime-creatable and overlay-closed, rulings 6999763503 and 7000639892, PR #35261. - ADR-0090 D9: the platform baseline contribution channel is for always-on platform services only, condition 2 of ruling 6837170004, PR #32932. Claude-Session: https://claude.ai/code/session_01L6bhgUU7y15SHQsH8q8y74 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7de1bad commit 85857b2

5 files changed

Lines changed: 95 additions & 0 deletions

‎docs/adr/0090-permission-model-v2-concept-convergence.md‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,24 @@ package-owned sets:
391391
- The D5 install-time suggestion generalizes: a package may suggest bindings to `everyone` **or**
392392
`guest`; the admin confirms each individually.
393393

394+
> **Note (2026-11-20, #35731) — the platform baseline contribution channel is for always-on
395+
> platform services only.** D9 refuses builtin permission sets that packages write into, and a
396+
> package reaches `everyone` only by a suggestion the admin confirms (the bullet above). PR #32932
397+
> (`fd637471`, #32754) added one narrower channel, on the maintainer's ruling 6837170004 on
398+
> #32754 (letter B): `ISecurityService.contributePlatformBaselineSet(contributor, set)`
399+
> (`packages/spec/src/contracts/security-service.ts`, implemented in
400+
> `packages/plugins/plugin-security/src/platform-baseline-sets.ts`). Through it a platform service
401+
> contributes one permission set of its own, which joins the member baseline every signed-in member
402+
> holds through the `everyone` anchor (D5); `member_default` is not written. Condition 2 of that
403+
> ruling is this sentence: **it is a channel for always-on platform services; tenant-installed
404+
> packages do not use it**. A tenant-installed package still suggests a default set for an
405+
> administrator to accept. The seam admits a set only during boot (it closes at
406+
> `kernel:bootstrapped`), only on objects the contributor itself registers, and only the read and
407+
> create bits, one set per contributor; it refuses a wildcard, every other bit and a row policy,
408+
> and logs each admission and refusal. Its one contributor on `main` is the storage service's
409+
> attachment set (`packages/services/service-storage/src/attachment-member-grant.ts`). D9 is left
410+
> as written; read it with this note.
411+
394412
### D10 — Principal taxonomy; agents act on intersected authority
395413

396414
> **Status (2026-07):** the P1 ctx *shape* shipped pre-launch as written below; the agent
@@ -502,6 +520,32 @@ alias tax on every API.
502520
> a sibling can be added without re-shaping a shipped field; it reserves the room, ⛔ not the name.
503521
> Ruling: director seat, batch #195 item 2, maintainer 「同意」 2026-09-20 — letter **C**.
504522
523+
> **Note (2026-11-20, #35731) — `performedBy` has a second producer: the in-product AI path.**
524+
> Rule 4 above says a caller of any kind other than an agent principal records the principal it
525+
> authenticates as, with the missing `performed_by` as the record that it acted for itself, and
526+
> the 2026-09-20 status note calls `performedBy` a one-key object. Both matched `main` until
527+
> PR #34018 (`2539ad98`, #33786). Since then
528+
> `packages/spec/src/kernel/execution-context.zod.ts#performedBy` names two server-side
529+
> producers, each in its own key. The `/mcp` OAuth door sets `clientId`, as before
530+
> (`packages/core/src/security/assemble-execution-context.ts#entryFields`). The
531+
> server-constructed in-product AI path, which writes AS the signed-in person (`principalKind`
532+
> stays `'human'`, no `onBehalfOf`, the person's own grants), sets `agentId`, with
533+
> `conversationId` and, when the person confirmed the call, `confirmationId`. A present
534+
> `performedBy` names `clientId` or `agentId`, or is refused at parse. That producer stamps an
535+
> id only after the server resolved it in its own store for the person in `userId` (the agent
536+
> it actually ran, a conversation that person owns, a pending item that person's approval
537+
> decided), so the refusal of caller-controlled ids above (`traceId`, `requestId`) stays whole;
538+
> the room for a run id stays reserved, and `conversationId` is not that id. The engine copies
539+
> the three keys to hooks as `HookContext.provenance.performedByAgentId`,
540+
> `performedByConversationId` and `performedByConfirmationId`
541+
> (`packages/objectql/src/engine-execution-plumbing.ts`). No code in this repository stamps
542+
> `agentId` today; the `/mcp` door is still the one producer here.
543+
> Ruling: the account owner on objectstack-ai/cloud#3826 (「3826 照建议(征询版)」): AI acting on
544+
> behalf of a person, the conversation id and the confirmation id ride the write context through
545+
> the existing `performed_by` / `on_behalf_of` pair, with no new actor vocabulary; ADR-0011's
546+
> 2026-11-15 amendment note records the same ruling chain for phase 1. Rule 4 and the 2026-09-20
547+
> note are left as written; read them with this note.
548+
505549
#### Amendment (2026-10-31, #28367) — the agent forward credential (rule 5) [ruled]
506550

507551
**What this decides.** How an agent principal crosses an `api` action's in-process forward. A

‎docs/adr/0113-required-write-contract-vs-column-constraint.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,23 @@ is not a parse refusal like the Q1 rider, because the protocol-17
384384
`field-required-notnull-explicit` conversion stamped `storage.notNull` onto every
385385
older `required` field; for those fields this amendment changes nothing on create.
386386

387+
> **Note (2026-11-20, #35731) — the formula warning fires only for a formula the form cannot
388+
> compute.** The paragraph above warns on a `required` field's `visibleWhen` that reads any
389+
> `formula` field. Since PR #35475 (`7702f091`, #35190) the lint rule
390+
> (`packages/lint/src/required-visible-when-formula-issue.ts`) and the Studio field-inspector
391+
> advisory (`requiredVisibleWhenReference.ts`, the same verdict) warn only when a formula the
392+
> predicate reads is one the form cannot compute, because the form now computes the object's
393+
> formulas over the record being edited (`planObjectFormulas`) and judges the value the server
394+
> judges. Two arms still warn, each with its own message: a formula that reads through a
395+
> reference, calls `label()` or calls `current_user.can()`, or reads such a formula at any depth,
396+
> which the write path cannot compute either, so the predicate counts as shown and the field stays
397+
> required on every write; and a formula that reads `os`, or reads such a formula, which the
398+
> server computes and may waive while the form keeps the field required. A formula the form can
399+
> compute draws nothing, and so do a formula that reads the acting user and one served without its
400+
> expression. The other two warnings (a read through a reference field, and `storage.notNull`) are
401+
> unchanged. Still a warning, never a refusal. The paragraph is left as written; read its formula
402+
> warning with this note.
403+
387404
**Not in scope.** Only the object field's own `visibleWhen`. A field group's
388405
`visibleWhen`, a form view's field or section predicate, a hidden tab and static
389406
`hidden` are not read: the validator does not consume view metadata (ruled on

‎docs/adr/0126-packaged-metadata-customization-model.md‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,22 @@ them into three tiers by flags × item provenance (`packages/metadata-protocol/s
8787
| **B — runtime-create only** | object, hook, seed, mapping, page, app, action, dataset, flow, datasource, external_catalog, doc, book, permission, position, tool, skill | **not customized at all** — writes against the packaged item answer 403 `NOT_OVERRIDABLE`; only brand-new sibling items can be authored |
8888
| **C — code-only** | field, job, api, capability, agent | nothing — no runtime write channel exists |
8989

90+
> **Note (2026-11-20, #35731) — `capability` is no longer code-only.** The table above, measured
91+
> when this record was written, puts `capability` in tier C, with no runtime write channel; §2,
92+
> §3 and §9 repeat it. Since PR #35261 (`6ffa816e`, part of #35157) `capability` is
93+
> runtime-creatable and overlay-closed: its `DEFAULT_METADATA_TYPE_REGISTRY` entry
94+
> (`packages/spec/src/kernel/metadata-plugin.zod.ts`) reads `allowRuntimeCreate: true`,
95+
> `allowEnvironmentOverlay: false` and `supportsOverlay: false`, the tier-B posture. A brand-new
96+
> capability can be saved in the environment, and a packaged declaration cannot be re-declared or
97+
> re-scoped there. The save door refuses a platform capability name and a name another holder
98+
> already declares before anything is stored, and judges the body by `CapabilityDeclarationSchema`
99+
> (`packages/metadata-protocol/src/protocol-save-door-refusals.ts`). An unmanaged copy (ADR-0131
100+
> D6) copies an app's capabilities and renames them with the copy when it takes a new namespace
101+
> (`packages/metadata-protocol/src/package-namespace-rename.ts`). Ruled by the maintainer on
102+
> #35157: option A, record 6999763503 (「同意」), and the bound of record 7000639892
103+
> (「接受现有边界」). The code-only set is now field, job, api, agent. The table is left as
104+
> written.
105+
90106
Three real mechanisms operate across those tiers, each invented separately:
91107

92108
- **Org overlay** (ADR-0005): tier A only. Per-org rows for any other type are **phantom writes**
@@ -160,6 +176,12 @@ the artifact are live at once, or when a customization is wrong?**
160176
disable switch** — the same posture as `job`. The registry flags are untouched: authoring a
161177
brand-new sibling hook stays open, exactly as today.
162178

179+
> **Note (2026-11-20, #35731).** `capability` has left this list: since PR #35261 (`6ffa816e`)
180+
> it is runtime-creatable and overlay-closed, on the maintainer's ruling 6999763503 on #35157
181+
> (option A, with the bound of record 7000639892). Customizing a packaged capability is still
182+
> not possible; a new one can be authored in the environment. See the note under §1.1. The
183+
> bullet is left as written.
184+
163185
A **new metadata type** (or newly admitted dynamic kind) must declare its regime at admission,
164186
in its registry-entry comment, using this rule. A customization mechanism that fits none of the
165187
three regimes is not a gap in this ADR — it is a signal the mechanism is wrong (Prime Directive
@@ -179,6 +201,12 @@ From the survey's per-type table; classes are the survey's measurements, not asp
179201
| **outside** | field, job, api, capability, agent (code-only) · **hook** (amendment ruling 1 — package code maintaining the package's own invariants; no ledger row, no disable switch; sibling authoring open as today) · seed, external_catalog (one-shot / derived — nothing durable to customize) · datasource (origin-gated: code-defined read-only, runtime-created free) | Recorded so their absence from the regimes reads as decided, not overlooked. |
180202
| **unassigned, deliberately** | page, dataset, doc, book, mapping | Presentational/content tier-B types with no measured customization pull beyond re-authoring a sibling. Today's posture (locked base + free sibling authoring) stands. First real pull picks a regime **by the D1 rule** — likely O via the ADR-0005 admission pair (page/dataset/book) — and does so in an ADR-0005 revision, not ad hoc. |
181203

204+
> **Note (2026-11-20, #35731).** The **outside** row above lists `capability` as code-only.
205+
> Since PR #35261 (`6ffa816e`) it is runtime-creatable and overlay-closed (ruling 6999763503 on
206+
> #35157, option A, with the bound of record 7000639892): a packaged declaration stays locked, and
207+
> a new capability can be authored in the environment. The ruling assigned it no regime, and
208+
> this note assigns none. See the note under §1.1. The row is left as written.
209+
182210
Two clarifications the survey forces:
183211

184212
- **Managed extension fields** (`plugin-auth/src/managed-extension-fields.ts`) are **not** a
@@ -495,6 +523,10 @@ callers first, or don't), and preserves "packaged code calls what it names".
495523
clone's references stay pointed at what the original pointed at, and the surface tells the
496524
admin so).
497525
- Reopening any code-only type (field, job, api, capability, agent).
526+
> **Note (2026-11-20, #35731).** For `capability` this item was reopened: the maintainer's
527+
> ruling 6999763503 on #35157 (option A, 「同意」) made it runtime-creatable, overlay stays
528+
> closed, and PR #35261 (`6ffa816e`) implements it. The other four code-only types stay as this
529+
> item says. See the note under §1.1. The item is left as written.
498530
- Any edit to `packages/spec` for the ledger itself (it is a platform object; §4).
499531

500532
## 10. Consequences

‎docs/adr/0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- **Builds on**: [ADR-0021](./0021-analytics-dataset-semantic-layer.md) (the `dataset` semantic layer this record gives the AI; its D-A compiles a dataset to the Cube runtime, its D-C puts RLS inside the runtime, and its Correction of 2026-05-31, re-measured here: of its three unexecuted keys two are since retired and one executes), [ADR-0071](./0071-dataset-semantic-layer-depth.md) (multi-hop `include`, the only cross-object reach a dataset has), [ADR-0049](./0049-no-unenforced-security-properties.md) (enforce-or-remove — every key below names its reader; the `apiEnabled` exposure door every dataset face asks), [ADR-0011](./0011-actions-as-ai-tools.md) (the AI acts through declared tools, not through raw access), [ADR-0090](./0090-permission-model-v2-concept-convergence.md) D10 (an agent acts on intersected authority; a narrowed read arrives with the narrowing stated), [ADR-0100](./0100-credential-field-channels.md) (`internal` fields are refused on every analytics face), [ADR-0037](./0037-live-canvas-draft-preview.md) (the preview face of `queryDataset`), [ADR-0139](./0139-engine-internal-semi-join-leaf-readable-parent-ids.md) D1 and D3 (the engine-internal ReadableIds leaf, and the driver's compile-it-or-refuse rule the native face follows by declining), [ADR-0112](./0112-error-code-vocabulary-and-ledger.md) (the refusal envelope the tools answer in), [ADR-0078](./0078-no-silently-inert-metadata.md) (why a key with no reader is refused rather than parsed clean).
88
- **Amends**: nothing in `docs/adr/`. It retires two spec prescriptions — the `description` guidance entries on `DatasetDimensionSchema` / `DatasetMeasureSchema` and `DATASET_MEMBER_NO_DESCRIPTION` in the translation schema — under [M1](#m1--where-the-ai-facing-text-of-a-measure-or-dimension-lives), ruled A; child card 1 carries the retirement. Those prescriptions were written when a member description had no reader (ADR-0078); the reader this record adds is what changes the answer, not the rule.
99
- **Leaves unchanged**: the dataset author surface except the four keys in D1 (`object`, `include`, `filter`, `field`, `aggregate`, `derived`, `duration`, `polarity`, `format`, `protection`, `overrides` all as they are); every existing analytics face and its gate chain (`/analytics/query`, `/analytics/sql`, `/analytics/dataset/query`, the dashboard and report renderers); the Cube layer (`CubeSchema`, `getMeta`); the existing MCP object tools (`list_objects`, `describe_object`, `query_records`, `get_record`, `aggregate_records`) and their OAuth scope mapping; what the ADR-0021 Correction's three keys have since become on `QuerySchema` (`joins` and `windowFunctions` retired, `having` executed engine-side) — nothing here reads, revives or widens any of them.
10+
> **Note (2026-11-20, #35731) — every dataset face answers declared members only.** The bullet above lists `/analytics/dataset/query` and its gate chain as unchanged. By the maintainer's ruling 6902027136 on #34005 (「REST 也拒绝(收紧)」), PR #34198 (`898655a9`) changed it: a dataset selection names only the measures and dimensions its dataset declares. The one rule is `undeclaredSelectionMembers` (`packages/services/service-analytics/src/dataset-declared-members.ts`), asked inside `IAnalyticsService.queryDataset` (`packages/services/service-analytics/src/analytics-service.ts#answerDataset`) after the dataset compiles and before anything is read, so it reaches every face that calls it: the REST door, single and batch (`packages/rest/src/analytics-routes.ts`), `query_dataset` (which also asks it itself, `dataset-tools.ts`), the MCP bridges on both transports, the dashboard and report renderers that read through the REST door, and the publish build probes (`packages/metadata-protocol/src/build-probes.ts`). A member the dataset does not declare, in `measures`, `dimensions` or a `timeDimensions` entry, is refused with 400 `INVALID_FIELD`; a spelling qualified by the dataset's name is not a declared name. An inline dataset (a Studio draft) is judged against its own declaration. The other entries hold as written: `/analytics/query` (the cube door, which keeps its ad-hoc members), `/analytics/sql`, the Cube layer and the MCP object tools are unchanged. The bullet is left as written; read its `/analytics/dataset/query` entry with this note.
1011
- **Consumers**: `@objectstack/spec` (the four keys, their aliases, guidance and validation; the two tools' input/output schemas; the translation-group keys; the liveness ledger rows), `@objectstack/service-analytics` (the compiler writes member descriptions onto the Cube; one module builds the dataset catalogue, matches terms, and runs `query_dataset` through `IAnalyticsService.queryDataset`), `@objectstack/mcp` + `@objectstack/runtime` (the bridge seams and the registration of the two tools under `data:read`, on both transports), `objectstack-ai/cloud` (service-ai's tool registry registers the same two definitions; 问数's planner applies the selection rule; `ask-accuracy` gains the business-term set — cloud#3825 item 3), `examples/app-crm` and `objectstack-ai/hotcrm` (their shipped datasets gain synonyms and descriptions, as the first authored vocabulary).
1112

1213
---

0 commit comments

Comments
 (0)