Repository navigation
feat(auth)!: a managed environment adds pending, SSO-only people, and ban works without the admin plugin - #33227
Conversation
… ban works without the admin plugin On a cloud-managed environment a platform administrator adds a person ahead of their first sign-in (admin/add-sso-user) or many from CSV (admin/import-sso-users), with positions, permission sets and a manager. The row is born idp_pending: no password, refused by every password door and by every session until the first sign-in through the platform identity provider binds to it. admin/ban-user and admin/unban-user now work without the admin plugin: the ban columns are written through the data engine and a banned row is refused a session with the admin plugin's own BANNED_USER answer. An optional environment-user host is told when a person is added, and asked before one is deactivated or reactivated; it may refuse with a typed 409 or 403. Events carry the administrator's cloud user id from their linked platform account. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvhGW6DCBPjrcAPjvh
…-cl505i # Conflicts: # content/docs/permissions/tenant-audit-census.mdx # docs/audits/2026-08-tenant-audit-write-call-sites.counts.md
|
domain:server#7 · os-tesla · session_01L9qibvhGW6DCBPjrcAPjvh Contract-review-claim: session_01L9qibvhGW6DCBPjrcAPjvh · head f5a084c · 2026-11-14T14:40Z The review runs at |
📓 Docs Drift CheckThis PR changes 2 package(s): 89 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 18 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 24 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 32d1ab8e0dca74a3f04d555351490bc84818515f && git checkout 32d1ab8e0dca74a3f04d555351490bc84818515f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6ff3eee7ca595cf1bb5c47e9fc09bb127c0a57d0 58f53919d8a041d1ccbcfba1a1e87fa6c934f31d && git checkout -B drift-repro 6ff3eee7ca595cf1bb5c47e9fc09bb127c0a57d0 && git merge --no-ff 58f53919d8a041d1ccbcfba1a1e87fa6c934f31d
node scripts/docs-audit/affected-docs.mjs --json 6ff3eee7ca595cf1bb5c47e9fc09bb127c0a57d0
|
|
domain:server#7 · os-tesla · session_01L9qibvhGW6DCBPjrcAPjvh The brief the isolated reviewer was given for the record on head Contract review brief — PR #33227 @
|
|
domain:server#7 · os-tesla · session_01L9qibvhGW6DCBPjrcAPjvh Contract reviewServed-tier: Inputs: card #33181 body and all 8 comments, PR #33227 body and its 51-file list, the net diff against Check-runs when read (54 total):
① Derived judgments
② Semver levelClause-②: yes (narrowing) — matches the tree. One arm from the closed pair, with the BREAKING banner in both the PR body and the changeset.
③ Boundary flags
④ Design judgmentA row of the new files per contract sentence, then the findings.
Findings:
No must-fix. Findings 1 to 7 each earn a delta review of their fix. This record was rendered by an isolated sub-agent at CONTRACT_REVIEW_TIER, fed only the brief's inputs. Implemented-by: VERDICT: PASS |
…ivation waits for the host, re-adds name what they skip Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvhGW6DCBPjrcAPjvh
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvhGW6DCBPjrcAPjvh
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvhGW6DCBPjrcAPjvh
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvhGW6DCBPjrcAPjvh
|
domain:server#7 · os-tesla · session_01L9qibvhGW6DCBPjrcAPjvh Contract-review-claim: session_01L9qibvhGW6DCBPjrcAPjvh · head 032dcc5 · 2026-11-14T15:09Z The delta review of record 6879138774 should-fixes 1 to 7, by the same isolated reviewer at |
|
domain:server#7 · os-tesla · session_01L9qibvhGW6DCBPjrcAPjvh Contract reviewServed-tier: This is the delta review of record 6879138774 (head Inputs: the delta Check-runs when read (46 total):
① Derived judgments
② Semver levelClause-②: yes (narrowing) — the line is byte-identical in the PR body and the changeset, and matches the tree.
③ Boundary flags
④ Design judgmentEach finding of record 6879138774, against the delta:
New in the delta:
No must-fix and no should-fix. The nits end the round. Implemented-by: VERDICT: PASS |
…double The sys_account matcher in the admission test double read `$and`/`$or` as field names. It now refuses any operator key, per the where-matcher conformance gate. The host accessor's contract comment also states that a managed host answers a host or throws, never `undefined` while starting. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvhGW6DCBPjrcAPjvh
The import-fault test wrapped the engine's `insert` and passed a third argument its declared signature does not take, which the test-layer typecheck reports. The wrapper now forwards whatever it receives. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvhGW6DCBPjrcAPjvh
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx Contract reviewServed-tier: The seat's own read of the part of this head no record covers: ① Derived judgments
② Semver levelUnchanged: ③ Boundary flagsNone new. Delta nit A is answered by the comment; nit B was a PR-body edit. ④ Design judgmentNo design moves in this delta. The comment narrows nothing and the two test edits keep their assertions. Check-runs on this head: 38 success, 15 skipped, 0 failed. Implemented-by: VERDICT: PASS |
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx 维护者速读 · PR #33227 @
|
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvhGW6DCBPjrcAPjvh
The implicit account-linking suite conflicted with the SSO proven-domain rule's tests. Both describe blocks are kept whole, in order. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvhGW6DCBPjrcAPjvh
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx Re-land · 2026-11-15T07:27Z · PR #33227 @
|
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract-review-claim: session_01FEkQ5nhu4dRbKVQKDB4CDB · head 58f5391 · 2026-11-15T08:10Z |
|
review#2 · os-project-manager · session_01FEkQ5nhu4dRbKVQKDB4CDB Contract reviewServed-tier: This is the delta review of record 6889074200 (head Landing note: the PR merged as Inputs: record 6889074200, every PR comment after it, the hop's compare, the tree of each merge and of both its parents, the PR's net diff against each head's What the hop is, read from the tree:
Check-runs on this head (54): 39 success, 15 skipped, 0 failed, 0 in progress. ① Derived judgments
② Semver levelUnchanged: ③ Boundary flags
④ Design judgmentEach finding of record 6889074200: it carried no new finding. Its one boundary flag, the Findings still open from the earlier records, against this hop:
New in the hop:
Implemented-by: VERDICT: PASS |
… is no longer refused 403 MISSING_OR_NULL_ORIGIN (objectstack-ai#33243) Fixes objectstack-ai#33237 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:`AuthManager.handleRequest` 在把请求交给 better-auth 之前,对带 `Authorization: Bearer` 的 `/scim/v2/*` 请求去掉 `Cookie` 头;其余路由一律不动。 - 为什么改:better-auth 的来源检查只要请求带任何 Cookie 就要求 `Origin`,于是带 Cookie 罐(如 Cloudflare `__cf_bm`、粘性会话 Cookie)的身份提供方(Okta 已实测)做 SCIM 开通与停用全部被拒 403,离职员工的访问无法由目录撤销。SCIM 只认 bearer,Cookie 在该路径上不带任何权限。 - 风险与回滚:风险面只有「`/scim/v2/*` 且带 bearer」这一种请求;无 bearer 的 SCIM 请求与所有浏览器路由仍走原来的来源检查。回滚即 revert 本 PR 的那一个 `if` 块。 - 先看:`packages/plugins/plugin-auth/src/auth-manager-request-routing.ts`(新增的 `if` 块,判定条件三项是风险点);`packages/plugins/plugin-auth/src/scim-bearer-cookie-origin.test.ts`(四个用例与 `boot()` 里把来源检查打开的那几行)。 - 两分钟验证:`pnpm --filter @objectstack/plugin-auth exec vitest run src/scim-bearer-cookie-origin.test.ts`,预期 4 个用例全绿。 - 需要你做的:无,席位落地。 ## What changes `packages/plugins/plugin-auth/src/auth-manager-request-routing.ts`, `handleRequest`: right after the vendor client-address rewrite, a request whose better-auth endpoint path is under `/scim/v2` (`isScimProtocolPath`, the predicate the SCIM request scope already keys on) AND that carries `Authorization: Bearer` followed by a credential AND that carries a `Cookie` is rebuilt without the `Cookie` header before better-auth sees it. This is the route that relaxes no check: no global or per-path origin-check exemption is added, and `skipOriginCheck` / `disableCSRFCheck` are not touched. Why it is safe, measured on better-auth 1.7.12 and `@better-auth/scim` 1.7.12 as installed: - `validateOrigin` (`dist/api/middlewares/origin-check.mjs`) reads `useCookies = headers.has("cookie")` off the request `handleRequest` hands it; with a cookie and no Origin or Referer it throws `MISSING_OR_NULL_ORIGIN`. That is the whole defect. - Every `/scim/v2/*` mutation endpoint is `use: [authMiddleware]`, and that middleware (`createSCIMConnectionMiddleware`) authenticates from `Authorization: Bearer` alone: no bearer is `401 SCIM bearer token is required`. The platform's `verifyBearerToken` (`auth-manager-plugin-list.ts`) reads only `input.token`. - SCIM writes are attributed to the verified connection (`authSystemWriteContext` returns `actor: svc:scim:CONNECTION_ID` first and never consults the session resolver when a SCIM connection is in scope), so stripping the cookie changes no attribution either. - A SCIM request with NO bearer keeps its cookie and still meets the origin check (pinned below). The landing is the expected file; no producer elsewhere was needed. `auth-manager.ts`, `auth-plugin.ts` and the better-auth pin are untouched. `.changeset/33237-scim-bearer-cookie-origin.md`: `@objectstack/plugin-auth` patch. ## Tests New file `packages/plugins/plugin-auth/src/scim-bearer-cookie-origin.test.ts` (real `AuthManager`, real `ObjectQL` on better-sqlite3, SCIM on, a minted connection credential: the `scim-transaction-scope.test.ts` harness shape). Four cases: 1. SCIM bearer `POST /Users` with `Cookie: __cf_bm=...; better-auth.session_token=` and no Origin: 201 and the `sys_user` row exists. 2. SCIM bearer `PATCH /Users/{id}` `active:false` with the same Cookie and no Origin: 200, resource `active: false`. 3. SCIM `POST /Users` with the Cookie and NO bearer: still 403, `code` `MISSING_OR_NULL_ORIGIN`, no `sys_user` row written. 4. CONTROL: a real session cookie (from sign-up) on `POST /sign-out` with no Origin: still 403, `code` `MISSING_OR_NULL_ORIGIN`. How production semantics are ensured: two things would mask the bug under vitest, and the harness turns off both. `handleRequest` synthesizes a same-origin Origin outside production: every case runs with `vi.stubEnv('NODE_ENV', 'production')` and asserts it reads back. And better-auth reads NODE_ENV once at module load (`@better-auth/core/env`), so under vitest it defaults `skipOriginCheck` to `true` (`create-context.mjs`: `disableOriginCheck` unset means `isTest()`): `boot()` sets the production value `false` on the live `$context` and asserts `skipCSRFCheck` is `false`. Before that line was added, cases 3 and 4 were red on the unfixed tree (the control POST answered 200), which is how the masking was found. Red on the unfixed tree (commit e9076fa, test only): cases 1 and 2 fail with `{"message":"Missing or null Origin","code":"MISSING_OR_NULL_ORIGIN"}: expected 403 to be 201` (and `to be 200`); cases 3 and 4 pass. Ablation (one-time, on the fix commit c8abb27, through `scripts/ablation-replace.mjs`): the anchor `headers.delete('cookie');` replaced by a comment, anchor 1 to 0, blob 944e5a3 to efaf0d39e2b3; cases 1 and 2 red again with 403, cases 3 and 4 green; restored, blob after restore 944e5a3 equals HEAD and `git diff HEAD` empty. The test imports `./auth-manager.js` relatively, so the subject resolves to `src/`, no `dist/` step. ## Acceptance notes - Behaviour change beyond the card's three cases, stated so it is not a surprise: a `/scim/v2/*` bearer request that carries a Cookie AND an untrusted Origin used to be refused 403 `INVALID_ORIGIN`; it now reaches the SCIM bearer check like any bearer client. Same reasoning: the origin check guards cookie authority, and there is none on this path. - The vendor's origin check is skipped wholesale under a test NODE_ENV, so any plugin-auth test that means to observe it must put `skipOriginCheck = false` on the context as `boot()` here does. Observation only; no card. - The cloud hosted proxy strip (cloud#4498) can retire once a release carrying this reaches cloud's pin; that is cloud's and the maintainer's call on cloud#4491. ## Verification All readings at head c8abb27 (worktree on `origin/main` 6c5d31f). <details> <summary>plugin-auth tests and typecheck: 270/270 files, 5118 passed, typecheck exit 0</summary> - `pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2` (whole package): `Test Files 270 passed (270)`, `Tests 5118 passed | 10 skipped (5128)`, lock `VERDICT command-exit 0`. - `pnpm --filter @objectstack/plugin-auth typecheck`: exit 0; `check:test-typecheck: OK ... 10 file(s) / 72 error(s) / 23 pinned signature(s) held` (the new file adds none). </details> <details> <summary>lint: exit 0</summary> - `pnpm lint` (repo-wide, run on the dispatch's request): lock `VERDICT command-exit 0`. - `eslint --no-inline-config` on the two changed TS files: exit 0. </details> <details> <summary>derived gate families: 65 exit 0, 1 NOT MEASURED</summary> - `node scripts/pm/dispatch-gates.mjs --commands`: 66 derived families, each run locally; `--ran` reconciliation: `66 derived famil(ies) accounted for — 65 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)`. - `pnpm check:dual-build-cjs-loads` exit 3 `PREREQUISITE NOT MET` (it needs every package's `dist/`; this worktree built only plugin-auth's closure): NOT MEASURED locally, CI runs it. - `node scripts/check-nul-bytes.mjs`: exit 0. - Not run locally, owned by CI: `test:repo`, the dogfood battery (no `!` in the title, no narrowing arm), the UI lanes. </details> Overlap check before push: open drafts objectstack-ai#33227 and objectstack-ai#33221 do not touch `auth-manager-request-routing.ts`; no open PR from objectstack-ai#32115 was found. --- _Generated by [Claude Code](https://claude.ai/code/session_017xRBcSZ51q2s3nMfakhdJ3)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
… Add User and Import Users through the pending-person doors (objectstack-ai#33755) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XKSWb4HPT3fyiV3DGoyqSS4)_ domain:ui#1 · os-project-manager · session_01FEkQ5o1t4Dbyp8n9chrc65 Fixes objectstack-ai#33186 Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 改了什么:托管环境(`OS_CLOUD_MANAGED=1`)的「设置 → 用户」重新出现两个按钮:「添加用户」(邮箱、姓名,可选岗位、权限集、上级邮箱)和「导入用户」(粘贴 CSV)。两者都走 objectstack-ai#33227 新加的待激活用户接口,添加的人没有密码,首次通过组织的身份提供方登录。只有平台管理员看得到。 - 为什么改:objectstack-ai#25309 为了「托管只走云端邀请」把加人的按钮全藏了;按 cloud#4465 的裁决,人员改为在环境里添加,objectstack-ai#33227 已经提供了接口,但界面上还没有入口。 - 风险与回滚:只新增两个 `sys_user` 动作和它们的多语言文案;原来的「创建用户」「设置密码」和四个「邀请用户」在托管环境仍然隐藏,非托管环境什么都没变。回滚即 revert 本 PR。 - 先看:`packages/platform-objects/src/identity/sys-user.object.ts` 的 `MANAGED_ADD_PERSON_VISIBLE` 与 `add_sso_user` / `import_sso_users` 两段;`packages/platform-objects/src/feature-gate-guard.test.ts` 新增的 `SHOWN_WHEN_ON`(为什么不改 spec 见 Acceptance notes)。 - 两分钟验证:`pnpm --filter @objectstack/platform-objects exec vitest run src/identity/cloud-managed-visibility.test.ts`,预期全绿:托管时平台管理员只看到两个新按钮,非托管时只看到原来的六个。 - 需要你做的:无,席位落地。 ## What changes On a cloud-managed environment the password and invitation actions are hidden (`features.cloudManaged`, objectstack-ai#25309), and since objectstack-ai#33227 the environment has its own add-person doors, `POST /api/v1/auth/admin/add-sso-user` and `POST /api/v1/auth/admin/import-sso-users`. Nothing in Setup reached them. This PR adds their two first-party actions on `sys_user`: - **`add_sso_user`** ("Add User", list toolbar, `type: 'api'`, target `admin/add-sso-user`). Params: `email` and `name` (field-backed), `positions` (`widget: 'position-ref'`), `permissionSets` (`widget: 'permission-ref'`), `manager` (`type: 'email'`). Each picker submits one name; the door reads a string as a list of one. The result dialog shows the address, and only when present on the answer: `notApplied` (a re-add of a person still pending), `managerError` and `host.reason` (the hosting organisation was not told). - **`import_sso_users`** ("Import Users", list toolbar, target `admin/import-sso-users`). One `csv` param (`textarea`); the result dialog shows `summary.added` / `alreadyPending` / `failed` and the per-row answer as JSON. The row-by-row UI is objectstack-ai#33187's. Both are offered by `current_user.isPlatformAdmin == true && has(features.cloudManaged) && features.cloudManaged == true`: - The standing is the door's own gate (`gateAdmin` → `judgePlatformAdmin`, ADR-0068 D4), and both declare `requiredPermissions: [...PLATFORM_ADMIN_USERS_GATE]` like every other door in that family. No `requiresFeature: 'admin'`: the doors mount without the better-auth admin plugin, which Free and Team kernels do not carry. - `features.cloudManaged == true` is where the door answers; off it the door answers `409 RESOURCE_CONFLICT`. - `has()` keeps both hidden while the console holds no served flag: an action `visible` that faults SHOWS the action (`RequiresFeatureSlot` docs in `public-auth-features.ts`), the trap `create_user`'s second email param already guards against. No existing predicate is edited. `create_user`, `set_user_password`, the four `invite_user` mirrors and `copy_invitation_link` stay hidden on a managed environment. **Measured first** (tree `a199be81` = `origin/main` `ee627c67` plus the two actions; the measuring script evaluates every identity action whose target is a person-adding, invitation or password door through `@objectstack/formula`'s `celEngine`, as a platform admin who also holds `org_owner`): | action | target | managed | unmanaged | adds a person | sets or resets a local credential | |:--|:--|:--|:--|:--|:--| | `sys_user.invite_user` | `organization/invite-member` | hidden | offered | yes, by invitation | the invitee sets a password at accept | | `sys_member.invite_user` | `organization/invite-member` | hidden | offered | yes, by invitation | same | | `sys_invitation.invite_user` | `organization/invite-member` | hidden | offered | yes, by invitation | same | | `sys_organization.invite_user` | `organization/invite-member` | hidden | offered | yes, by invitation | same | | `sys_user.create_user` | `admin/create-user` | hidden | offered | yes | yes (password) | | `sys_user.set_user_password` | `admin/set-user-password` | hidden | offered | no | yes | | `sys_invitation.copy_invitation_link` | script | hidden | offered | hands out the accept link | no | | `sys_invitation.resend_invitation` | `organization/invite-member` | **offered** | offered | re-sends an invitation | no | | `sys_member.add_member` | `organization/add-member` | offered | offered | no (an existing user joins an organization) | no | | **`sys_user.add_sso_user`** (new) | `admin/add-sso-user` | **offered** | hidden | yes, pending | no | | **`sys_user.import_sso_users`** (new) | `admin/import-sso-users` | **offered** | hidden | yes, pending | no | The six doors of objectstack-ai#25309 are the first six rows. The doors answer as the card says: `admin/add-sso-user` and `admin/import-sso-users` add a person on a managed boot and answer `409 RESOURCE_CONFLICT` off it (the live pins below drive both legs). `resend_invitation` is offered on a managed environment although its door refuses there; see Acceptance notes. ## Tests - `packages/platform-objects/src/identity/cloud-managed-visibility.test.ts`, a new top-level `describe` beside the six-door one. The real served predicates through `celEngine`, bound as the console binds them: - each new action targets its door and declares no `requiresFeature`; - offered to the platform admin when managed; hidden when the flag is off; hidden (`false`, not a fault) when no flag is served; hidden from an organization owner below the rung, even when managed; - on a managed environment the admin is offered exactly the two new actions and none of the six; off it, exactly the six and neither new one. - `packages/plugins/plugin-auth/src/pending-sso-users.test.ts`, a new top-level `describe` in the existing harness (a real `AuthManager` behind `AuthPlugin.registerAuthRoutes` on a real Hono app). Each leg reads the DECLARED action from `@objectstack/platform-objects/identity`, posts its dialog's body to its `target`: - `add_sso_user` on a managed boot answers `201`; the row reads `source = idp_pending`, no `sys_account`, the picked position and permission set, and the manager linked; - `import_sso_users` on a managed boot: a two-row CSV answers `200`, summary `{ total: 2, added: 2, alreadyPending: 0, failed: 0 }`, both rows `idp_pending`; - CONTROL: an unmanaged boot answers both targets `409 RESOURCE_CONFLICT` and adds no one. - `platform-admin-affordance-standing.test.ts` now evaluates both managed modes: a member counts as offered to the platform admin when one mode offers it, and no refused principal may be offered a member in either mode. The two new actions join its family floor. - `platform-objects.test.ts`: the byte rows for the two served predicates. - `feature-gate-guard.test.ts`: the reverse walk (every `features.*` reference is booked) reads a new test-local `SHOWN_WHEN_ON` list for the two actions, and a new `describe` holds each to the inverse conjuncts `has(features.cloudManaged)` and `features.cloudManaged == true`, on a flag whose semantics are `hide-when-on`, and not booked the other way. Runs at head `e6eb15eb`: `@objectstack/platform-objects` full suite 122 files, 1992 tests passed; `pending-sso-users.test.ts` 48 passed (3 new), run at `a199be81`; neither it nor `sys-user.object.ts` changed after, and the three new legs passed again on the restored tree after A5. Ablations at head `71185c1d`, each through `scripts/ablation-replace.mjs`, each restored to the HEAD blob with `git diff HEAD` empty: <details><summary>A1 drop the managed half of the predicate → 7 red</summary> ```text anchor " 'current_user.isPlatformAdmin == true && has(features.cloudManaged) && features.cloudManaged == true';" → " 'current_user.isPlatformAdmin == true';" ablation-replace: ok mutation landed: anchor 1 -> 0, blob cde955f -> e8790049342b × sys_user.add_sso_user is hidden when the flag is off: its door answers 409 there × sys_user.import_sso_users is hidden when the flag is off: its door answers 409 there × sys_user.add_sso_user is hidden, not faulted, while no flag is served × sys_user.import_sso_users is hidden, not faulted, while no flag is served × off a managed environment the platform admin is offered the six as before and neither pending-person door × (platform-objects.test.ts) the two byte rows Tests 7 failed | 187 passed (194) ablation-replace: ok restored: blob == HEAD (cde955f) and `git diff HEAD` is empty ``` </details> <details><summary>A2 drop the platform-admin standing → 6 red</summary> ```text → " 'has(features.cloudManaged) && features.cloudManaged == true';" × sys_user.add_sso_user is hidden from an organization owner below the platform-admin rung, even when managed × sys_user.import_sso_users is hidden from an organization owner below the platform-admin rung, even when managed × each member serves a visible that carries the standing term × no principal the gate refuses is offered a member, on any row × (platform-objects.test.ts) the two byte rows Tests 6 failed | 188 passed (194) ablation-replace: ok restored: blob == HEAD (cde955f) and `git diff HEAD` is empty ``` </details> <details><summary>A3 drop the has() guard → 4 red</summary> ```text → " 'current_user.isPlatformAdmin == true && features.cloudManaged == true';" × sys_user.add_sso_user is hidden, not faulted, while no flag is served × sys_user.import_sso_users is hidden, not faulted, while no flag is served × (platform-objects.test.ts) the two byte rows Tests 4 failed | 190 passed (194) ablation-replace: ok restored: blob == HEAD (cde955f) and `git diff HEAD` is empty ``` </details> <details><summary>A4 / A5 point each action at the password door → its live pin red; dist rebuilt both legs</summary> plugin-auth reads `@objectstack/platform-objects` from `dist/`, so each leg rebuilt it and proved the marker with `scripts/ablation-dist-preflight.mjs`. ```text A4 "target: '/api/v1/auth/admin/add-sso-user'," → "target: '/api/v1/auth/admin/create-user?abl=A4'," ablation-replace: ok mutation landed: anchor 1 -> 0, blob cde955f -> 06a9f37a88b5 ✓ dist/: marker present in 6 built files × add_sso_user on a managed boot: the dialog adds a pending person with the picked grants and manager × CONTROL: off a managed environment the same targets answer 409 and add no one Tests 2 failed | 1 passed | 45 skipped (48) ablation-replace: ok restored: blob == HEAD (cde955f) and `git diff HEAD` is empty ✓ dist/: marker absent from all 66 built files ✓ tree: working tree clean against HEAD A5 "target: '/api/v1/auth/admin/import-sso-users'," → "target: '/api/v1/auth/admin/import-users?abl=A5'," ablation-replace: ok mutation landed: anchor 1 -> 0, blob cde955f -> c330612f4396 ✓ dist/: marker present in 6 built files × import_sso_users on a managed boot: the dialog's CSV adds each row as a pending person × CONTROL: off a managed environment the same targets answer 409 and add no one Tests 2 failed | 1 passed | 45 skipped (48) ablation-replace: ok restored ... ✓ dist/: marker absent ... ✓ tree clean restored tree: Tests 3 passed | 45 skipped (48) ``` </details> ## Acceptance notes - **No spec change, so the feature-gate registry does not book the two actions.** `PUBLIC_AUTH_FEATURES.cloudManaged` (`packages/spec/src/kernel/public-auth-features.ts`) books inputs under one predicate, `features.cloudManaged != true`, and `feature-gate-guard.test.ts` holds every booked input to it, so an input the flag SHOWS cannot be booked there without a new registry member. The order rules out a spec change, and the registry has no runtime reader (only this guard), so the two inputs are listed in a test-local `SHOWN_WHEN_ON` beside the reverse walk, and pinned. The question whether the registry should model that polarity is in the report. - **`sys_invitation.resend_invitation` is offered on a managed environment, and its door refuses there.** Measured in the table: its predicate has no `cloudManaged` term, and `organization/invite-member` answers `409` on a managed environment, resends included (`auth-manager-before-hook.ts`). It is not an add-person action and this PR leaves its predicate as it is; reported for the seat. - **`ban_user` / `unban_user` keep `requiresFeature: 'admin'`.** objectstack-ai#33227 made both doors work without the admin plugin, and its hand-over names this card for dropping that gate. The order scopes this card to adding people and does not name it, so it is left alone and raised in the report. - **Neither new action is exposed to AI agents**: no `ai` block. ADR-0011's identity-actions note lists the actions assessed so far; these two postdate it and are human-only until assessed, as `list_platform_admins` is. - The resultDialog of `import_sso_users` shows the per-row answer as JSON. The row-by-row UI, re-send and the status display are objectstack-ai#33187. - Clause-② widening, what it widens: two new published `sys_user` actions and their `en` plus ten translated locale keys (`add_sso_user.*`, `import_sso_users.*`). Nothing previously offered is hidden. ## Verification Gates derived by `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` on the final head, each run with its exit code captured before any pipe, reconciled with `--ran`: 68 derived families on `e6eb15eb`: 67 exit 0, 1 NOT MEASURED (`pnpm check:dual-build-cjs-loads` exit 3, PREREQUISITE NOT MET: it needs every package's `dist/`; CI runs it). `--ran`: "68 derived famil(ies) accounted for — 67 run, 1 NOT-MEASURED". Plus `pnpm --filter @objectstack/platform-objects typecheck` exit 0 and `pnpm --filter @objectstack/plugin-auth typecheck` exit 0 (lock VERDICT command-exit 0 each), `pnpm --filter @objectstack/platform-objects test` 122 files / 1992 tests passed, `pending-sso-users.test.ts` 48 passed (see Tests). `test:repo` and `pnpm lint` are CI's. Full dogfood not run: no `!` in the title and no `(narrowing)` arm. --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5o1t4Dbyp8n9chrc65)_ --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
…n plugin (objectstack-ai#33989) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi95zbTp65UwtoUVvRXG2cC9v)_ Fixes objectstack-ai#33759 Clause-②: no — offering an existing action in more kernels widens no accepted input set or public export; the dev measures the gaining kernels and the seat amends if the diff reads otherwise Metadata-protocol: none ## 维护者速读 - 改了什么:Setup → 用户里的「封禁 / 解封」(`ban_user` / `unban_user`)去掉了 `requiresFeature: 'admin'`,没开 better-auth admin 插件的环境(自托管默认、托管的 Free/Team 环境)现在也会显示这两个按钮;规格里 admin 特性的门禁登记表同步去掉这两项。 - 为什么改:objectstack-ai#33227 之后这两个接口不依赖 admin 插件也能用(封禁后会话被 `403 BANNED_USER` 拒绝),但按钮仍要求 admin 插件才显示,管理员在这些环境里看不到停用入口。 - 风险与回滚:只改显示条件,接口、权限(`requiredPermissions`)和按行状态切换的判断都不变;其他 admin 插件专属动作(解锁、建用户、设密码、模拟登录)保持隐藏。回滚即还原这一个 PR。 - 先看:`packages/platform-objects/src/identity/sys-user.object.ts`(两处删除与块头注释)、`packages/spec/src/kernel/public-auth-features.ts`(登记表去掉两项)、`packages/plugins/plugin-auth/src/pending-sso-users.test.ts`(新的实跑钉子)。 - 两分钟验证:`pnpm --filter @objectstack/plugin-auth exec vitest run src/pending-sso-users.test.ts -t 33759`,预期 3 个用例全绿(未托管、托管两种内核各一次封禁/解封实跑,加一个对照)。 - 需要你做的:无,席位落地。 ## What changes - `sys_user.ban_user` and `sys_user.unban_user` drop `requiresFeature: 'admin'`. Their `visible` predicates (the platform-admin standing, then the row's `banned` state) and `requiredPermissions` are unchanged. The admin block header in `sys-user.object.ts` now says which actions keep the admin-plugin gate and why these two do not. - `PUBLIC_AUTH_FEATURES.admin.gatedInputs` (`packages/spec/src/kernel/public-auth-features.ts`) no longer books the two actions. This is forced, not chosen: `feature-gate-guard.test.ts` holds the registry and the lowered predicates in lockstep in both directions, so a booked input without the gate reds its forward walk. - Root changeset: `@objectstack/platform-objects` patch and `@objectstack/spec` patch (the registry edit ships in spec). ## Why Since objectstack-ai#33227 (`cbb876c1`) `POST /api/v1/auth/admin/ban-user` and `unban-user` work on a kernel without the better-auth admin plugin: the ban is written through the data engine and the banned row is refused a session with `403 BANNED_USER`. The two actions were still hidden wherever `features.admin` is off, so a platform admin there had no Deactivate / Reactivate in the console. ### Clause-② reading (measured) - **Which kernels gain the two actions.** `features.admin` is served as `pluginConfig.admin ?? resolveScimEnabled(pluginConfig)` (`plugin-auth/src/auth-manager.ts`, the `admin:` row of the public features). So every kernel where the admin plugin is not configured on and SCIM is not effective gains them: self-hosted kernels on the default config, and cloud-managed Free / Team environments, where the plugin mounts only with SCIM. Measured in the live pin below: the harness kernel with `plugins.admin: false` serves `features.admin === false` both with `OS_CLOUD_MANAGED` unset and set, and the declared actions are offered on both; with `plugins.admin: true` it serves `true`. Kernels with the plugin (or SCIM) on already offered both and see no change. - **No door or accepted input moves.** The doors were already mounted unconditionally (`auth-plugin.ts`, the `admin/ban-user` / `admin/unban-user` mounts). Nothing server-side reads `visible`: `packages/runtime/src/action-dispatch.ts` and `packages/runtime/src/domains/mcp.ts` carry zero `visible` / `features` reads (tree a1fd372), so the AI / MCP exposure of the two `ai.exposed` actions is the same as before. Only the console's offer changes. - **The spec export.** `PUBLIC_AUTH_FEATURES` keeps its name and declared entry shape; its `admin.gatedInputs` value loses two strings, and since the object is `as const`, its literal tuple type loses two members. Readers of `gatedInputs` in this repository (packages, ui, scripts, apps; tree a1fd372): `spec/src/kernel/public-auth-features.test.ts` and `platform-objects/src/feature-gate-guard.test.ts` only, plus a comment in `sys-user-set-manager-action.test.ts`. `check:api-surface` and `check:generated` are green. Read as not a narrowing of a public export; the seat amends the line if it reads otherwise. ## Tests - `identity/action-state-visibility.test.ts`, new describe `sys_user Ban / Unban are offered without the admin plugin`: evaluated through `@objectstack/formula`'s `celEngine` on the parsed object, with `features.admin` off on an unmanaged and a managed feature set: Ban is offered on a not-banned row and Unban on a banned one; the standing leg still hides both from a non-admin; CONTROL, exactly `unlock_user`, `create_user`, `set_user_password`, `impersonate_user` still read `features.admin`, and each stays hidden with it off and is offered with it on. - `plugin-auth/src/pending-sso-users.test.ts`, new top-level describe `[objectstack-ai#33759] Ban / Unban are offered and work without the admin plugin` in the existing shared harness (a real `AuthManager` behind `AuthPlugin.registerAuthRoutes` on a Hono app, `plugins.admin: false`): for an unmanaged and a managed kernel, the DECLARED `ban_user` is offered under the features this kernel serves (`getPublicConfig().features`), its `target` with its `recordIdParam` and `banReason` answers 200, the banned row's next sign-in is `403` with code `BANNED_USER` and no session row, then `unban_user` is offered, answers 200, and sign-in is 200 again. CONTROL: `impersonate_user` is hidden on that kernel and offered on one with the plugin on. - Forced test edits: `platform-objects/src/platform-objects.test.ts` (the `feature-gate lowering matrix (objectstack-ai#2874)` rows for `ban_user` / `unban_user` now pin the bare predicate, since nothing is lowered onto it). `feature-gate-guard.test.ts` needed no edit; its forward rows are derived from the registry. ## Acceptance notes - First ablation attempt was a no-op and is declared: the anchor (the ban `visible` line) was contained in its own replacement, so `ablation-replace.mjs` refused it (anchor 1 to 1) and restored the file; no run was read from it. The legs below re-anchor on the `visible` / `recordIdParam` pair. - Not changed, by the card's scope: `unlock_user` keeps `requiresFeature: 'admin'`, though the `set_user_manager` comment calls `admin/unlock-user` a mount registered unconditionally. Whether that door works without the plugin was not measured here. ## Verification Code and tests are final at a1fd372; 8631da3 adds only the changeset's `@objectstack/spec` line. Suites and ablations ran on a1fd372, the derived gates on 8631da3. <details><summary>Ablations (each leg rebuilt platform-objects and read the built artifact)</summary> - Leg ban: re-add `requiresFeature: 'admin'` to `ban_user` (ablation-replace, anchor 1 to 0). Built `dist` read: `ban_user.visible = (current_user.isPlatformAdmin == true && has(record.banned) && record.banned != true) && features.admin == true`. `action-state-visibility.test.ts`: 2 failed (the offer case and the CONTROL roster). `pending-sso-users.test.ts -t 33759`: 2 failed (unmanaged and managed, `expected false to be true` at the Ban offer), CONTROL green. Restore: blob equals HEAD, `git diff HEAD` empty, rebuilt, `dist` read shows the bare predicate, both files green (18/18, 3 passed). - Leg unban: same on `unban_user`. 2 failed in each file, same cases; restored green. </details> <details><summary>Package suites</summary> - `pnpm --filter @objectstack/platform-objects test`: 122 files, 1995 tests passed. Typecheck green. - `pnpm --filter @objectstack/plugin-auth test`: 277 files, 5488 passed, 10 skipped. Typecheck green. - `pnpm --filter @objectstack/spec test`: 842 files, 26956 passed, 1 todo. Typecheck green. - `pnpm --filter @objectstack/spec build && pnpm --filter @objectstack/spec check:generated`: all 14 generated artifacts up to date. </details> <details><summary>Derived gates</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` on 8631da3 derived 88 commands; each was run after a full `turbo run build --filter='./packages/**'` (81/81 tasks) and all 88 exited 0. `--ran` reconciliation: `88 derived, 88 run, 0 NOT-MEASURED, 0 UNRUN` (a derived zero). Two first-round exit-3 prerequisites were cleared before that round: `check-plugin-teardown-shape --self-test` needed its pinned fixture commit fetched into the shallow clone, and `check:dual-build-cjs-loads` / `check:i18n` needed the full package build. CI-owned families (`pnpm lint`, `test:repo`, dogfood) are read from the PR's check-runs. </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes (CI-owned). - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed (none stale). - [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. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmRTCRCDzKb12eoW83s)_ <!-- signed: domain:ui#1 · os-steve · session_01ADHkmRTCRCDzKb12eoW83s --> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
domain:server#7 · os-tesla · session_01L9qibvhGW6DCBPjrcAPjvh
Requested by Tesla · project thread
Fixes #33181
Clause-②: yes (narrowing) — narrowed: ban works without the admin plugin —
admin/ban-usernow works without the admin plugin, and a banned row is refused a session, with the admin plugin's own403 BANNED_USERanswer; both ban doors answered501 NOT_IMPLEMENTEDthere. Widened: two doors,POST /admin/add-sso-userandPOST /admin/import-sso-users(cloud-managed environments only;409 RESOURCE_CONFLICTelsewhere); theidp_pendingvalue ofsys_user.source, which every password door and every session refuses; the auth plugin's optionalenvironmentUserHostoption;AuthManager#isAdminPluginMounted(); the exports ofpending-sso-marker,environment-user-hostandpending-sso-users; and, re-exported from the package root, the helpersbindUserToSoleOrganization,writeAdminAudit,joinCurrentOrganizationandmultiOrgCreationJoinsCurrentOrganization, the classCreationRefused, the typeAdminAuditDecisions(with itsuser.admin_added_pendingevent),SetInitialPasswordOptions(the optional third argument ofrunSetInitialPassword) and the optionalgetBanWriter,host,getDataEngineandloggermembers ofAdminBanEndpointDeps. The cloud-managed refusals ofcreate-user,import-usersand the invitation doors point to Setup → Users.Metadata-protocol: none
Skills-docs: none — no skill under
skills/**teaches the admin user doors, the ban doors or the cloud-managed refusals;content/docs/permissions/authentication.mdxgains the two doors, the pending state, the host option and the ban change in this change.维护者速读
idp_pending)状态存在,没有密码,在通过云端登录绑定之前,任何设密码、重置密码和其他登录方式都会被拒绝。packages/plugins/plugin-auth/src/pending-sso-users.ts(两个入口)、user-session-admission.ts(会话拒绝)、admin-ban-endpoints.ts与user-ban-write.ts(无插件时的停用)。pnpm --filter @objectstack/plugin-auth exec vitest run src/pending-sso-users.test.ts src/pending-sso-seams.test.ts,预期全部通过。What changes
Adding a pending person (managed only). Two platform-admin-gated doors, both mounted by the plugin itself and needing no admin plugin:
POST /admin/add-sso-useremail,name, optionalpositions,permissionSets,manager(the manager's email); a closed key set201;200withalreadyPendingfor a person still pending (the host is told again);409for an address already held by someone not pendingPOST /admin/import-sso-users{ csv }(columnsemail,name,positions,permission_sets,manager_id, lists;-separated) or{ rows }, at most 500200withsummaryand one result per row; a bad row fails alone, managers resolve in a second passOff a managed environment both answer
409 RESOURCE_CONFLICT. The row is written by one engine insert as the system, attributed to the administrator (the AI service-account door's pattern), so it is bornidp_pending: nosys_account,email_verified: false, and no moment where it readsenv_native. Positions and permission sets are inserted under the caller's own execution context (create-user's grant seam, one unit of work), membership comes from create-user's organization bind, and the manager link isadmin/set-user-manager's. An audit rowuser.admin_added_pendingis written after the commit.What a pending row is refused.
admin/set-user-password,set-initial-password(judged after the body is read, through an optionalbeforeWriteonrunSetInitialPassword),/reset-passwordand/phone-number/reset-passwordanswer409 RESOURCE_CONFLICTwith their own sentence (pending-sso-marker.ts), in every mode. Session creation answers403 PERMISSION_DENIED(user-session-admission.ts, composed intosession.create.beforeafter the AI service-account refusal, and reading the user row in that refusal's one read). The first sign-in through the platform identity provider binds to the row (implicit-linking rule 2) andstampIdentitySourcemoves it toidp_provisionedinaccount.create.after, before that sign-in's session; an enterprise provider does not bind (rule 1), and its link does not clear the marker either, since the stamp moves a pending row only on the platform provider's link.Ban works without the admin plugin.
admin/ban-userandadmin/unban-userno longer answer501there: the ban columns are written through the data engine (engineUserBanWriter, the vendor-shaped write mapped tobanned/ban_reason/ban_expires/updated_at; the last-administrator guard judges engine writes in every context), sessions are revoked as before, andsession.create.beforerefuses a banned row with the vendor's own403 BANNED_USERcode and sentence, lifting an expired ban at sign-in as the vendor does. It runs only when the admin plugin is not mounted (AuthManager#isAdminPluginMounted()), so a kernel with the plugin answers exactly as before.The host seam.
environmentUserHost(auth plugin option, read per call) is tolduserAddedafter the person's unit of work commits, and askeduserDeactivated/userReactivatedbefore the ban or unban write. It is never called inside a transaction (execution terms, comment 6870710213). A member that throwsEnvironmentUserHostRefusal(409, an organization owner or admin;403, for exampleDEVELOPER_ORGANIZATION_MEMBER_LIMIT_REACHED) refuses the operation with its own status, code and sentence. A refused deactivation or reactivation writes nothing. A refused add takes that person back out (grants, membership, row) and fails alone on its import row. A refused re-add of a still-pending person leaves that row as it was. Any other throw from a wired host refuses a deactivation (503 SERVICE_UNAVAILABLE, nothing written), since only the host can say whether the person is an organization owner or admin (ruling 5). It never undoes or blocks an add or a reactivation: the answer carrieshost: { notified: false, reason: 'host_failed' | 'no_host' }and the failure is logged atwarn. On the ban doorshostappears only when a host is wired. Every event carriesactorCloudUserId, theaccount_idof the administrator's linkedobjectstack-cloudaccount, read fromsys_accountand never from the request (ruling 3), absent where there is no such link; on an impersonation session it also carriesimpersonatedBy, the administrator at the keyboard, read from the session. A session minted by the host's own sign-in handoff carries no record of itsbyin the environment; attributing those stays with ruling 9's work.Re-adding a pending person re-tells the host and changes nothing else: positions, permission sets or a manager sent with the re-add are named on the answer (and on the import row) as
notApplied. Only the platform provider's link clears the pending marker; a pending row that already holds its platform account but missed its stamp is stamped at its next session. An import row that faults answers the generic sentence, as the single-add door does.Elsewhere.
sys_user.sourcegains the optionidp_pending("Pending SSO Sign-In") with its description; the eleven translation bundles are regenerated withcheck-i18n-bundles.mjs --write. The cloud-managed409sentences point to Setup → Users (final, above). Route ledger rows for the two doors; the tenant audit census regenerated for the new write sites;authentication.mdxdocuments it all.Unchanged: every
env_nativeandidp_provisionedrow at every door;create-userandimport-usersoff a managed environment; the vendor's ban enforcement where the admin plugin is mounted.Breaking
BREAKING for a deployment without the better-auth admin plugin (
auth.plugins.adminoff and SCIM off):admin/ban-usernow works without the admin plugin, and a banned row is refused a session, with the admin plugin's own403 BANNED_USERcode and sentence;admin/unban-userlifts the ban there too. Level stayspatch. ADR-0087 disposition:not-required (no-migration-prescription), in the changeset.Why
Card #33181, child 1a of objectstack-ai/cloud#4465: a managed environment needs people to exist, with their positions, permission sets and manager, before their first sign-in, so seeds and approval flows can name them; on Free and Team hosted kernels (no admin plugin) there was no add door and no working deactivation. Seat rulings on the card: claim amendments 6869729952 and 6870557312.
Verification
Delta at
032dcc50(the contract review record 6879138774 onf5a084c7, its should-fixes 1 to 7 and nit 10): pins added inpending-sso-users.test.ts(fail-closed deactivation and its CONTROLs,notAppliedon both doors, the generic import fault,impersonatedByon ban and add) andimplicit-account-linking.test.ts(only the platform link clears the marker, with its CONTROL; a missed stamp healed at the next session, with its CONTROL). Ablations, each red: C1 the stamp's provider scope (1 failed), C2 the heal (1), C3 the heal's provider filter (2), C4 fail-closed deactivation (2), C5notAppliedon add (1), C6 on import (1), C7 the generic import sentence (1), C8impersonatedBy(2). The tenant audit census was regenerated for the new write site (320 sites) andcheck-tenant-audit-censuspasses. Typecheck exits 0,pnpm lintexits 0, andcheck-issue-citations,check-comment-mask-adoption,check-adr-0087-registration,check-empty-changeset,check-i18n-bundles,check:cross-package-test-inputsandcheck:test-source-aliasall exit 0. The plugin-auth full suite passes after a seam-test fake was taught to answer per object (271 files). The check-runs on032dcc50are the gate verdicts.Readings below were taken at
be43f4e1(one commit onorigin/main7257f57a). Headf5a084c7mergesorigin/maine540baf8. Only the generated tenant audit census conflicted: it was regenerated withtenant-audit-census.mjs --write, its prose figures were updated to the new count (319 sites), andcheck-tenant-audit-censuspasses. After the merge and a rebuild of the packages: plugin-auth typecheck exits 0,check-i18n-bundlesexits 0, and the plugin-auth full suite passes (271 files, 5177 passed, 10 skipped). The check-runs onf5a084c7are the gate verdicts for the merged tree.Measured at main first
At
origin/main88355328, managed (OS_CLOUD_MANAGED=1) with the admin plugin off, as on a Free or Team hosted kernel:admin/create-userandadmin/import-usersanswer the managed409, andadmin/ban-user/admin/unban-useranswer501 NOT_IMPLEMENTED, so no door adds or deactivates a person there.admin/set-user-passwordwrites a credential on a credential-lessenv_nativerow, which is why the pending marker is its own value. The platform provider (objectstack-cloud) binds to an unverified credential-less row andstampIdentitySourcerestamps itidp_provisioned, while an enterprise provider is refused (rule 1). The new test files fail against main's wiring.Ablations (each leg mutated through `scripts/ablation-replace.mjs`, red recorded, restored to HEAD)
enforceBanwiring (admin plugin mounted or not): 4 failed. A8 a user-row read fault answers 503: 1 failed. A16 the one session read carries the admission columns: 6 failed.403/409refusals are honoured: 1 failed. B4 a typed refusal is recognised at all: 5 failed. B5 a refused add takes the person back out: 2 failed. B6 a refused re-add fails the request: 1 failed. B7 the cloud id is read only from theobjectstack-cloudaccount: 3 failed. B8 the ban event carries the cloud id: 2 failed. B9 the take-back removes grants and membership: 1 failed.POST /api/v1/auth/admin/add-sso-user,POST /api/v1/auth/admin/import-sso-users), and pass after.Gates and suites
dispatch-gates --commandsderived 108 families. All 108 ran with</dev/null, with exit codes recorded first, and--ranreconciles:✓ 108 derived famil(ies) accounted for — 108 run, 0 NOT-MEASURED (a DERIVED zero — all 108 recorded an exit code and none of them is 3). After the dogfood-table change, the gates that read test sources were re-run:check-issue-citations,check-comment-mask-adoption,check:cross-package-test-inputsandcheck:test-source-alias, all exit 0.pnpm lint: exit 0.@objectstack/plugin-authand@objectstack/platform-objectsbuilt with declarations: exit 0.@objectstack/plugin-authfull suite: 270 files, 5169 passed, 10 skipped.@objectstack/platform-objects: 122 files, 1958 passed.@objectstack/dogfood: the full run had two failures, the admin-route sweeps naming the two new doors. Both are now classified (ADR-0068 gate first; the admin gets409 RESOURCE_CONFLICToff a managed environment), and the two sweep files re-run green (15 passed). The rest of the run was green: 461 files passed.Acceptance notes
409sentences are final per the maintainer's decision 6878953650 on the card; a later rewording is its own card.sourceat the three password-door pending arms falls through to the existing arms (the pending arm does not narrow main on a read fault). Session admission refuses503on a read fault, as the AI service-account refusal composed before it does.set-initial-passwordrefusal first; a pending caller with that standing meets the pending refusal.sys_userban_user/unban_useractions keeprequiresFeature: 'admin', so the console hides them on Free and Team kernels although the doors now answer there.Human Minimum
packages/specholds no runtime logic. (packages/specuntouched.)pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (Not touched; the translation bundles were regenerated by their generator.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibvhGW6DCBPjrcAPjvh