Skip to content

fix(plugin-auth): a directory deactivation revokes the user's API keys, and no one restores them - #33075

Merged
objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/project-thread-9vbm8g
Nov 13, 2026
Merged

objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/project-thread-9vbm8g

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Clause-②: yes (widening)
Metadata-protocol: none

Part of #32115 (the API-key half of the "Directory deactivation" item of ruling 6787890900 on #32004; the local-password half is a later step).

维护者速读

  • 改了什么:通过目录(SCIM)停用或删除一个用户时,平台吊销这个用户名下的全部 API 密钥,原因记为"被目录停用"。之后目录重新启用这个用户,旧密钥也不会恢复,用户新建一个密钥即可。管理员自己的封禁和解封不变,本地密码这次不动。
  • 为什么改:落实 [PM seat] security · seat 2 — 🟢 os-justin · high only #32004 裁决 6787890900 的"目录停用"一项:SCIM 停用或删除会吊销该用户的密钥,管理员也不能恢复。去掉目录用户的本地密码是后续一步,所以本 PR 写的是 Part of #32115。
  • 风险与回滚:patch 级。sys_api_key.revoked_reason 多了一个选项 scim_deactivated(Clause-② 扩展,元数据协议不变),11 种语言都已翻译。如果吊销没有全部完成,停用照常生效,服务器记一条 error 日志并写明补救办法,下一次让该用户保持停用的 SCIM 写入会再跑一遍。回滚就是还原本 PR。
  • 先看:packages/plugins/plugin-auth/src/scim-deactivation-key-revocation.ts(吊销规则)、auth-manager.ts 里 reconcileScimUserLifecycle 的停用分支、api-key-restore-guard.ts(这个原因谁都不能恢复)。
  • 两分钟验证:pnpm --filter @objectstack/plugin-auth exec vitest run scim-deactivation-reconcile-user api-key-restore-guard,预期全部通过。
  • 需要你做的:无。这是 draft,由 security#2 席位审阅、翻 ready 并入队;改动约 850 行,不涉及受管路径。

What changes

The rule. Deactivating a user through SCIM (active: false), or deleting one (DELETE /Users/{id}), revokes every API key the user owns. Each key row stays, with revoked: true and revoked_reason: scim_deactivated. A later re-activation lifts the directory's ban and re-arms none of those keys; the person creates a new key. An administrator's own ban and unban are unchanged and leave keys alone. Local passwords are not changed.

  • @objectstack/plugin-auth
    • New scim-deactivation-key-revocation.ts: revokeDirectoryDeactivatedApiKeys(engine, userId) revokes the user's keys, writing as the system with the SCIM connection's attribution, and returns how many were and were not revoked. It never throws.
    • AuthManager#reconcileScimUserLifecycle: the inactive branch (SCIM active: false, and the SCIM delete, which reconciles the user as inactive) runs the revocation after the directory's ban. If it does not finish, the deactivation still lands and one error line names the user, the counts and the remedy.
    • api-key-restore-guard.ts: rule 1 (restored by no one from a user context) now covers scim_deactivated beside organization_membership_ended. The owner's Restore and a platform administrator's are both refused 403 PERMISSION_DENIED, naming the reason and the new-key road.
    • service-account-lifecycle.ts: the AI service account door POST /api/v1/auth/service-account/restore-key writes as the system, so it applies the guard's rule 1 itself; it now refuses scim_deactivated too. The route ledger note says so.
    • Restamping: a key with no reason, admin_password_reset or administrator_suspended is restamped scim_deactivated; a key with organization_membership_ended keeps it, since no one restores either.
  • @objectstack/core: the key door's 403 API_KEY_REVOKED text for scim_deactivated says the key cannot be restored and names the new-key road, and names no restorer.
  • @objectstack/platform-objects: sys_api_key.revoked_reason gains the option scim_deactivated ("Deactivated by the directory"). The column stays readonly and off the ADR-0092 D2 whitelist. The help text names the reason and that no one restores it; every shipped locale carries the option and the help.
  • Generated: the tenant-audit census tables count the new write site, and their prose follows.

Why

Ruling 6787890900 on #32004, item "Directory deactivation": "Deactivating or deleting a user through SCIM revokes that user's API keys, and an administrator cannot restore them. Removing a directory user's local password is a later step."

Verification

