Skip to content

Commit a2cb3f5

Browse files
committed
docs(adr): answer the contract review of this week's notes (S1 and N1-N4)
- ADR-0126 section 1.1 note (S1): it said the code-only set is now field, job, api, agent. The registry on main holds more types with no runtime write channel; the note now says four of the table's five tier C types stay there, and that it does not re-measure the table. - ADR-0090 D10 note (N1): the OAuth agent path, not only the /mcp door, is the one performedBy producer here. - ADR-0090 D9 note (N2): the set joins the member baseline only when the deployment declares one, and a host can narrow or decline it per object (SecurityPluginOptions.platformBaselineOverrides). - ADR-0113 note (N3): the engine does compute a current_user.can() formula on a write that picks a permission-gated option. - ADR-0090, ADR-0113, ADR-0151 (N4): an Amended pointer line in each header, where those records index their dated notes. Status lines are untouched. Claude-Session: https://claude.ai/code/session_01L6bhgVHgvc56HEUTseuotH Co-authored-by: Claude <noreply@anthropic.com>
1 parent 46b1cf5 commit a2cb3f5

4 files changed

Lines changed: 15 additions & 7 deletions

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
· **Amended** (2026-10-17, ruling of record 6228728551 on #23960, letter B) — D12 names three kinds of administrator, tenant-level, organization-level and delegated: an organization administrator (`organization_admin` / `organization_admin_no_bypass` for the organization, not a platform administrator) creates and removes `sys_user_position` / `sys_user_permission_set` rows for that organization's members when every set the row distributes has no `*` wildcard superuser bit, no `adminScope` and only `scope: 'org'` capabilities; `admin_full_access`, platform sets, `organization_admin` itself and every delegated set stay outside, and organization-administrator status is conferred by membership grade only. Strict containment and the `everyone` / `guest` anchors are unchanged. See the note under D12.
1111
· **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.
1212
· **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.
13+
· **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.
1314
**Deciders**: ObjectStack Protocol Architects
1415
**Builds on**: [ADR-0049](./0049-no-unenforced-security-properties.md) (enforce-or-remove),
1516
[ADR-0056](./0056-permission-model-landing-verification.md) (permission-model landing verification),
@@ -399,9 +400,10 @@ package-owned sets:
399400
> (`packages/spec/src/contracts/security-service.ts`, implemented in
400401
> `packages/plugins/plugin-security/src/platform-baseline-sets.ts`). Through it a platform service
401402
> 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
403+
> holds through the `everyone` anchor (D5), when the deployment declares one, and which a host can
404+
> narrow or decline per object (`SecurityPluginOptions.platformBaselineOverrides`);
405+
> `member_default` is not written. Condition 2 of that ruling is this sentence: **it is a channel
406+
> for always-on platform services; tenant-installed packages do not use it**. A tenant-installed package still suggests a default set for an
405407
> administrator to accept. The seam admits a set only during boot (it closes at
406408
> `kernel:bootstrapped`), only on objects the contributor itself registers, and only the read and
407409
> create bits, one set per contributor; it refuses a wildcard, every other bit and a row policy,
@@ -539,7 +541,7 @@ alias tax on every API.
539541
> the three keys to hooks as `HookContext.provenance.performedByAgentId`,
540542
> `performedByConversationId` and `performedByConfirmationId`
541543
> (`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.
544+
> `agentId` today; the OAuth agent path is still the one producer here.
543545
> Ruling: the account owner on objectstack-ai/cloud#3826 (「3826 照建议(征询版)」): AI acting on
544546
> behalf of a person, the conversation id and the confirmation id ride the write context through
545547
> the existing `performed_by` / `on_behalf_of` pair, with no new actor vocabulary; ADR-0011's

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
**Status**: Accepted (2026-07-30) — Q1/Q2/Q3 adjudicated same day (uniform semantics; `storage.notNull` spelling; the non-regression invariant unifies `required` and `requiredWhen`). **P0 implemented**: spec knob + parse-seam exclusivity, record-validator null-out rejection, rule-validator non-regression, driver DDL + drift rewired, `field-required-notnull-explicit` conversion. P1 (Console required-marker from the write contract) and P2 (criteria_json flip) follow.
44
**Amended (2026-11-17)** — D1 and D5: a field that declares `required: true` together with its own `visibleWhen` is required **when shown** (maintainer ruling A on #34905, recorded in comment 6956761249). See [Amendment — required when shown](#amendment-2026-11-17--required-when-shown).
5+
**Amended (2026-11-20)** — the author-time fence: a dated note ([#35731](https://github.com/objectstack-ai/objectstack/issues/35731)) records that the formula warning fires only for a formula the form cannot compute (PR #35475). The paragraph is left as written.
56
**Deciders**: ObjectStack Protocol Architects
67
**Builds on**: [ADR-0049](./0049-no-unenforced-security-properties.md) (enforce-or-remove), [ADR-0078](./0078-no-silently-inert-metadata.md) (no silently inert metadata), the #3896/#3929 sharing-criteria case study, `driver-sql/schema-drift.ts` (the drift classifier whose `destructive` class this ADR exists to route around)
78
**Consumers**: `@objectstack/spec` (`FieldSchema`), `@objectstack/objectql` (`validation/record-validator.ts`), `@objectstack/driver-sql` (`sql-driver.ts` column DDL, `schema-drift.ts`), `@objectstack/lint`, objectui form renderers (the required marker)
@@ -394,8 +395,10 @@ older `required` field; for those fields this amendment changes nothing on creat
394395
> judges. Two arms still warn, each with its own message: a formula that reads through a
395396
> reference, calls `label()` or calls `current_user.can()`, or reads such a formula at any depth,
396397
> 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
398+
> required (the engine does compute a `current_user.can()` formula on a write that picks a
399+
> permission-gated option, so that verdict can differ between writes); and a formula that reads
400+
> `os`, or reads such a formula, which the server computes and may waive while the form keeps the
401+
> field required. A formula the form can
399402
> compute draws nothing, and so do a formula that reads the acting user and one served without its
400403
> expression. The other two warnings (a read through a reference field, and `storage.notNull`) are
401404
> unchanged. Still a warning, never a refusal. The paragraph is left as written; read its formula

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ them into three tiers by flags × item provenance (`packages/metadata-protocol/s
101101
> D6) copies an app's capabilities and renames them with the copy when it takes a new namespace
102102
> (`packages/metadata-protocol/src/package-namespace-rename.ts`). Ruled by the maintainer on
103103
> #35157: option A, record 6999763503 (「同意」), and the bound of record 7000639892
104-
> (「接受现有边界」). The code-only set is now field, job, api, agent. The table is left as
104+
> (「接受现有边界」). Of the five types the table lists in tier C, four stay there: field, job,
105+
> api, agent. The registry on `main` holds more types with no runtime write channel, admitted
106+
> after the survey this table records; this note does not re-measure the table, which is left as
105107
> written.
106108
107109
Three real mechanisms operate across those tiers, each invented separately:

‎docs/adr/0151-ai-service-account-a-headless-agent-is-a-registered-principal-of-its-own.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- **Consumers**: `@objectstack/platform-objects` (two `sys_user` columns), `@objectstack/plugin-auth` (the registration, key and lifecycle doors; the session and credential refusal), `@objectstack/core` (key admission carries the kind; the shared assembler stamps the principal), `@objectstack/plugin-security` (the agent ceiling at evaluation and at assignment), `@objectstack/plugin-audit` and `@objectstack/spec` (the hook surface, O4), and in `objectstack-ai/cloud` the licence layer and the console (cloud ADR-0116 D7, cloud#3886, cloud#3820).
1111
- **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.
1212
- **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.
13+
- **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.
1314

1415
---
1516

0 commit comments

Comments
 (0)