Repository navigation
feat(platform-objects): Setup → Users on a managed environment offers Add User and Import Users through the pending-person doors - #33755
Conversation
…naged environment Two sys_user actions point at the pending-person doors (admin/add-sso-user, admin/import-sso-users), offered only to a platform administrator while features.cloudManaged is on. The password and invitation actions stay hidden there; off a managed environment nothing changes. Claude-Session: https://claude.ai/code/session_01FEkQ5o1t4Dbyp8n9chrc65 Co-Authored-By: Claude <noreply@anthropic.com>
…every locale Claude-Session: https://claude.ai/code/session_01FEkQ5o1t4Dbyp8n9chrc65 Co-Authored-By: Claude <noreply@anthropic.com>
…loudManaged shows while on Claude-Session: https://claude.ai/code/session_01FEkQ5o1t4Dbyp8n9chrc65 Co-Authored-By: Claude <noreply@anthropic.com>
…n the feature-gate guard Claude-Session: https://claude.ai/code/session_01FEkQ5o1t4Dbyp8n9chrc65 Co-Authored-By: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 13 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 3 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 b5271c3f48ae33dd679fdd56e9fbec6065e153ab && git checkout b5271c3f48ae33dd679fdd56e9fbec6065e153ab
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 12a0f09fca49bf90747e9cea21d566229c33de70 2469b6cee764dd2a1202dc56166085d0b7e47361 && git checkout -B drift-repro 12a0f09fca49bf90747e9cea21d566229c33de70 && git merge --no-ff 2469b6cee764dd2a1202dc56166085d0b7e47361
node scripts/docs-audit/affected-docs.mjs --json 12a0f09fca49bf90747e9cea21d566229c33de70
|
…d label constant Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5o1t4Dbyp8n9chrc65
|
domain:ui#1 · os-project-manager · session_01FEkQ5nWoa1Ze1QzjRTSYXD Contract reviewServed-tier: Face: declaration. Check-runs on ① Derived judgments
② Semver levelClause-②: yes (widening)
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
domain:ui#1 · os-project-manager · session_01FEkQ5nWoa1Ze1QzjRTSYXD 席位核对Verdict: ACCEPT · head
|
|
domain:ui#1 · os-project-manager · session_01FEkQ5nWoa1Ze1QzjRTSYXD Landing · head
State: ready + auto-merge, which waits for Test Core 1/8. |
|
review#1 · os-elon-musk · session_016WV4cy7hQ5MvQ83ByNZ8ZH Contract-review-claim: session_016WV4cy7hQ5MvQ83ByNZ8ZH · head 2469b6c · 2026-11-15T11:21:25Z |
|
review#1 · os-elon-musk · session_016WV4cy7hQ5MvQ83ByNZ8ZH Contract reviewServed-tier: Delta review. Face: declaration, unchanged: the committed changeset's ① Derived judgments
② Semver levelClause-②: yes (widening)
③ Boundary flags
Implemented-by: VERDICT: PASS |
…LOG line, and an 18-5 page erratum (objectstack-ai#34042) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9EaC9kmPYBDw3v97tMkTaQu)_ Fixes objectstack-ai#33903 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:18.5.0 已发布但发布说明漏记的 11 条变更,补进 14 个包的 CHANGELOG 18.5.0 节(私有包 app-shell 补在它这次发的 18.4.1 节),删掉这 11 个 changeset 文件,并在 18-5 发布页加一节勘误。 - 为什么改:18.5.0 的版本提交 `b914e724` 没有消化这 11 个 changeset,代码已随 18.5.0 发出,但 CHANGELOG 和发布页都没写;其中 objectstack-ai#33637 是破坏性变化(`os audit verify` 遇到被两个 checkpoint 同时列出的行,现在报 `listed_twice` 并失败)。按裁决 6896138728「事后补就可以」只做补记。 - 风险与回滚:纯文字,不发布代码;删掉的 changeset 若留着,下一个版本会把它们当新变化再发一遍。回滚即 revert 本 PR。 - 先看:`content/docs/releases/v18/18-5.mdx` 的勘误节;`packages/plugins/plugin-audit/CHANGELOG.md`(破坏性那条);`packages/spec/CHANGELOG.md`(两条,其中一条进 Minor Changes)。 - 两分钟验证:`git grep -c -E '^- (ac0b9a5|2e1e3b9|fbe349f|2673f59|0feb5ff|1e65a38|e302d32|f8f35db|e0775f7|4b5024d|81371e1): ' -- '*CHANGELOG.md'` 预期 14 个文件共 18 行;`ls .changeset/*.md | wc -l` 比 main 少 11。 - 需要你做的:无,席位落地(Check Changeset 会按规则保持红色,见下方 DELIBERATE CORRECTION)。 ## What changes `packages/*/CHANGELOG.md` and `content/docs/releases/` are release-owned. AGENTS.md (Documentation Guardrails) routes a factual error in a released entry, or on a releases page, to a dedicated docs-only PR, and the maintainer's ruling on this card (comment 6896138728, verbatim: 「没必要,事后补就可以:让发布流程在版本提交之前还有没消化的 changeset 时,拒绝发正式版。」) keeps only the amendment half. This is that PR. Precedent: objectstack-ai#33925. The 18.5.0 version commit `b914e724` (objectstack-ai#33097) consumed 283 of the 294 changesets on its parent. The other 11 landed on `main` after the Version Packages branch point `b76df9a6` and before the merge; each one's adding commit is an ancestor of `b914e724`, and its file is byte-identical on `b914e724` and on this branch's base `bc6b7ffd`. 1. **CHANGELOG entries.** Each changeset's entry is added to the release section `b914e724` wrote for each package it names, in the stock generator's form (`- SHA7: ` + the summary, continuation lines indented two spaces), under the commit that added the changeset, in the `### Minor Changes` or `### Patch Changes` list its bump names, after the last changeset entry and before the `Updated dependencies` lines. No dependents line is invented. 2. **The 11 changeset files are deleted**, so the next version commit does not present them as new. 3. **The 18-5 page** gains `## Erratum — eleven changes 18.5.0 shipped with no CHANGELOG line [#erratum]`: objectstack-ai#33637's FROM → TO and what an operator does, one line for each of the other nine, and a pointer from the release-facts row that said 284 were consumed. objectstack-ai#33725 is already on the page (自动迁移, "Announced, not yet at any door"); it is checked, not repeated. | Changeset | Package | Added to | Commit | 18-5 page | | :--- | :--- | :--- | :--- | :--- | | `31908-p4b2-bounded-checkpoints` | `@objectstack/plugin-audit` | `## 18.5.0` › Patch Changes | `ac0b9a5` (objectstack-ai#33637) | Erratum, breaking: FROM → TO, what to do, rollback note | | `33186-managed-add-people-actions` | `@objectstack/platform-objects` | `## 18.5.0` › Patch Changes | `2e1e3b9` (objectstack-ai#33755) | Erratum, one line | | `33609-related-list-parent-lookup-page` | `@object-ui/console`, `@object-ui/plugin-detail` | `## 18.5.0` › Patch Changes | `fbe349f` (objectstack-ai#33780) | Erratum, one line | | `33649-messaging-preferences-emitting-organization` | `@objectstack/service-messaging` | `## 18.5.0` › Patch Changes | `2673f59` (objectstack-ai#33779) | Erratum, one line | | `33660-ai-model-picker-cost-multiplier` | `@objectstack/spec`, `@object-ui/plugin-chatbot`, `@object-ui/i18n`, `@object-ui/console`; `@object-ui/app-shell` | `## 18.5.0` › Patch Changes; app-shell `## 18.4.1` › Patch Changes | `0feb5ff` (objectstack-ai#33746) | Erratum, one line | | `33689-ai-action-confirmation-elicited` | `@objectstack/spec` | `## 18.5.0` › Minor Changes | `1e65a38` (objectstack-ai#33725) | Already covered (自动迁移 row), not repeated | | `33724-install-relaxes-declared-not-null` | `@objectstack/driver-sql`, `@objectstack/cloud-connection`, `@objectstack/driver-turso` | `## 18.5.0` › Patch Changes | `e302d32` (objectstack-ai#33769) | Erratum, one line | | `33739-scenario-runner-effort` | `@objectstack/scenarios` | `## 18.5.0` › Patch Changes | `f8f35db` (objectstack-ai#33767) | Erratum, one line | | `33753-scenario-dates-follow-run-date` | `@objectstack/scenarios` | `## 18.5.0` › Patch Changes | `e0775f7` (objectstack-ai#33776) | Erratum, one line | | `33754-scenario-grader-written-date` | `@objectstack/scenarios` | `## 18.5.0` › Patch Changes | `4b5024d` (objectstack-ai#33797) | Erratum, one line | | `a2-skills-docs-32678-32825` | `@objectstack/skills` | `## 18.5.0` › Patch Changes | `81371e1` (objectstack-ai#33355) | Erratum, one line | **DELIBERATE CORRECTION.** This PR adds no changeset and deletes eleven (`git diff --name-status` over `.changeset/*.md`: 11 × `D`, 0 × `A`). Each deleted note is already released: its text now stands, unchanged, as the entry named in the table above, in the 18.5.0 tarballs' release section. Under ruling D on objectstack-ai#18375 (the Check Changeset step's route 0) and `.claude/agents/os-dev.md`, `skip-changeset` is not applied to a PR that deletes an existing changeset, so `Check Changeset` stays red by design; it is not a required context. The diff publishes nothing until the next release republishes the tarballs. ## Tests No source changes, so no test suite moves. The CHANGELOG lines are generated, not hand-typed: the summary parse and the stock release-line format were re-implemented in a script and first checked against `b914e724^`: for every changeset `b914e724` consumed among the first 60 (103 package entries), the generated text is found verbatim in that package's CHANGELOG; the only miss is `31908-p4b2-bounded-checkpoints`, the unconsumed one this PR adds. The script asserts, per changeset, one adding commit, an identical blob at the tag and at the base, the release section being the top section of the version `b914e724` gave the package, and the entry not already present. The diff of every CHANGELOG is insertions only. ## Acceptance notes 1. `@object-ui/app-shell` is private and `b914e724` versioned it `18.4.1`, not `18.5.0` (the 18-5 page's release facts say so too), so its entry goes into its `## 18.4.1` section. 2. The 18-5 page still opens with "Release status: 18.4.0 is released, and 18.5.0 is not yet." and its release facts say no 18.5.0 tag or npm version exists. Both are stale since the publish. Outside this card's file surface; left for the seat (noted, not filed). 3. The changeset of objectstack-ai#33649 has no summary line, so its entry opens `- 2673f59: Clause-②: no`, as the stock generator would have written it. ## Verification <details><summary>Premise readings, at base bc6b7ff and the 18.5.0 spec tag = b914e72</summary> - `git ls-tree --name-only b914e72 .changeset/` minus `README.md` and `config.json`: 11 files, the card's list. `b914e724^` holds 294; `b914e724` deletes 283. - For each of the 11: `git rev-parse b914e72:PATH` equals `git rev-parse bc6b7ff:PATH`; the adding commit (`git log --diff-filter=A`, one per file) is an ancestor of `b914e724` (`merge-base --is-ancestor` exit 0, after deepening the shallow clone by 800 commits). The adding commits all fall between `b76df9a6` (the Version Packages branch point the 18-5 page names) and `b914e724`. - Before this PR: `listed_twice`, `ac0b9a5`, `objectstack-ai#33637` each 0 hits on `content/docs/releases/v18/18-5.mdx`. - The erratum's wording is read from the changeset text and `packages/plugins/plugin-audit/src/audit-seal/verifier.ts` (`listed_twice` fault: `checkpoint N: lists row(s) … that another checkpoint already lists`), `content/docs/deployment/cli.mdx` § `os audit verify` (exit 1 when two checkpoints list the same row), and the 18.5.0 entry `f4cafd5` (a late checkpoint leaves out every row a checkpoint stored in between already lists). </details> <details><summary>Gates</summary> Head `f5754612`. Derived with `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` (no paths): 99 commands, each run with stdin from `/dev/null` and its exit captured before any pipe; `--ran` reconciliation: 99 derived, 99 run, 0 NOT-MEASURED, 0 UNRUN. - 98 exit 0. Eleven of them first exited 3 (PREREQUISITE NOT MET, no `dist/` in a fresh worktree) and were re-run exit 0 after the builds they name, each under `scripts/pm/os-verify-lock.sh` with VERDICT command-exit 0: the `@objectstack/lint...` closure plus the `check:i18n` extract closure (64/64 tasks), `@objectstack/client` and `client-react` (43/43), then `pnpm build` (119/119). Re-run: `check:doc-formula-expressions`, `check:doc-security-posture`, spec `check:docs`, spec `check:skill-examples`, `check:docs-transcript-drift`, `check:i18n`, `check:dts-closure`, `check:dual-build-cjs-loads`, `check:lean-entry-closure`, `check:sourcemap-no-sources-content`; and `pnpm --dir ui exec vitest run scripts/`, which first failed 22 files only on the missing `@objectstack/spec` `dist/` and then passed (171 files passed, 2 skipped; 5,065 tests passed). - 1 exit 1, by design: `node scripts/check-empty-changeset.mjs --base origin/main` refuses the eleven deletions as edits of existing notes (one `::error` per file). This is the DELIBERATE CORRECTION class declared above; it stays red, and so does `Check Changeset`. - Release-text gates all exit 0 on the amended tree: `check-release-section-coverage` (plain and `--strict`), `check:release-notes`, `check:release-page-status`, `check-affected-docs`, `check:doc-authoring`, `check:doc-anchors`, `check:nul-bytes`, `check-adr-0087-registration --base origin/main`. `origin/main` moved to `159757ab` while the gates ran; the commits since the base `bc6b7ffd` touch none of this PR's paths (they add four other changesets), so no merge was taken. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmPfCRZtZTTC4KzLjJR)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmPfCRZtZTTC4KzLjJR <!-- signed: domain:devx#2 · os-steve · session_01ADHkmQTVjryTSkqydKVS6z --> Co-authored-by: Claude <noreply@anthropic.com>
Requested by Leehom · project thread
domain:ui#1 · os-project-manager · session_01FEkQ5o1t4Dbyp8n9chrc65
Fixes #33186
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
OS_CLOUD_MANAGED=1)的「设置 → 用户」重新出现两个按钮:「添加用户」(邮箱、姓名,可选岗位、权限集、上级邮箱)和「导入用户」(粘贴 CSV)。两者都走 feat(auth)!: a managed environment adds pending, SSO-only people, and ban works without the admin plugin #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, #25309), and since #33227 the environment has its own add-person doors,POST /api/v1/auth/admin/add-sso-userandPOST /api/v1/auth/admin/import-sso-users. Nothing in Setup reached them. This PR adds their two first-party actions onsys_user:add_sso_user("Add User", list toolbar,type: 'api', targetadmin/add-sso-user). Params:emailandname(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),managerErrorandhost.reason(the hosting organisation was not told).import_sso_users("Import Users", list toolbar, targetadmin/import-sso-users). Onecsvparam (textarea); the result dialog showssummary.added/alreadyPending/failedand the per-row answer as JSON. The row-by-row UI is Setup → Users on a managed environment: add-person and CSV-import UI with per-row invitation status (reverses objectui#13330 for adding) #33187's.Both are offered by
current_user.isPlatformAdmin == true && has(features.cloudManaged) && features.cloudManaged == true:gateAdmin→judgePlatformAdmin, ADR-0068 D4), and both declarerequiredPermissions: [...PLATFORM_ADMIN_USERS_GATE]like every other door in that family. NorequiresFeature: 'admin': the doors mount without the better-auth admin plugin, which Free and Team kernels do not carry.features.cloudManaged == trueis where the door answers; off it the door answers409 RESOURCE_CONFLICT.has()keeps both hidden while the console holds no served flag: an actionvisiblethat faults SHOWS the action (RequiresFeatureSlotdocs inpublic-auth-features.ts), the trapcreate_user's second email param already guards against.No existing predicate is edited.
create_user,set_user_password, the fourinvite_usermirrors andcopy_invitation_linkstay hidden on a managed environment.Measured first (tree
a199be81=origin/mainee627c67plus the two actions; the measuring script evaluates every identity action whose target is a person-adding, invitation or password door through@objectstack/formula'scelEngine, as a platform admin who also holdsorg_owner):sys_user.invite_userorganization/invite-membersys_member.invite_userorganization/invite-membersys_invitation.invite_userorganization/invite-membersys_organization.invite_userorganization/invite-membersys_user.create_useradmin/create-usersys_user.set_user_passwordadmin/set-user-passwordsys_invitation.copy_invitation_linksys_invitation.resend_invitationorganization/invite-membersys_member.add_memberorganization/add-membersys_user.add_sso_user(new)admin/add-sso-usersys_user.import_sso_users(new)admin/import-sso-usersThe six doors of #25309 are the first six rows. The doors answer as the card says:
admin/add-sso-userandadmin/import-sso-usersadd a person on a managed boot and answer409 RESOURCE_CONFLICToff it (the live pins below drive both legs).resend_invitationis 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-leveldescribebeside the six-door one. The real served predicates throughcelEngine, bound as the console binds them:requiresFeature;false, not a fault) when no flag is served; hidden from an organization owner below the rung, even when managed;packages/plugins/plugin-auth/src/pending-sso-users.test.ts, a new top-leveldescribein the existing harness (a realAuthManagerbehindAuthPlugin.registerAuthRouteson a real Hono app). Each leg reads the DECLARED action from@objectstack/platform-objects/identity, posts its dialog's body to itstarget:add_sso_useron a managed boot answers201; the row readssource = idp_pending, nosys_account, the picked position and permission set, and the manager linked;import_sso_userson a managed boot: a two-row CSV answers200, summary{ total: 2, added: 2, alreadyPending: 0, failed: 0 }, both rowsidp_pending;409 RESOURCE_CONFLICTand adds no one.platform-admin-affordance-standing.test.tsnow 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 (everyfeatures.*reference is booked) reads a new test-localSHOWN_WHEN_ONlist for the two actions, and a newdescribeholds each to the inverse conjunctshas(features.cloudManaged)andfeatures.cloudManaged == true, on a flag whose semantics arehide-when-on, and not booked the other way.Runs at head
e6eb15eb:@objectstack/platform-objectsfull suite 122 files, 1992 tests passed;pending-sso-users.test.ts48 passed (3 new), run ata199be81; neither it norsys-user.object.tschanged after, and the three new legs passed again on the restored tree after A5.Ablations at head
71185c1d, each throughscripts/ablation-replace.mjs, each restored to the HEAD blob withgit diff HEADempty:A1 drop the managed half of the predicate → 7 red
A2 drop the platform-admin standing → 6 red
A3 drop the has() guard → 4 red
A4 / A5 point each action at the password door → its live pin red; dist rebuilt both legs
plugin-auth reads
@objectstack/platform-objectsfromdist/, so each leg rebuilt it and proved the marker withscripts/ablation-dist-preflight.mjs.Acceptance notes
PUBLIC_AUTH_FEATURES.cloudManaged(packages/spec/src/kernel/public-auth-features.ts) books inputs under one predicate,features.cloudManaged != true, andfeature-gate-guard.test.tsholds 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-localSHOWN_WHEN_ONbeside the reverse walk, and pinned. The question whether the registry should model that polarity is in the report.sys_invitation.resend_invitationis offered on a managed environment, and its door refuses there. Measured in the table: its predicate has nocloudManagedterm, andorganization/invite-memberanswers409on 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_userkeeprequiresFeature: 'admin'. feat(auth)!: a managed environment adds pending, SSO-only people, and ban works without the admin plugin #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.aiblock. ADR-0011's identity-actions note lists the actions assessed so far; these two postdate it and are human-only until assessed, aslist_platform_adminsis.import_sso_usersshows the per-row answer as JSON. The row-by-row UI, re-send and the status display are Setup → Users on a managed environment: add-person and CSV-import UI with per-row invitation status (reverses objectui#13330 for adding) #33187.sys_useractions and theirenplus 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/objectstackon the final head, each run with its exit code captured before any pipe, reconciled with--ran: 68 derived families one6eb15eb: 67 exit 0, 1 NOT MEASURED (pnpm check:dual-build-cjs-loadsexit 3, PREREQUISITE NOT MET: it needs every package'sdist/; CI runs it).--ran: "68 derived famil(ies) accounted for — 67 run, 1 NOT-MEASURED". Pluspnpm --filter @objectstack/platform-objects typecheckexit 0 andpnpm --filter @objectstack/plugin-auth typecheckexit 0 (lock VERDICT command-exit 0 each),pnpm --filter @objectstack/platform-objects test122 files / 1992 tests passed,pending-sso-users.test.ts48 passed (see Tests).test:repoandpnpm lintare CI's. Full dogfood not run: no!in the title and no(narrowing)arm.Generated by Claude Code