Skip to content

Commit 85c0124

Browse files
docs(adr): ADR-0011 identity-actions addendum records the two SCIM credential actions (#31209)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XEjTSxuJNjTpNnjHFg6tJ6G)_ domain:server#5 · os-project-manager · session_01FEkQ5od974EsY8paGtPt7R Fixes #31124 Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么**:ADR-0011 的「平台身份动作」附录补记 #31032(PR #31119)新增的两个动作:`sys_scim_connection_credential.mint_scim_credential` 进 H 档(仅人工,无 `ai` 块),`revoke_scim_credential` 进 C 档(暴露给 AI,但必须人工确认)。计数按当前 `main` 的代码树实测重写:已评估动作 61 个、`ai` 块 37 个(H 24 / C 18 / E 19)。另记一笔:`sys_user.list_platform_admins`(PR #29427,2026-11-02 并入)晚于评估、不在任何档内,按「未评估即仅人工」记入「Not assessed」段。 - **为什么改**:这张表是审阅 `packages/platform-objects/src/identity/**` 的人判断「哪些平台身份动作 AI 能跑」的唯一记录(维护者已否决自动检查)。#31119 合入后表少记了一个已暴露的动作。 - **风险与回滚**:只改 ADR 文本,不改任何规则句、不加门禁或测试,不发布任何包(`skip-changeset`)。回滚即 revert。 - **先看**:`docs/adr/0011-actions-as-ai-tools.md` 一个文件:① 新增的 2026-11-07 amendment 引文块;② H / C 两个列表末尾各加一个名字与计数;③ 「Not assessed」段新增 `list_platform_admins` 一句。 - **两分钟验证**:对照 `packages/platform-objects/src/identity/sys-scim-connection-credential.object.ts`:`mint_scim_credential` 无 `ai` 块,`revoke_scim_credential` 的 `ai` 块是 `exposed: true, requiresConfirmation: true`;`pnpm check:adr-index && pnpm check:adr-symbol-anchors` 应为 exit 0。 - **需要你做的**:Tier H(`docs/adr/**`):席位按 CONTRACT_REVIEW_TIER 复核通过后,由你合并。 ## What changes One file, `docs/adr/0011-actions-as-ai-tools.md`, inside the 2026-10-30 addendum "the platform identity actions an agent may reach". No rule text moves; the lists and the counts do. - **A dated amendment note** (2026-11-07, #31124), in the form the 2026-10-31 amendment already uses in this addendum: `sys_scim_connection_credential.mint_scim_credential` is assessed **H** (it mints a SCIM bearer credential and answers it once; triage on #31032, comment `6692886264`: "Classify mint as not exposed to AI tools") and `sys_scim_connection_credential.revoke_scim_credential` is assessed **C** (the same triage: "Revoke may be classified on its own merits"; it switches one bearer off, as `sys_api_key.revoke_api_key` does, bounded to that one connection, and hands out no credential and widens no access; no door restores a revoked SCIM credential, so provisioning resumes only by minting a new one — head `f557345434`, from contract review 6710882534). Both shipped in PR #31119, `a794e32c9b` on `main`. - **H list** 23 → 24 (mint appended); **C list** 17 → 18 (revoke appended); E unchanged at 19. - **Counts**, re-measured on the tree (below): "59 actions and 36 `ai` blocks (H 23 / C 17 / E 19)" → "61 assessed actions and 37 `ai` blocks (H 24 / C 18 / E 19); the tree holds one more identity action, unassessed (below)". The two sentences that count the declaring actions move 36 → 37 and 35 → 36 (revoke forwards to `/api/v1/auth/admin/scim/revoke-credential`, under `/api/v1/auth/` like the other 35). The historical reading of the 2026-10-30 assessment ("58 actions in 38 blocks") is untouched; the provenance sentence gains "the two `sys_scim_connection_credential` actions came with the 2026-11-07 amendment". - **Not assessed** gains one sentence: `sys_user.list_platform_admins` (PR #29427, 2026-11-02) postdates the assessment, declares no `ai` block (its own source comment says so), and is unassessed and human-only until a ruling assesses it. It is placed in no bucket: the H test names minting, ownership, sign-in and destruction, and classifying it is a ruling, not a dev's reading. ## Why The addendum is the only record of which platform `sys_*` identity actions an AI agent may reach: the maintainer struck the automatic check (「自动检查 有必要吗?每一个元数据应用都有类似的问题,后续都要检查吗」), so a reviewer of `identity/**` reads this table and nothing else. After PR #31119 it omitted one live AI-exposed action (revoke, C) and one human-only action (mint, H). The card asked for exactly that addendum entry, blocked on #31119 landing; #31119 merged 2026-11-07T14:04Z. ## Tests None added, by the card's ruling: the maintainer struck the automatic check for this table, so this PR adds no gate, test or script. The per-action pins on the two actions' `ai` blocks landed with #31119 (`sys-scim-connection-credential-actions.test.ts`) and are not touched. ## Acceptance notes - **The card's numbers vs the tree.** The card computed H 24 / C 18, 61 actions, 37 `ai` blocks. The tree at `origin/main` `658d84f575` holds **62** actions on the 13 identity objects that declare any, 37 with an `ai` block, 25 without. The 62nd is `sys_user.list_platform_admins` (PR #29427, merged 2026-11-02, after the 2026-10-31 amendment); its source comment reads "No `ai` block: this action postdates the ADR-0011 identity-actions assessment, and an unassessed action stays human-only." The record therefore says 61 assessed (the card's number) and names the unassessed one beside `sys_approval_request`'s 9, rather than silently folding it into H. Whether it should be assessed H (or E, as a read-only roster answer) is a maintainer ruling; named in the report's `open_questions`. - **Every other name in the three lists resolves to an action on the tree** with the declared bucket (H: no `ai` block; C: `exposed: true, requiresConfirmation: true`; E: `exposed: true`, no confirmation), and no action with an `ai` block is unexposed. Measured by a throwaway script importing `packages/platform-objects/src/identity/index.ts` and reading each `sys_*` object's `actions[].ai`; the script is not committed. - **No status-line pointer** was added. ADR-0011's `**Status**:` line carries no pointer for the 2026-10-31 amendment either; this addendum's own convention is the dated blockquote, and the card scoped the edit to the lists and counts. - **Two routes under `/api/v1/auth/admin/scim/`** are plugin-auth's own platform-admin doors (#30991), not better-auth's; the existing sentence "N to the better-auth routes under `/api/v1/auth/`" already counts plugin-auth's `admin/sso/*` and `admin/oauth2/*` doors the same way, so only its number moved. plugin-auth's `scim-connection-admin.ts` header records that an anonymous caller is answered 401 there, which is the behaviour the paragraph describes. Not measured live. - `docs/adr/README.md` is generated (`pnpm check:adr-index`); nothing in it changes, as no ADR title, status or link moved. ## Verification All readings at the final head `c53003ae19`: the ADR commit `2096b75721` on `origin/main` `658d84f575`, then one merge of `origin/main` at `de3996bd55` (two commits, #31177 and #31185, touching neither the ADR nor `identity/**`). The 21-gate sweep was run on both heads with the same result; the exit codes below are the final head's. - `node scripts/pm/dispatch-gates.mjs --tier --repo objectstack-ai/objectstack docs/adr/0011-actions-as-ai-tools.md`: "Model tier — MANDATORY: claude-fable-5-1 … `docs/adr/**` … effort floor at xhigh". The claim (`6710561423`) records the thread's effort as `high`, a declared deviation with the seat's at-tier contract review as the compensating control. - `node scripts/pm/check-governed-merges.mjs --test docs/adr/0011-actions-as-ai-tools.md`: exit 3, "governed-surface predicate: 1 of 1 path(s) hit the register … ⛔ GOVERNED — a human merge is the review record for this PR". - `dispatch-gates --commands` derived 21 families from the diff; all 21 run, exit codes captured before any pipe; `--ran` reconciliation below. <details><summary>Derived gate sweep at `c53003ae19` (21 families, exit codes captured before any pipe; `dispatch-gates --ran`: 21 derived, 21 run, 0 NOT-MEASURED, 0 UNRUN)</summary> ```text node scripts/check-adr-links.mjs :: exit 0 node scripts/check-adr-links.mjs --self-test :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm check:adr-anchors :: exit 0 pnpm check:adr-index :: exit 0 pnpm check:adr-symbol-anchors :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-prior-rulings :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:watch-hint-literal :: exit 0 ``` </details> - `pnpm exec eslint --no-inline-config docs/adr/0011-actions-as-ai-tools.md`: exit 0, "File ignored because no matching configuration was supplied" (eslint has no markdown config; the doc gates above are the style authority). - Control-character self-scan of the file: 0 hits. - Changed lines: 1 file, +24 / −10 (`git diff --shortstat origin/main...HEAD`), under the 3000 human-merge threshold. - Not run: package tests, typecheck, dogfood. The diff touches no package, so no closure build is owed (`check:doc-formula-expressions` needed `@objectstack/formula` and `@objectstack/lint` built, which was done). ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (Not touched.) - [x] 2. Every name I added uses the casing for its kind. (Action names are quoted as declared.) - [x] 3. No formatter ran; `pnpm lint` passes (eslint ignores `.md`; the derived doc gates pass). - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset: this diff publishes nothing (`docs/adr/**` only), `skip-changeset`; both declaration lines are filled in above. - [x] 6. `packages/spec` touched: not touched. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English (the 维护者速读 block is the repo's own Chinese reader section; the maintainer's rulings are quoted verbatim). - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01FEkQ5od974EsY8paGtPt7R <!-- signed: domain:server#5 · os-project-manager · session_01FEkQ5o8PE7ZtVjcor51wBZ --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0f254f4 commit 85c0124

1 file changed

Lines changed: 26 additions & 10 deletions

File tree

‎docs/adr/0011-actions-as-ai-tools.md‎

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,17 @@ three buckets, and the declarations were written in the same change as this adde
329329
> sign-in factor, and `sys_invitation.copy_invitation_link` is assessed H, since it answers the
330330
> invitation's accept link, a bearer credential. The lists below are the amended record.
331331
332-
**H — human-only (23):** `sys_user.impersonate_user` · `sys_user.set_user_password` ·
332+
> Amended (2026-11-07, #31124 — the two actions #31032 added, shipped in PR #31119, `a794e32c9b`):
333+
> `sys_scim_connection_credential.mint_scim_credential` is assessed H, since it mints a SCIM bearer
334+
> credential and answers it once (triage on #31032, `6692886264`: "Classify mint as not exposed to AI
335+
> tools"), and `sys_scim_connection_credential.revoke_scim_credential` is assessed C (the same triage:
336+
> "Revoke may be classified on its own merits"): it switches one bearer off, as `sys_api_key.revoke_api_key`
337+
> does, bounded to that one connection, and it hands out no credential and widens no access. No door
338+
> restores a revoked credential (the revoke door answers `409` on one already revoked, and the only
339+
> write of `active: true` is the mint), so provisioning resumes only by minting a new one. The lists
340+
> below are the amended record.
341+
342+
**H — human-only (24):** `sys_user.impersonate_user` · `sys_user.set_user_password` ·
333343
`sys_user.create_user` · `sys_user.delete_my_account` · `sys_user.change_my_password` ·
334344
`sys_user.change_my_email` · `sys_user.disable_two_factor` · `sys_user.generate_backup_codes` ·
335345
`sys_two_factor.disable_two_factor` · `sys_two_factor.regenerate_backup_codes` ·
@@ -338,15 +348,17 @@ three buckets, and the declarations were written in the same change as this adde
338348
`sys_sso_provider.register_sso_provider` · `sys_sso_provider.register_saml_provider` ·
339349
`sys_sso_provider.verify_domain` · `sys_member.transfer_ownership` · `sys_member.update_member_role` ·
340350
`sys_organization.delete_organization` · `sys_user.enable_two_factor` ·
341-
`sys_two_factor.enable_two_factor` · `sys_invitation.copy_invitation_link`.
351+
`sys_two_factor.enable_two_factor` · `sys_invitation.copy_invitation_link` ·
352+
`sys_scim_connection_credential.mint_scim_credential`.
342353

343-
**C — exposed, confirmed (17):** `sys_user.ban_user` · `sys_user.unban_user` · `sys_user.unlock_user` ·
354+
**C — exposed, confirmed (18):** `sys_user.ban_user` · `sys_user.unban_user` · `sys_user.unlock_user` ·
344355
`sys_user.set_user_manager` · `sys_api_key.revoke_api_key` · `sys_session.revoke_session` ·
345356
`sys_session.revoke_my_other_sessions` · `sys_invitation.cancel_invitation` ·
346357
`sys_invitation.reject_invitation` · `sys_member.remove_member` · `sys_team_member.remove_team_member` ·
347358
`sys_team.remove_team` · `sys_oauth_application.disable_oauth_application` ·
348359
`sys_oauth_application.delete_oauth_application` · `sys_sso_provider.delete_sso_provider` ·
349-
`sys_organization.leave_organization` · `sys_account.unlink_account`.
360+
`sys_organization.leave_organization` · `sys_account.unlink_account` ·
361+
`sys_scim_connection_credential.revoke_scim_credential`.
350362

351363
**E — exposed (19):** `sys_user.invite_user` · `sys_invitation.invite_user` ·
352364
`sys_organization.invite_user` · `sys_member.invite_user` · `sys_invitation.resend_invitation` ·
@@ -357,13 +369,17 @@ three buckets, and the declarations were written in the same change as this adde
357369
`sys_oauth_application.enable_oauth_application` · `sys_user.update_my_profile` ·
358370
`sys_user.resend_verification_email` · `sys_sso_provider.request_domain_verification`.
359371

360-
That is 59 actions and 36 `ai` blocks (H 23 / C 17 / E 19). The 2026-10-30 assessment covered 58
372+
That is 61 assessed actions and 37 `ai` blocks (H 24 / C 18 / E 19); the tree holds one more identity
373+
action, unassessed (below). The 2026-10-30 assessment covered 58
361374
actions in 38 blocks: the card's bucket headers read H 19 and E 22, its name lists, which the ruling
362375
adopted, held 20 and 21, and the names are the record. `sys_invitation.copy_invitation_link`, added
363-
after that assessment, and the two `enable_two_factor` moves came with the 2026-10-31 amendment.
376+
after that assessment, and the two `enable_two_factor` moves came with the 2026-10-31 amendment; the two
377+
`sys_scim_connection_credential` actions came with the 2026-11-07 amendment.
364378

365379
**Not assessed.** `sys_approval_request`'s 9 actions (`plugin-approvals`) are outside this assessment:
366-
they are unassessed and human-only, with no `ai` block, until a maintainer ruling assesses them.
380+
they are unassessed and human-only, with no `ai` block, until a maintainer ruling assesses them. So is
381+
`sys_user.list_platform_admins` (PR #29427, 2026-11-02), the one identity action that postdates the
382+
assessment and is in no bucket above: no `ai` block, human-only, until a ruling assesses it.
367383

368384
**No automatic check.** The maintainer struck the pin test the assessment proposed:
369385
「自动检查 有必要吗?每一个元数据应用都有类似的问题,后续都要检查吗」. This table lives only here; a reviewer
@@ -374,14 +390,14 @@ activation switch.
374390
**How the declarations reach an agent.** Over MCP, a `sys_*` action is listed and run only when the
375391
action itself declares `ai.exposed: true` — ADR-0066 D4's 2026-10-30 note records that mechanism
376392
(`packages/runtime/src/action-execution.ts#systemObjectActionExposureError`). As of this addendum the
377-
36 E and C actions above are the platform `sys_*` actions that declare it. Every gate after admission
393+
37 E and C actions above are the platform `sys_*` actions that declare it. Every gate after admission
378394
still runs: ADR-0066 D4's capability gate, the ADR-0126 §8 activation switch, the
379395
`ai.requiresConfirmation` gate (a C action is refused `428 ACTION_CONFIRMATION_REQUIRED`, nothing run,
380396
until the call carries `confirm: true`; `packages/runtime/src/action-execution.ts#actionConfirmationRefusal`),
381397
and the target's own authorization.
382398

383-
**Declared is not yet runnable for an OAuth-connected agent.** All 36 are `type: 'api'` actions that
384-
forward to an identity route: 35 to the better-auth routes under `/api/v1/auth/`, and
399+
**Declared is not yet runnable for an OAuth-connected agent.** All 37 are `type: 'api'` actions that
400+
forward to an identity route: 36 to the better-auth routes under `/api/v1/auth/`, and
385401
`sys_api_key.revoke_api_key` to the REST data route. Those targets accept a signed-in session, and the
386402
forward of an OAuth-connected agent's call is answered `401` there. Which credentials a forward
387403
target accepts is not decided here; it is the open decision on #28178. Until that lands, an

0 commit comments

Comments
 (0)