All on head fc310c98 unless stated.

  • New tests (names state the rule):
    • scim-deactivation-reconcile-user.test.ts, describe "a directory deactivation revokes the user's API keys, and a re-activation re-arms none of them": deactivate then re-activate (each key revoked: true with scim_deactivated; the key door refuses with API_KEY_REVOKED; the owner's restore is refused; a key minted after re-activation is admitted); the restamp cases; the SCIM delete, including a re-link through the tombstone; CONTROL, an administrator's ban and unban (keys untouched; the door answers refused:owner_banned, then admits); a refused revocation write still bans and logs one error.
    • api-key-restore-guard.test.ts, describe "a key the directory deactivation revoked is restored by no one from a user context" (6 cases: restamp and idempotence, a counted failure, the owner refused, a platform administrator by grant refused, a re-revoke keeps the reason, the door text).
    • service-account-lifecycle.test.ts: "a key the directory deactivation revoked is never restored, not by the owner and not by a platform administrator".
    • api-key-lifecycle.test.ts (core): "a key the directory deactivation revoked names no restorer, only the new-key road".
    • forced-reset-revoke-reason-vocabulary.test.ts: the option list and the help text.
  • Ablation, each run on the commit that added its rule, then restored (ablation-replace.mjs, blob back to HEAD, git diff HEAD empty):
    • the revocation call replaced by a no-op outcome: the 4 deactivation pins go red, the administrator ban/unban CONTROL stays green;
    • the restore-key door's rule 1 without the new reason: its pin goes red (1 of 29).
  • Suites: plugin-auth 266 files, 5,025 passed and 10 skipped (head c69a8ef8; on fc310c98 the 9 touched or neighbouring files, 175 tests, rerun green); core 146 files, 3,369 passed; platform-objects 121 files, 1,955 passed. typecheck (with test typecheck) green for all three packages; pnpm lint green.
  • Gates: dispatch-gates.mjs --ran reconciled 109 derived, 109 run, 0 not measured, every exit code 0, after a full declaration build (check:dts-closure 311/311, check:dual-build-cjs-loads green). check-i18n-bundles --filter=platform-objects in sync. main merged once before opening.

Acceptance notes

  • Surface widened, seat-approved. The order's surface was packages/plugins/plugin-auth/src/** and .changeset/. security#2 approved the widening in the seat thread on 2026-11-13 at 05:57Z (decision "A"): the new reason word scim_deactivated, platform-objects sys-api-key.object.ts with its generated i18n bundles, core src/security/api-key.ts (its refusal text must not offer a restore) and their tests; Clause-②: yes (widening), Metadata-protocol: none; patch changesets on plugin-auth, core and platform-objects. The restamp judgment above was accepted as stated, with the restamp cases and the SCIM delete pinned separately.
  • SCIM delete, measured. The delete removes the SCIM link and keeps a tombstone; the user row and the user's key rows survive it, and the delete reconciles the user as inactive. So the keys are revoked the same way, and the pin covers it.
  • Remainder: removing a directory user's local password ("a later step" in the ruling) is not in this PR.
  • Also in plugin-auth/src: the AI service account restore door applies the guard's rules itself because it writes as the system, so it was taught the new reason in the same change, with its own pin and ablation.
  • The tenant-audit census docs (content/docs/permissions/tenant-audit-census.mdx, docs/audits/2026-08-tenant-audit-write-call-sites.counts.md) are regenerated output plus the counts quoted in their prose (310 sites).

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (packages/spec not touched.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (Not touched.)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibyho66BmvQ2CZsxoWJ

…s, and no one restores them

A SCIM deactivation or delete revokes every API key the user owns with
revoked_reason scim_deactivated; the restore guard refuses every
user-context restore of such a key, a platform administrator's included,
and the key door's revoked text names no restorer. sys_api_key's
revoked_reason select gains the value.

Claude-Session: https://claude.ai/code/session_01L9qibyho66BmvQ2CZsxoWJ
Co-Authored-By: Claude <noreply@anthropic.com>
…ason

Every shipped locale carries the new sys_api_key.revoked_reason option and
the help sentence that names it.

Claude-Session: https://claude.ai/code/session_01L9qibyho66BmvQ2CZsxoWJ
Co-Authored-By: Claude <noreply@anthropic.com>
…ocation write

One more engine write call site on the application surface; the census
and the prose figures it holds are regenerated and restated.

Claude-Session: https://claude.ai/code/session_01L9qibyho66BmvQ2CZsxoWJ
Co-Authored-By: Claude <noreply@anthropic.com>
The tenant-audit census tables were regenerated after the merge, and the
prose counts follow them.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibyho66BmvQ2CZsxoWJ
… the directory deactivation revoked

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibyho66BmvQ2CZsxoWJ
…the directory deactivation reason

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibyho66BmvQ2CZsxoWJ
The tenant-audit census tables were regenerated after the merge, and the
prose counts follow them.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibyho66BmvQ2CZsxoWJ
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 13, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · os-tesla · session_01L9qibwMmGJKaQ52CgHqNu2

Contract review

Served-tier: TIER_DEFAULT
Head-sha: c2e6032948ff50a7bc9bdabce67c74459f26f16e
Local-runs: none

Face: declaration. The paths decide no face (reviewFace on the committed file list: no published schema, no governed path); the changeset and PR body carry Clause-②: yes (widening), so the review is owed at TIER_DEFAULT and this seat writes it. Read: the diff, card #32115 with its ruling and the amended claim 6845457155, and this head's check runs.

① Derived judgments

  • The surface matches the amended claim: one new sys_api_key.revoked_reason option (scim_deactivated) with its field description and the 11 generated translation bundles, the restore guard and the service-account restore door refusing it, the core key door's message for it, and the directory lifecycle write calling the revocation. Nothing outside that list changes behaviour.
  • The census files (content/docs/permissions/tenant-audit-census.mdx, docs/audits/2026-08-tenant-audit-write-call-sites.counts.md) are regenerated artefacts: after the merge of main (4079b06) they count 311 sites, main's one plus the new key-revocation write, which is listed as its own row. Outside those two files the diff is byte-identical to the one read on fc310c98.
  • Restamp rule: a key revoked earlier with a reason someone could lift (no reason, admin_password_reset, administrator_suspended) is restamped; organization_membership_ended and scim_deactivated are kept. This is the judgment approved in the claim, and the tests pin both arms.
  • Re-activation re-arms nothing: the tests cover active:true after active:false, and a re-link after DELETE /Users/{id}, with the key door still refusing.
  • The vocabulary test, the route-ledger note and the service-account lifecycle header all name the new value, so the closed select and the prose that describes it agree.

② Semver level

patch on @objectstack/plugin-auth, @objectstack/core and @objectstack/platform-objects. The widening adds one accepted value to a readonly, server-written select that no client writes; no export is removed and no accepted input is narrowed. Patch fits.

③ Boundary flags

  • Accepted deviation (nit): the revocation is fail-soft. A write that does not land still lets the deprovision succeed, logs once at error with the count, and the next inactive write from the directory repeats it. The ban already shuts every key at the key door, so the gap is covered while it lasts.
  • Nit: the per-call row scan cap (500) returns an incomplete outcome and logs it, but no test drives the cap itself; the write-failure test covers the same incomplete branch.
  • Accepted as the same rule: the service-account restore door refuses scim_deactivated alongside organization_membership_ended.
  • PR author is objectstack-fleet[bot]; no other login to name.

Implemented-by: claude/project-thread-9vbm8g
Reviewed-by: session_01L9qibwMmGJKaQ52CgHqNu2

VERDICT: PASS


Generated by Claude Code

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/core, @objectstack/platform-objects, @objectstack/plugin-auth, touching 28 documentable anchor(s).

12 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/agents.mdx (via /api/v1/keys (route, a path literal in lifecycleRefusalOf; a path literal in membershipEndedRestoreRefused; a path literal in noRestorerRefused))
  • content/docs/ai/connect-mcp.mdx (via /api/v1/keys (route, a path literal in lifecycleRefusalOf; a path literal in membershipEndedRestoreRefused; a path literal in noRestorerRefused))
  • content/docs/api/error-catalog.mdx (via /api/v1/keys (route, a path literal in lifecycleRefusalOf; a path literal in membershipEndedRestoreRefused; a path literal in noRestorerRefused))
  • content/docs/api/index.mdx (via /api/v1/keys (route, a path literal in lifecycleRefusalOf; a path literal in membershipEndedRestoreRefused; a path literal in noRestorerRefused))
  • content/docs/deployment/environment-variables.mdx (via /api/v1/keys (route, a path literal in lifecycleRefusalOf; a path literal in membershipEndedRestoreRefused; a path literal in noRestorerRefused))
  • content/docs/getting-started/build-with-claude-code.mdx (via /api/v1/keys (route, a path literal in lifecycleRefusalOf; a path literal in membershipEndedRestoreRefused; a path literal in noRestorerRefused))
  • content/docs/kernel/contracts/auth-service.mdx (via AuthManager (symbol, a top-level class))
  • content/docs/kernel/services-checklist.mdx (via AuthManager (symbol, a top-level class))
  • content/docs/permissions/authentication.mdx (via AuthManager (symbol, a top-level class), apiKeys (symbol, a field of interface ScimDeactivationKeyRevocationOutcome), revoked_reason (literal, a string literal in revokeDirectoryDeactivatedApiKeys), scim_deactivated (literal, a string literal in SCIM_DEACTIVATION_REVOKE_REASON; a string literal in SysApiKey; a string literal in lifecycleRefusalOf), /Users/{id} (route, a path literal in a comment on a changed line))
  • content/docs/permissions/authorization.mdx (via sys_api_key (symbol, a field of const object arObjects; a field of const object deObjects; a field of const object enObjects; a field of const object esESObjects; a field of const object frObjects; a field of const object jaJPObjects; a field of const object koObjects; a field of const object ptBRObjects; a field of const object ruObjects; a field of const object zhCNObjects; a field of const object zhHantObjects), sys_api_key (literal, a string literal in logScimKeyRevocationIncomplete))
  • content/docs/permissions/system-context.mdx (via sys_api_key (symbol, a field of const object arObjects; a field of const object deObjects; a field of const object enObjects; a field of const object esESObjects; a field of const object frObjects; a field of const object jaJPObjects; a field of const object koObjects; a field of const object ptBRObjects; a field of const object ruObjects; a field of const object zhCNObjects; a field of const object zhHantObjects), sys_api_key (literal, a string literal in logScimKeyRevocationIncomplete))
  • content/docs/permissions/tenant-audit-census.mdx (via SYSTEM_CTX (symbol, a top-level const object), sys_api_key (symbol, a field of const object arObjects; a field of const object deObjects; a field of const object enObjects; a field of const object esESObjects; a field of const object frObjects; a field of const object jaJPObjects; a field of const object koObjects; a field of const object ptBRObjects; a field of const object ruObjects; a field of const object zhCNObjects; a field of const object zhHantObjects), sys_api_key (literal, a string literal in logScimKeyRevocationIncomplete))

⛔ 5 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v17/17-0.mdx (via SYSTEM_CTX (symbol, a top-level const object))
  • content/docs/releases/v17/17-1.mdx (via sys_api_key (symbol, a field of const object arObjects; a field of const object deObjects; a field of const object enObjects; a field of const object esESObjects; a field of const object frObjects; a field of const object jaJPObjects; a field of const object koObjects; a field of const object ptBRObjects; a field of const object ruObjects; a field of const object zhCNObjects; a field of const object zhHantObjects), sys_api_key (literal, a string literal in logScimKeyRevocationIncomplete), /api/v1/keys (route, a path literal in lifecycleRefusalOf; a path literal in membershipEndedRestoreRefused; a path literal in noRestorerRefused))
  • content/docs/releases/v17/17-5.mdx (via sys_api_key (symbol, a field of const object arObjects; a field of const object deObjects; a field of const object enObjects; a field of const object esESObjects; a field of const object frObjects; a field of const object jaJPObjects; a field of const object koObjects; a field of const object ptBRObjects; a field of const object ruObjects; a field of const object zhCNObjects; a field of const object zhHantObjects), sys_api_key (literal, a string literal in logScimKeyRevocationIncomplete))
  • content/docs/releases/v18/18-2.mdx (via AuthManager (symbol, a top-level class))
  • content/docs/releases/v18/18-3.mdx (via AuthManager (symbol, a top-level class))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 4 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 51 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 4462b4d92b9fff58d43e6fa8e700fd0ea6d4f62d → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 28ac719baf967ae8b8acbfba09204006763990c4 — the merge of head be3b862373d94cfcfee441ed1e7ea7a9d0b12836 into base 4462b4d92b9fff58d43e6fa8e700fd0ea6d4f62d, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 28ac719baf967ae8b8acbfba09204006763990c4 && git checkout 28ac719baf967ae8b8acbfba09204006763990c4
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 4462b4d92b9fff58d43e6fa8e700fd0ea6d4f62d be3b862373d94cfcfee441ed1e7ea7a9d0b12836 && git checkout -B drift-repro 4462b4d92b9fff58d43e6fa8e700fd0ea6d4f62d && git merge --no-ff be3b862373d94cfcfee441ed1e7ea7a9d0b12836

node scripts/docs-audit/affected-docs.mjs --json 4462b4d92b9fff58d43e6fa8e700fd0ea6d4f62d

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 4462b4d92b9fff58d43e6fa8e700fd0ea6d4f62d → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…ys, and no one restores them

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibyho66BmvQ2CZsxoWJ
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · os-tesla · session_01L9qibwMmGJKaQ52CgHqNu2

Regen-provenance: 6848139216 · c2e6032948ff50a7bc9bdabce67c74459f26f16e → be3b862373d94cfcfee441ed1e7ea7a9d0b12836 · git diff --name-only c2e60329 be3b8623 -- . ':!content/docs/' → (empty)

The head moved on the prose face only: one bullet in content/docs/permissions/authentication.mdx (the seat's should-fix from the docs drift check). The contract record above continues on this head, and the seat's ACCEPT reads the bullet sentence by sentence.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · os-tesla · session_01L9qibwMmGJKaQ52CgHqNu2

ACCEPT · 2026-11-13T09:11Z · PR #33075 · head be3b8623

  1. Shape: Part of #32115, base main, 27 files (+767/−86): plugin-auth (new key-revocation module, the directory lifecycle hook, restore guard, service-account restore door, route-ledger note, tests), core key door message and its test, platform-objects sys_api_key.revoked_reason option and description with 11 generated translation bundles, the two regenerated tenant-audit census files, one docs bullet, one changeset (plugin-auth, core, platform-objects, patch). Clause-②: yes (widening), Metadata-protocol: none, matching claim 6845390227 as amended by 6845457155. Assignee os-tesla. Author objectstack-fleet[bot].
  2. Premise: the card's ruling 6787890900 (directory deactivation revokes the user's keys, nobody restores them); the password half of the card stays for a later step, so this PR is Part of and the card stays open.
  3. Contract review: owed at TIER_DEFAULT on the declaration face (reviewFace hits nothing; the changeset's Clause-②: yes decides). Record 6848139216 PASS on c2e60329, carried to be3b8623 by Regen-provenance 6848241804 (only content/docs/ moved). Two nits accepted there: the fail-soft revocation and the untested scan cap.
  4. Prose faces, read sentence by sentence against the diff: the changeset's four paragraphs (the rule, who can restore, the new option, an incomplete revocation) each match the code and tests; the new bullet in content/docs/permissions/authentication.mdx matches the changeset, and its page name (Account → Developer → API Keys) matches the Account app's own key list.
  5. Gates / check-runs: dev: 109 derived gates on fc310c98, plus the 48 affected families after the merge of main on c2e60329 and the 29 docs families on be3b8623, all exit 0, --ran 0 NOT MEASURED. On head be3b8623: 68 runs, 58 success, 10 skipped, 0 failed, 0 running; mergeable_state clean. The Test UI and TypeScript Type Check reds on c2e60329 are rollups of runs cancelled by the push of be3b8623, not results. check-governed-merges --pr 33075: NOT governed, 853 changed lines.
  6. Landing: not governed, under the human-merge threshold, K = 2 (PRBASE 4462b4d9, no new locale pack): the seat readies the PR and arms auto-merge under the maintainer's standing word 「车道经理应该使用 pm-dispatch 技能审核和落地pr」 (2026-11-13).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

security#2 · os-tesla · session_01L9qibwMmGJKaQ52CgHqNu2

Out of the merge queue for the 18.4.0 freeze (triage ruling 6848983225 on #32908). This PR carries a changeset and is neither an 18.4.0 blocker nor a Round 2 fix, so the seat takes it out: auto-merge off, back to draft. ACCEPT 6848849170 and contract record 6848139216 (via Regen-provenance 6848241804) stand for head be3b8623. At the thaw the seat re-checks K and CI on the then-current head, readies it and re-arms.


Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as draft November 13, 2026 09:32
Merged via the queue into main with commit c419609 Nov 13, 2026
69 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-9vbm8g branch November 13, 2026 09:42
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

Not a freeze breach: no revert. The maintainer amended the freeze before this landed: 「已经在队列中的可以继续合并玩吧」 (amendment on #32908). PRs already in the merge queue when the freeze was posted may finish, and #33075 was one of them. Its merge (c4196099, 09:42Z) is in scope for 18.4.0. Round 2's increment run takes its sha after the already-queued PRs land, so these three patch packages are tested there. The dequeue at 09:32Z was correct under the original notice, so no action is owed now.


Generated by Claude Code

scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…, and cover restart persistence and SCIM key revocation (objectstack-ai#33421)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XXfKbgM3JofG6dFmRe16ZKu)_

domain:devx#4 · os-project-manager · session_01FEkQ5kHpQrXX5yTHRb5h4F

Part of objectstack-ai#33353

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:objectstack-ai#33353 的文字一半。拆分 `identity-auth.auth-method-matrix`(第 8
行),把设备授权拆成新条目 `identity-auth.device-authorization-grant`(blocked
environment);给 `api-backend.package-rest-lifecycle`
加一条「重启后清单等于最后一次写入」的验收(第 196 行);新建
`identity-auth.scim-deactivation-revokes-api-keys`,断言 objectstack-ai#33075 的 SCIM 停用吊销
API key 后请求得 403 `API_KEY_REVOKED`(第 232 行);重测并改正
`identity-auth.admin-lifecycle-operations` 的 fixtures.requires[2]。只改两个
JSON 文件。
- 为什么改:设备授权在任何 stock 启动下都开不了,拖住整个矩阵无法计分;拆开后可驱动的部分能计分。另两条是 v18.4.0
那轮记下的覆盖缺口。walled admin「没有组织」的说法在 main 上已过时。
- 风险与回滚:只改清单文字,不动产品代码;改动的条目各升一版加一条历史,新条目从第 1 版起并写明来源。回滚即还原本 PR。
- 先看:第 8 行的拆分。工单说「SSO 和设备」都受环境阻塞,但 main 上企业 SSO 用 OS_SSO_ENABLED 加
OS_TRUSTED_ORIGINS 就能在 stock 启动下驱动(QA objectstack-ai#33092),所以只拆出了设备授权,SSO
留在父条目里并写进了步骤。
- 两分钟验证:`pnpm check:platform-checklist`,预期退出码 0。
- 需要你做的:无,席位落地;卡片留给下一轮 checklist-test 的驱动一半。

## What changes

`docs/qa/platform-checklist/areas/identity-auth.json` (two items
changed, two new) and `api-backend.json` (one item changed), text only.
Each changed item gets exactly one `revision` bump and one `history` row
citing objectstack-ai#33353 and the base it was read at (`bd439f17`); each new item
starts at revision 1 with a history row naming where it came from. No
other file. The drive rows (1–4, 6, 7, 9, 10, 106, 114) and
`api-backend.error-envelope-ledger` are not touched.

| row # | item | disposition | evidence on main |
|---|---|---|---|
| 8 | `identity-auth.auth-method-matrix` | split (parent, rev 12) |
packages/cli/src/commands/serve.ts L4658-L4672 (AuthPlugin env switches:
OS_AUTH_ADMIN, OS_AUTH_TWO_FACTOR, OS_AUTH_PASSWORD_REJECT_BREACHED,
OS_AUTH_PHONE_NUMBER_ENABLED only), L4549-L4552 OS_TRUSTED_ORIGINS;
plugin-auth auth-manager-plugin-list.ts L176 OS_SSO_ENABLED, L211 and
L932-L940 deviceAuthorization from config only |
| 8 | `identity-auth.device-authorization-grant` | split (new item, rev
1, blocked environment) | plugin-auth auth-manager-plugin-list.ts
L932-L940 (deviceAuthorization plugin, verificationUri /auth/device);
auth-manager.ts L5882 features.deviceAuthorization; auth-route-ledger.ts
L387, L441-L444 /device rows; spec auth-endpoints.zod.ts L364-L367 |
| 196 | `api-backend.package-rest-lifecycle` | clause authored (rev 6) |
metadata-protocol protocol-package-install.ts L500-L520 updatePackage
(persistPackageManifest L515, restore on failure); service-package
index.ts L530-L541 publish stamps, L662-L672 list() picks
MAX(updated_at) per id, L776-L852 boot hydration into
registry.installPackage; package-table.ts L247 packageWriteStamp |
| 232 | `identity-auth.scim-deactivation-revokes-api-keys` | item
authored (new, rev 1) | plugin-auth scim-deactivation-key-revocation.ts
L124 revokeDirectoryDeactivatedApiKeys; auth-manager.ts L4929
reconcileScimUserLifecycle; core security/api-key.ts L324
API_KEY_REVOKED 403, L447-L450 scim_deactivated message;
api-key-restore-guard.ts L85-L89 (no restorer); admin-user-endpoints.ts
L1068-L1088 set-user-password |
| A note | `identity-auth.admin-lifecycle-operations` | re-pointed
fixtures.requires[2] (rev 12) | plugin-auth
ensure-default-organization.ts L1-L75 (walled: the
OS_PLATFORM_OWNER_EMAIL admin is bound owner of the Default
Organization), L446 ensureDefaultOrganization;
auth-manager-database-hooks.ts L199-L226 selectActiveOrg;
scripts/qa/qa-fixture.mjs L351-L427 (walled-boot creates and sets an
organization unless --no-organization) |

## Why

- **Row 8, the split.** The README's Lifecycle rules allow Append,
Change and Retire, and never delete. So the parent is Changed: the
device variant, its step and its knownGap move out, and the title names
where they went. The device variant is Appended as its own item, which
starts at revision 1 and names the parent in its history row. The new
item keeps the parent's acceptance meaning for device authorization: the
advertisement matches the mounted routes, the RFC 8628 flow signs in,
the console `/auth/device` page works, and an off-host `/device/code`
call is refused. It carries `blocked: environment`, because no stock `os
dev` or `os serve` switch turns on `plugins.deviceAuthorization`
(serve.ts maps only the four switches above). Nothing is narrowed: every
clause that applied to device authorization in the parent now applies in
the child.
- **Row 8, SSO stays.** The card read both SSO and device authorization
as blocked by environment. Main says otherwise for SSO: `OS_SSO_ENABLED`
turns the SSO plugin on and `OS_TRUSTED_ORIGINS` admits a mock IdP. QA
run objectstack-ai#33092 drove it this way. So enterprise SSO stays in the parent as a
drivable variant, and its fixture recipe is now in
`fixtures.requires[2]` and `steps[4]`.
- **Row 196.** `updatePackage` persists the manifest before it answers
(protocol-package-install.ts). Boot hydration reads, for each package
id, the row with the latest `updated_at` (service-package index.ts).
Write stamps are millisecond-monotonic (package-table.ts), so two writes
cannot tie. The new step restarts the server on the same database. The
new clause then requires that both the detail and the list serve the
`2.0.0` overwrite from steps[5], and that the list has exactly one row
for the package.
- **Row 232.** This follows the checklist-author skill. The author
re-read objectstack-ai#33075 and main, and the item sits beside
`identity-auth.scim-refused-audit-row`, since the SCIM lifecycle
reconcile is what revokes the key. It has three clauses, each settled by
source:
- After SCIM sets `active: false`, the key answers 403 `API_KEY_REVOKED`
with the `scim_deactivated` message.
  - Setting the user active again does not re-arm the key.
- No restorer exists: a `revoked: false` write is refused with 403
`PERMISSION_DENIED`.

Getting a SCIM-provisioned user to hold a key over HTTP is a recipe that
has not been driven live. It is recorded as a knownGap: if the recipe
fails, a runner marks the item `blocked: fixture` and cites the unit
pins as partial evidence.
- **Batch A note.** Re-measured, the line was stale. A walled boot binds
the platform-owner admin as owner of the Default Organization, and
`selectActiveOrg` starts the session on it, so the admin does not start
without an organization. The line now says this and keeps the
instruction to make the intended org current. `qa-fixture walled-boot`
does that by default.

## Tests

No test was added or changed, because the diff is checklist text. There
is nothing to ablate (os-dev.md: docs are not ablated). Authoring was
scoped and done in sequence by one reader (checklist-author, without the
sweep's subagents), because the order names the three rows.

## Acceptance notes

- The SSO departure from the card's wording is explained under Why. It
moves no clause out of scoring that the card wanted scored.
- The re-measure was done from source, not driven live. Each history row
says so.
- `skip-changeset`: `docs/qa/**` ships in no package.
- Branch: after objectstack-ai#33400 merged, `origin/main` was merged into
`claude/project-thread-v8xylo` rather than force-pushed (AGENTS.md
section 3 keeps force-push for `claude/issue-*` branches). The diff
against `origin/main` was empty before the edit commit.

## Verification

Run on head `ee860d83` (branch `claude/project-thread-v8xylo`, merge
base `origin/main` `bd439f17`). The gate list came from `node
scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` (16 commands), and each exit code was
captured before any pipe:

<details><summary>16 derived, 16 run, all exit 0; --ran reconciliation
exit 0</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:ci-filter-parity :: 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:platform-checklist :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:watch-hint-literal :: exit 0
```

`dispatch-gates --ran`: "16 derived famil(ies) accounted for — 16 run, 0
NOT-MEASURED", exit 0. `--tier`: no mandate derived from the paths; 208
changed lines (+192 / -16), under the 3000-line human-merge threshold.

</details>

No package is touched, so no package build, test, typecheck or scoped
`pnpm lint` is owed. Every other check family belongs to CI and is read
from this PR's check-runs.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5kHpQrXX5yTHRb5h4F)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5kHpQrXX5yTHRb5h4F

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…password; a re-activation restores access through SSO only (objectstack-ai#34738)

Fixes objectstack-ai#32115

Clause-②: yes (narrowing)
Metadata-protocol: none
Skills-docs: none — no skill under `skills/**` teaches the SCIM
deactivation lifecycle; `content/docs/permissions/authentication.mdx`
gains the rule in this change.

## 维护者速读

- 改了什么:SCIM 目录停用(`active: false`)、删除(`DELETE
/Users/{id}`)、让用户失去最后一个活跃来源的连接退役,以及目录把用户保持为停用时的任何后续写入,在 main 已有的封禁、吊销
API key、暂停 AI 服务账号、结束其注册的 OAuth 应用与 SCIM
凭证之外,现在还删除该用户的本地密码(`sys_account` 中 `provider_id = 'credential'`
的行),之后该用户读作目录托管(`idp_provisioned`)。目录重新启用(`active: true`
解除目录自己的封禁)时先删除用户此刻持有的本地密码再解封,访问只经 SSO 恢复;删除未完成则重新启用失败,用户保持停用。
- 为什么改:在案裁决(objectstack-ai#32004 评论 6787890900,「Directory
deactivation」条)写明「移除目录用户的本地密码是后一步」;API key 一半(objectstack-ai#33075)、AI
服务账号(objectstack-ai#33109)与注册结束(objectstack-ai#36163)已在 main 上,本 PR 合入 main 之后只剩本地密码这一半。维护者 11-17
的「这个不用处理」只免去回填扫尾,修复本身仍欠。
- 风险与回滚:收窄(BREAKING,标题带
`!`):被目录停用过的用户重新启用后没有本地密码,需要时要在重新启用之后有意设置。不做迁移或回填。管理员封禁/解封、管理员封禁之上的
`active: true`、未被封禁用户的目录同步、末位管理员被拒的停用都不删密码。回滚 = 回退本 PR;已删除的密码行不会随回滚恢复。
- 先看:`packages/plugins/plugin-auth/src/auth-manager.ts` 的
`reconcileScimUserLifecycle`(本轮合并解决处:停用分支里 main 的注册结束之后、目录标记之前删除;重新启用分支
fail-closed);`scim-deactivation-password-removal.ts`;`scim-deactivation-reconcile-user.test.ts`
的 (l) describe。
- 两分钟验证:`pnpm --filter @objectstack/plugin-auth exec vitest run
src/scim-deactivation-reconcile-user.test.ts`,预期 60/60 通过(main 的 45 条 +
本 PR 的 15 条 (l) 用例)。
- 需要你做的:无,席位落地(收窄所需的 L2 契约复审由席位路由)。

## What changes

- **The rule.** A directory deactivation removes the user's local
password; a re-activation by the directory restores access through SSO
only.
- On every inactive call of `AuthManager#reconcileScimUserLifecycle`,
after what `main` already does there (the ban write, the API key
revocation, the AI service account suspension, and the ending of the
user's OAuth applications and SCIM credentials), and before the
directory-managed mark, every `sys_account` row of the user with
`provider_id = 'credential'` is deleted. The inactive calls are PATCH
`active: false`, `DELETE /Users/{id}`, a create with `active: false`, a
tombstone re-link that arrives inactive, a connection decommission pass
that removes the user's last active source, and any later SCIM write
while the directory holds the user inactive. The trigger is the
directory's state, never the ban column.
- On the `active: true` call that lifts the directory's own ban
(`SCIM_DEACTIVATION_BAN_REASON`), the same writer removes any such row
the user holds at that moment, inside the same SCIM transaction, before
the directory-managed mark and before the unban. A re-activation after a
directory deactivation therefore restores no credential from before it,
a password an administrator set while the directory held the user
deactivated included.
- The user row, the user's other account links (SSO / OAuth) and the
history that names the user are kept (ADR-0134 D3).
- **Writer**
`packages/plugins/plugin-auth/src/scim-deactivation-password-removal.ts`
(package-internal): reads the row ids only and deletes them through the
engine in the system context, attributed to the SCIM connection as a
service principal (`authSystemWriteContext`). Idempotent, never throws.
`complete` is a measured zero: after deleting, it re-reads and reports
`complete` only when no local-password row is left; a row read without
an id counts as not removed. At most 100 rows of one user per call,
documented in the module header. No audit row follows a delete:
`sys_account` is on the audit mirror's skip list.
- **Failure posture, one per branch.** Deactivation: the ban lands
first, so an incomplete removal is logged once at `error` and the
deprovision still succeeds; the next inactive write runs it again.
Re-activation: the ban stays until the removal is complete; an
incomplete removal is logged once at `error` and fails the SCIM request,
which the vendor rolls back, so the user stays deactivated until the
directory retries.
- **Order and the mark.** On a deactivation the removal runs after the
ban, so a ban the last-administrator guard refuses throws first and
removes nothing. On both branches it runs before the directory-managed
mark (ADR-0135 D4), so a user whose password the removal took reads
`idp_provisioned`.
- **Sessions.** Unchanged: the vendor deletes the user's sessions after
the callback for an inactive state.
- **Unchanged, each pinned by a control:** an administrator's ban and
unban; an `active: true` over an administrator's ban; an attribute sync
or `active: true` for a user who is not banned; a user with no local
password.
- **The directory's ban reason.** A ban whose reason reads `Deactivated
via SCIM` is the directory's whoever wrote it: the directory's next
active write lifts it and removes the local password (docblock,
changeset, docs). Reserving that string on the administrator's ban mount
is not done here (L2 N4, Acceptance notes).
- **Docs:** a bullet in `content/docs/permissions/authentication.mdx`,
after `main`'s registration-ending bullet: the removal, the decommission
door, the `idp_provisioned` mark, the re-activation half, and that no
migration or backfill runs. `scim-identity-source.ts`'s header says what
the mark reads after the removal.
- **Changeset:**
`.changeset/32115-directory-deactivation-local-password.md`,
`@objectstack/plugin-auth` patch, BREAKING, ADR-0087 disposition
not-required (no-migration-prescription). Its BREAKING paragraph now
lists the registration ending `main` gained beside the ban, keys and AI
service accounts.
- **Census:**
`docs/audits/2026-08-tenant-audit-write-call-sites.counts/plugins/plugin-auth.md`
regenerated by `node scripts/tenant-audit-census.mjs --write` after the
merge (never hand-merged): 111 sites, `main`'s 110 plus the writer's one
`delete` of `SystemObjectName.ACCOUNT`.

## Tests

Top-level describe in
`packages/plugins/plugin-auth/src/scim-deactivation-reconcile-user.test.ts`,
through `@better-auth/scim` over a real better-sqlite3 engine: "a
directory deactivation removes the user's local password, and a
re-activation restores access through SSO only". Its fifteen cases are
now face **(l)**: `main` added its own (k) describes (an account
disabled by any door keeps nothing running in its name), so the merge
keeps `main`'s (k) whole and renames this PR's face; no case changed
subject.

- (l) `active: false` removes the local password and keeps every other
link; the mark reads `idp_provisioned`; `active: true` lifts the ban and
restores no password (sign-in `401 INVALID_EMAIL_OR_PASSWORD`); the
delete is the SCIM connection's write (`isSystem: true`, actor
`svc:scim:okta-14360`, no user credited).
- (l) `DELETE /Users/{id}` removes it the same way; a re-link through
the tombstone restores none.
- (l) a repeated inactive write sends no delete.
- (l) a deactivation over an administrator's ban removes the password
too and keeps the administrator's reason.
- (l) CONTROL: an administrator's ban and unban leave the password
alone.
- (l) CONTROL: an attribute sync or an `active: true` for a user who is
not banned removes nothing; only lifting the directory's ban does
(positive leg: one delete).
- (l) a re-activation after a directory deactivation restores no
credential from before it, the deactivated state seeded directly;
attribution asserted.
- (l) CONTROL: `active: true` over an administrator's ban lifts nothing
and removes nothing.
- (l) CONTROL: a user with no local password is a no-op.
- (l) a refused deactivation of the last administrator (PATCH and
DELETE) attempts no delete.
- (l) a deactivation that fails after the removal rolls the removal back
with the ban.
- (l) a removal that cannot be written on a deactivation still bans,
logs once at `error`, and the next inactive write removes it.
- (l) a removal that cannot be written on a re-activation fails it
(status ≥ 500), logs once, and keeps the user deactivated; the retry
re-activates with no password.
- (l) a removal is complete only when a re-read finds no local password.
- (l) a local-password row read without an id counts as not removed.

Cases changed because the behaviour changed (unchanged from the earlier
rounds): "(b) active:true ⇒ the SCIM ban is lifted, and the
re-activation restores no local password from before it", and the faces
(a), (d), (f) and the cause cases, which set the password again after
the deactivation before signing in.

## Acceptance notes

- Premise re-measured on `origin/main` `f46ce5b4af`: the API-key half
(objectstack-ai#33075, `revokeDirectoryDeactivatedApiKeys`), the AI service account
suspension (objectstack-ai#33109) and the registration ending (objectstack-ai#36163,
`endScimDeactivatedRegistrations`) are on `main`; the inactive branch
deletes no `credential` row and the active branch only unbans. Only the
local-password half still reproduces, and it is this PR's whole delta
against `main` (7 paths, +1027 / −26).
- Merge of `origin/main` `f46ce5b4af` (merge commit `c7c85d60c3`, no
rebase, no force push): four files conflicted. `auth-manager.ts` keeps
`main`'s registration ending and runs the removal after it, before the
mark; the test file keeps `main`'s new describes whole and renames this
PR's face to (l); `authentication.mdx` keeps both bullets; the census
shard was taken from `main` and regenerated (`f635db10e8`).
- The maintainer's 「这个不用处理」 (11-17) waives only the residual backfill
sweep. No migration or backfill runs: a user deactivated before this
version keeps their local credential until the directory next writes
that user. An administrator's unban removes nothing.
- Seat answers on the round-0 questions (delta r1): the removal runs on
every inactive write, a connection decommission pass included; the
last-local-credential guard stays off on the SCIM path; the break-glass
last-administrator guard still refuses first.
- L2 nits (record 6946949332, at `1540d3a270`): N1, N2, N3 and N5
applied in round 3; N4 documented, not reserved (reserving the string
adds a refusal to the administrator's ban door, outside this card); N6
and S1 belong to the ADR bookkeeping card.
- ADR bookkeeping: objectstack-ai#34820
- The connection decommission door is named from the vendor's code path
(`reconcileSCIMProjectionDomainBatch` calls `identity.reconcileUser`),
not driven by a case in this file.
- Records on file are at `1540d3a270` (L1 ACCEPT 6946960271, L2 PASS
6946949332) and do not cover this head; the round-3 delta and this merge
are unreviewed.
- `scim-deactivation-reconcile-user.test.ts` now runs 60 cases (45 on
`main`). Budget line `test-budget: 20` stands, re-measured LOCALLY at 60
cases (10.52 s, the slowest of four runs of the file alone, × 1.25); the
line says the reading is local.

## Verification

All readings on head `9d96795467` (the merge `c7c85d60c3`, the census
regeneration `f635db10e8`, and the wording commit `9d96795467`) unless
stated. Wall-clock figures are shared-box readings.

<details>
<summary>plugin-auth: red before, green after, full suite, typecheck,
census</summary>

- Closure build: `pnpm exec turbo run build --concurrency=2
--filter='@objectstack/plugin-auth...'` under the lock: `Tasks: 36
successful, 36 total`.
- `pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2
src/scim-deactivation-reconcile-user.test.ts`: `Tests 60 passed (60)`,
four runs (tests 10.48 s, 10.09 s, 10.52 s, 10.31 s).
- Red before: the same file with `auth-manager.ts` restored from
`origin/main` (worktree only; blob 32d8b3f vs HEAD 10e6399): `Tests 17
failed | 43 passed (60)`, VERDICT command-exit 1. The 17 red are eleven
(l) cases (the attribute-sync control among them, on its positive leg)
plus (a), (b), (d), (f) and the two cause cases, whose fixtures follow
the rule; the three remove-nothing controls and the last-administrator
case stay green. Restored with `git checkout HEAD -- PATH`: blob
10e6399 == HEAD, `git diff HEAD` empty, `git status` clean.
- `bash scripts/pm/os-verify-lock.sh -c 'pnpm --filter
@objectstack/plugin-auth test'` (on `9d96795467`): `Test Files 295
passed (295)`, `Tests 6289 passed | 10 skipped (6299)`, VERDICT
command-exit 0.
- `pnpm --filter @objectstack/plugin-auth typecheck` after building it,
under the lock: VERDICT command-exit 0; `check:test-typecheck: OK`, debt
ledger unchanged.
- `node scripts/check-tenant-audit-census.mjs`: `OK -- 345 write call
sites certified across 18 package shard(s)`.
- Ablations of the writer and of both call sites ran in round 3 on
`fcc2c1cfbc` (a4–a9) and round 2 (a1–a3); the merge moved no line they
mutate except the inactive-branch neighbourhood, which the red-before
leg above covers.
</details>

<details>
<summary>Gate round</summary>

- `env -u OS_SKIP_DTS pnpm build --concurrency=2` under the lock:
`Tasks: 120 successful, 120 total`.
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack`: 108 commands (7 changed paths vs merge base
`f46ce5b4a`); each run with stdin from `/dev/null`, its exit code
captured before any pipe.
- 106 exited 0 in the round. Two answered exit 3 (PREREQUISITE NOT MET,
nothing measured) and exited 0 on re-run: `node
scripts/check-plugin-teardown-shape.mjs --self-test` (its positive
control is a pinned commit outside the shallow clone; that commit was
fetched) and `pnpm check:type-check-debt` (queued behind the dogfood
battery's hold on the lock; re-run under the lock:
`check-type-check-coverage: OK`, `--re-measure: OK`).
- `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack
--ran FILE` (each line carrying its exit code): `108 derived, 108 run, 0
NOT-MEASURED, 0 UNRUN`, a derived zero (all 108 recorded an exit code).
- CI on `9d96795467`, read once: 55 check runs completed, each `success`
or `skipped`, none failed. Test Core 1/10 to 10/10 and the `Test Core`
aggregate, Build Core, Build Docs, Test UI, Live E2E UI, Dogfood
Regression Gate, TypeScript Type Check, Lint & Repo Gates and every Lint
/ Type Check lane, Check Changeset, Check PR Size, Governed Surface
Queue Guard, the PR-body guards, Check Documentation Links, Spec
property liveness and Flag docs affected by code changes: `success`.
Path-gated UI jobs, the queue verdicts and the opt-in jobs: `skipped`.
</details>

<details>
<summary>Dogfood battery (the title carries `!`)</summary>

- On `9d96795467`, after the full build above (it covers the
`@objectstack/dogfood` closure): `bash scripts/pm/os-verify-lock.sh -c
'pnpm --filter @objectstack/dogfood test'` (no `OS_TEST_SHARD`, no
path): `Test Files 487 passed | 3 skipped (490)`, `Tests 4126 passed |
68 skipped (4194)`, VERDICT command-exit 0, held the lock 45m38s (shared
box). No failure.
</details>

**Seat-written update.** Seat `repo:objectstack#4` (os-justin,
`session_01QSeKYpEsWWE9Y5YtSsDgqZ`) wrote this body on the maintainer's
ruling in the seat session, verbatim 「一选1+」 (2026-11-24): option 1+ —
the seat performs only the writes the dev session's permission
classifier refused, each checked against the branch; no standing allow
rule is added (evidence card objectstack-ai#36936). Refused once in dev session
`session_01QSeKYkTjJ5ybZ2ydLHnMbv`, reason `[Undermining Oversight]`:
`node scripts/pm/fleet-write/dispatch.mjs --repo
objectstack-ai/objectstack --actions-file FILE` carrying this
`issue_patch`. The text above is the dev's, unchanged (15,575 bytes,
sha256 prefix `6be7afe46bc08eda`, matching the dev's hand-off); head
checked at `9d96795467`.

<!-- signed: repo:objectstack#4 · os-justin ·
session_01QSeKYkTjJ5ybZ2ydLHnMbv -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants