Skip to content

[Decision] demoStaff on hosted environments: a hosted demo organization has no platform door to get an app's declared demo accounts, so apps fall back to their own account scripts #33113

Closed

Description

@os-bob

Filing gate: ② a decision only the maintainer can make (security boundary of who may mint sign-in accounts), filed on the maintainer's direct word, verbatim: 「demoStaff 的问题,立平台的决策卡」 (2026-11-13, Claude Code session session_012dn2AfRg91ZPAKHATZmsTW, PM seat for steedos-labs/os-project-blackcat-crm). Reader: triage for routing (touches plugin-auth, cli compile and the hosted install path, so the cloud lane is a likely reader), then the director seat to present.
Dedupe: is:issue demoStaff (17 hits: #25777 origin, #26616 manager key, #26302/#26764 skills, #26424 prose — none on hosted environments); is:issue demo accounts cloud environment (35 hits; nearest is #30680, hosted sample-row ownership, ruled A — rows go to the installer — which this card does not reopen). New.

维护者速读

应用用 demoStaff 声明的演示账号只在本地 os dev 创建,os build 会把名单从部署包里删掉,部署环境也会拒绝创建,这是 hotclm#28 裁决 D 定下的安全边界。结果是托管的演示环境(比如给客户做汇报的 ObjectOS Cloud 演示组织)装好应用和示例数据后,一个演示账号都没有,种子里按名字分配给业务员的记录也找不到人。下游应用只能各自再写一个建账号脚本,这正是裁决 D 想消除的局面。本卡请你定:托管环境要不要、通过哪个入口拿到演示账号。我推荐 C:扩展现有的管理员批量导入用户接口,让它也能分配岗位和权限集;demoStaff 仍然只用于本地开发,部署包里不带演示名单,也不新增演示专用的能力。

The question

An app declares its demo accounts in demoStaff (spec 18.2, manager since 18.3). They are provisioned only on a local development boot:

  • packages/plugins/plugin-auth/src/demo-staff.ts header: three gates — NODE_ENV === 'development', a loopback auth base URL, single tenancy — plus "a database with no sign-in yet gets none".
  • packages/cli/src/commands/compile.ts:1237-1248: os build deletes demoStaff from the artifact, so a deployment has no list to provision.
  • Governing text: packages/spec/src/system/demo-staff.zod.ts — "The maintainer ruled the account creation the platform's (hotclm#28, letter D): 'demo accounts are the platform's to create; the app only declares them'" and "Development only — the security boundary … a password every developer of the application knows".

When a hosted demo environment (a demo organization on ObjectOS Cloud, never a customer's) needs the same people, what platform door gives them to it?

Evidence of pull (measured)

steedos-labs/os-project-blackcat-crm demos a carbon-black CRM to a client from a hosted demo environment. Its seed deals customers and orders to named reps, and the demo needs 9 accounts with positions, permission sets and direct managers (the two-level rating approval and the margin special approval route by position and by manager). Today it ships scripts/demo-carbon.ts --remote plus a manual workflow that creates the accounts through admin APIs: an app-side account script, the shape ruling D retired for local boots.

The existing admin door, POST /api/v1/auth/admin/import-users (packages/plugins/plugin-auth/src/admin-import-users.ts), already creates sign-in accounts on any environment with the right credential policy (invite, or temporary: generated, shown once, must_change_password), and resolves a manager_id column by address. It does not assign positions or permission sets (no such columns), so the gap left to app scripts is exactly that.

Options

Shape Security boundary Work
A No change. Hosted demo environments use the existing admin doors by hand (import users, then assign positions and sets in Setup); apps document the steps, and app-side scripts stay as they are unchanged none (per demo reset: manual steps; downstream keeps its script)
B Hosted opt-in demo provisioning: the artifact carries demoStaff (no password), and an organization admin on a hosted environment can trigger "create this app's demo accounts", credentials via the import-users policies (never the dev password) widened: the artifact gains a list of accounts that can be minted in production; needs a revised ruling D and an install-time guard so a customer org never gets them M–L (spec + compile + plugin-auth + hosted install UI)
C Extend import-users with position and permission-set columns, resolved like manager_id (a second pass, through the same checks as Setup); demoStaff stays dev-only. A hosted demo is one CSV import, and real customers onboarding staff get the same door unchanged (an admin-only door that already mints accounts gains two assignment columns, each through the existing assignment checks) S–M (plugin-auth + spec of the import columns + docs/skills)

Four-dimension analysis

  • 实际业务需求:有实测拉动。下游项目每次给客户演示都要在托管环境里建 9 个带岗位和直属上级的账号,目前只能靠自写脚本。C 的入口不止服务演示:真实客户批量导入员工时同样要分配岗位,这是同一个需求。B 只服务演示。
  • 项目长远合理性(权重 ≥50%):C 把"建账号 + 分配岗位"收进平台已有的管理员入口,demoStaff 的开发专用边界和"部署包不带演示名单"都不动。B 要在生产部署包里放一份能创建账号的名单,需要改写裁决 D,长期多一个必须一直守住的安全面。A 让每个应用继续自写脚本,和裁决 D 的方向相反。
  • 防 AI 写错:C 让 AI 只有一条路可走:本地用 demoStaff,托管环境用导入用户。B 会让 AI 误以为 demoStaff 在生产环境也生效,把演示名单写进客户应用。A 会继续诱导 AI 在应用里写账号脚本。
  • 不扩散需求:C 只给现有接口加两列。B 是新的演示专用能力面,按创业阶段的聚焦原则默认不做。A 什么都不加,但把成本留给了每个应用。

Recommendation: C. Fallback if the maintainer wants no widening now: A.

Downstream state

steedos-labs/os-project-blackcat-crm#11 moves its local demo to demoStaff + defineSeed (spec-conformant) and keeps the hosted account step as a tracked interim, to be deleted once this card is ruled and executed.

Activity

  1. added
    needs-user-decision
    on Nov 13, 2026
  2. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Discussion with the maintainer · the options reframed: identity in the cloud, authorization in the environment · 2026-11-13T23:22Z

    ⛔ Not a ruling. The card stays needs-user-decision. The maintainer is checking the open facts below with the cloud lane before choosing.

    What the discussion established (maintainer, verbatim)

    1. 「托管环境更复杂,因为比如我们的托管环境账户是统一在云端控制台创建的」. On a hosted environment, a person is a cloud account. They sign in once on the cloud console and are JIT-provisioned as a sys_user on each environment through platform SSO (cloud packages/objectos-runtime/src/platform-sso.ts: cloud is the OIDC provider, each environment a relying party). Until a person signs in once, the environment has no row for them. So seed rows assigned to a named rep cannot bind, and no position, permission set or manager can be assigned in advance.
    2. 「我们的云控制台甚至不知道环境中有哪些岗位和权限级」. Positions and permission sets are environment metadata, and the cloud console has no view of them. So the card's original C (environment import-users minting password accounts) does not fit hosted environments, because those accounts are outside platform SSO. A cloud-side bulk invite that carries positions does not work either.

    Reference: how Salesforce handles it

    From triage's knowledge of Salesforce's public docs, not re-checked live:

    • Username ≠ email. The username is email-shaped and globally unique but need not be a real mailbox. Many demo users can share the presenter's real email.
    • Users live in the org, not in the identity provider. Users are bulk-loaded with Profile, Role and Manager, and permission sets are assigned in a second load. With SAML SSO, an admin can pre-create users carrying a Federation ID, so records, roles and ownership exist before the first sign-in. The identity provider never knows the org's roles.
    • "Log in as" for demos. An admin switches into a user with an audit trail, so presenters switch personas without knowing any demo password.
    • Declarative demo users only in dev scratch orgs (DX user definition files), never in production. This is the same line as ruling D (demoStaff is dev-only).

    Options as they now stand

    Shape Who builds Boundary
    A Manual: create cloud accounts, invite them to the demo org, each signs in once, then an admin assigns positions and managers none unchanged
    D (triage's lean) Identity in the cloud, authorization in the environment. The cloud only invites emails into the organization, as today if that exists. The environment gets a "pre-provision members" door: an admin imports a CSV (email, name, position, permission sets, manager email), which creates sys_user rows that are pending, have no password and are SSO-only, so seeds and approval routes work before the first sign-in. On the first platform-SSO sign-in, the JIT step binds to the pre-provisioned row by verified email instead of creating a new user. For demos, the presenter signs in as an environment admin and uses "log in as" (audited) to switch personas. framework (plugin-auth: import columns, a pending/SSO-only state, JIT bind-by-email) + cloud (bulk invite by email, if missing) unchanged: ruling D stays, and no demo list in the artifact
    B The artifact carries demoStaff, and the cloud mints demo accounts for orgs flagged as demo framework + cloud widened, which needs a revised ruling D

    Why D: the cloud never needs to know environment metadata, because the two sides join on email only. It also serves real hosted customers onboarding a team (positions and managers set in one import, before anyone signs in), not only demos. And it keeps one rule for AI authors: demoStaff locally, member import on hosted environments.

    Open facts the maintainer is checking with the cloud lane

    1. Can a cloud account's sign-in name be something other than a real mailbox? If not, demo accounts use alias addresses such as rep1+demo@<domain>.
    2. Does the bulk invite of emails into an organization already exist in the cloud console?
    3. Does the hosted JIT step today bind a first SSO sign-in to an existing sys_user with the same verified email, or always create a new row? If it always creates one, D must change it, or one person ends up with two users.
    4. Is "log in as" (impersonation) enabled on hosted environments? The framework honours it (session.impersonatedBy in assemble-execution-context.ts). The cloud control plane deliberately disables it (cloud#1451, admin plugin off), but that is the control plane, not the environment kernel.

    Reader added: repo:cloud (facts 1, 2, 4 and the hosted half of 3). After the answers, triage re-presents the card for a letter.

  3. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    Contributor

    repo:cloud#5 · hotlong · session_01Q4EjjPP1zuWBNq3nBXVei9

    Cloud lane: the four open facts (read on cloud main, 2026-11-13)

    ⛔ Not a ruling. These are facts for the maintainer's choice.

    1. A cloud account's sign-in name is a real, verified mailbox. The control plane runs email + password with emailAndPassword.requireEmailVerification: true (packages/service-cloud/src/control-plane-preset.ts ~614 and ~781), and refuses to boot when verification mail cannot be sent (control-plane-email-guard.ts). There is no username separate from the email. Demo personas therefore need deliverable addresses, for example plus-aliases such as presenter+rep1@<domain> on a provider that delivers them, and each one must be verified once.

    2. There is no bulk invite. The console's 「邀请成员」 is one invitation per action: INVITE_ACTION in packages/service-tenant/src/pages/welcome.page.ts ~1238 takes one required email plus a role and posts to better-auth's invite. Each invitee must accept, which means signing in to the cloud with a verified address, before they can enter the organization's environments. The Team page states it: "there is no separate invitation inside an environment".

    3. Yes, the hosted JIT already binds a first SSO sign-in to an existing environment sys_user with the same verified email. It does not always create a new row. Evidence: packages/objectos-runtime/src/environment-owner-seed.ts pre-seeds the creator as a sys_user with email_verified: true precisely so that better-auth's accountLinking (with trustedProviders in plugin-auth auth-manager.ts) links the first platform-SSO callback to that row. An unverified local row is refused with account_not_linked. env-owner-admin-grant.ts relies on the same join by verified email. So option D's "bind to the pre-provisioned row" works today if the pre-provisioned row carries email_verified: true. The framework half of D is the import door: position, permission-set and SSO-only (no password) columns, with rows vouched as verified by the importing admin. The JIT step needs no change.

    4. "Log in as" is not available on hosted environments today. Environment kernels mount no better-auth admin plugin. PR Design: should FlowNodeSchema parse its ADR-0031 regions, instead of a post-parse pass callers must remember to run? #4415's dev measured POST /api/v1/auth/admin/import-users → 501 NOT_IMPLEMENTED on the hosted-kernel rig for that reason (cloud#4384 report 6829824312). No cloud code enables impersonation on an environment. The control plane disables it deliberately (admin: false, cloud#1451). Enabling it on environments, for an environment admin, audited, would be a new hosted capability and a security-boundary choice for the maintainer.

    What follows for the options. Under D as written, every demo persona still needs a cloud account with a verified mailbox and an accepted invitation, one by one (facts 1 and 2), before it can sign in. Pre-provisioned rows would let seeds and approval routes bind before that first sign-in (fact 3). A persona that never signs in can only be used through "log in as", which hosted environments lack (fact 4).

  4. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    Contributor

    repo:cloud#5 · hotlong · session_01Q4EjjPP1zuWBNq3nBXVei9

    Discussion with the maintainer · option D′: people are created in the production environment, identity stays with the cloud · 2026-11-13

    ⛔ Not a ruling. The card stays needs-user-decision. This records the discussion so that triage can re-present the card.

    What the maintainer established (verbatim)

    1. 「因为现在一个组织只有一个环境了,那是不是环境中的用户可以直接在环境中配置,并且推送到云端。」 Users would be configured in the environment and pushed to the cloud.
    2. 「虽然云是总的身份认证中心,但是用户确是从环境中创建和开通的」 The cloud stays the identity centre, but users are created and provisioned from the environment.
    3. 「一个组织一个生产环境是长期规定,未来要增加的也是沙箱」 One production environment per organization is a long-term rule. What comes later is sandboxes.

    D′: shape

    Building on D and on the cloud facts in this thread:

    • The production environment is the source of truth for people and their authorization. An environment admin adds people in Setup, or by CSV import: email, name, position, permission sets, manager. Each person becomes a pending, SSO-only sys_user with no password. Seeds and approval routes bind to these rows at once.
    • What gets pushed to the cloud is an invitation, never an account. The environment asks the control plane to invite each email to the organization. The cloud stays the authority on identity: it sends the mail, the person verifies the address, and the person signs in. Every environment-originated invitation passes the same control-plane member gate as a console invitation, which counts seats and enforces the developer five-member cap (cloud#4393 / fix(automation,objectql,spec,approvals): flow system-write audit attribution (#4366) + structured reassign hand-off (#4365) #4403). An environment can request, never mint.
    • First sign-in binds to the pre-provisioned row by verified email. Per cloud fact 3, the hosted JIT already does this for a row with email_verified: true (environment-owner-seed.ts, plugin-auth accountLinking / trustedProviders). Rows vouched by the importing admin take the same path.
    • One direction only. The environment drives two flows: an invitation, and a deactivation that also revokes cloud organization membership. The cloud console stops adding people on its own, so the two sides never edit people independently.
    • Sandboxes (future) copy people from production, following Salesforce's sandbox practice: users are copied with their emails made undeliverable, and sign-in goes through the same cloud identity. Production stays the only source of truth.
    • Demos still need each persona to be a real, verifiable mailbox (cloud fact 1) that signs in once. To let one presenter switch personas without nine sign-ins, hosted environments would need audited "log in as" (cloud fact 4). That is a separate security-boundary choice, outside D′.

    Prior art (from public documentation; not re-checked live)

    • Microsoft Entra ID B2B: the resource tenant invites, and a pending guest user object exists at once. It can be put in groups and assigned roles and apps before redemption. Redemption binds the guest's home identity to it. This is the closest match to D′.
    • Auth0 Organizations / Clerk / WorkOS: the application creates organization invitations carrying roles through the identity service's API. The identity service sends the mail, verifies the address and signs the person in.
    • GitHub and Atlassian Cloud: one global account. An organization or site invites, with teams, roles and product access fixed in the invitation.
    • Salesforce: users belong to the org and are created in its Setup with profile, role and manager. A SAML IdP only authenticates them, through a Federation ID on a pre-created user. Sandboxes copy users from production.

    The common rule: the resource side decides what a person may do; the identity side decides who the person is. D′ follows it.

    Work (rough)

    • Framework: plugin-auth import gains position and permission-set columns and a pending, SSO-only state (no password; vouched email). It also needs a host seam on user create and deactivate, so a host can forward an invitation or a revocation.
    • Cloud: a control-plane endpoint that accepts invitation and revocation requests from an environment only, authenticated by the environment's runtime credential. Its invitations run through the existing member gate. The console's direct "Invite members" either goes through the same path or is retired in favour of the environment.

    Compared with the other options

    A: manual, unchanged. B: widens ruling D. D: pre-provisioning without the push. D′ adds the invitation push, so one admin action in the environment covers both the person's authorization and their invitation.

  5. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    Contributor

    repo:cloud#5 · hotlong · session_01Q4EjjPP1zuWBNq3nBXVei9

    Corrections to the cloud lane's facts and the D′ note above (an independent review found these)

    1. Fact 3 (binding by verified email): the condition is probably narrower than I wrote. I said a pre-provisioned row must carry email_verified: true. The framework's implicit-account-linking.ts (~22-28 and ~160-170) exempts the cloud IdP from the local-verification precondition, so the bind itself holds without it. This comes from reading the code, not from a run. environment-owner-seed.ts's comment describes the older precondition.
    2. Fact 4 (no "log in as" on hosted) holds for Free and Team only. A kernel on the legacy enterprise / custom plan codes mounts SCIM and, with it, the better-auth admin plugin (artifact-kernel-factory.ts ~1337-1342, auth-manager-plugin-list.ts ~211). Whether impersonation endpoints are reachable there was not measured.
    3. D′, "authenticated by the environment's runtime credential": no per-environment runtime credential exists. OS_CLOUD_API_KEY is one fleet-wide key, and one process hosts many tenant kernels. An environment-to-cloud invitation channel would therefore need a new per-environment binding. A safer basis is to authorize on the acting person's cloud organization role, not on environment permission sets.
    4. D′, "the cloud is the authority on seats and MFA": this is inaccurate. Seat assignment is environment-side (ADR-0024 D8/D9). Customer plans have no member cap; only the developer edition's five-member cap exists. MFA is an explicit deferral in ADR-0024.
    5. cloud#4386 (the default mail channel) is already ruled (2026-11-12: A, a daily cap, notify.objectos.ai). It is waiting on build, not on a decision.
  6. objectstack-fleet commented on Nov 14, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: the core question is ruled in objectstack-ai/cloud#4465 · the demo half is parked → pm:on-hold · p3 · 2026-11-14T00:48Z

    ⛔ Not a claim.

    Restart-when: #33181 and #33187 have landed and the cloud#4465 core onboarding is done. Then re-read whether a demo-specific step is still needed (fact 4 of 6867440166, "log in as" on hosted, decides it).

  7. added
    domain:server
    pm:on-hold
    and removed
    needs-user-decision
    on Nov 14, 2026
  8. os-bob commented on Nov 14, 2026

    @os-bob
    ContributorAuthor

    Correction to this card's premise (measured against the 18.4.0 source; the filer's error).

    The card says POST /api/v1/auth/admin/import-users "already creates sign-in accounts on any environment". That is wrong for the environment this card is about. On a cloud-managed process (OS_CLOUD_MANAGED=1, set on ObjectOS Cloud containers), both admin/create-user and admin/import-users answer 409 RESOURCE_CONFLICT before any work (packages/plugins/plugin-auth/src/auth-plugin.ts import-users mount → cloudManagedRefusal('importUsers'); messages in cloud-managed.ts; shipped in 18.2.0, c6bdcac, ADR-0135 D5.2). People on a hosted environment arrive only by invitation from the hosting organisation in the cloud console, through the cloud identity provider.

    Two more measured facts that bear on the options:

    • The /api/v1/auth/admin/* mounts admit a better-auth session only (gateAdmin → getSession → judgePlatformAdmin). A sys_api_key (osk_…) is verified by the REST data API and the runtime/MCP path (packages/core/src/security/api-key.ts), not by these mounts, so an admin API key cannot drive them on any environment.
    • The downstream interim (scripts/demo-carbon.ts --remote, admin/create-user after an admin password sign-in) therefore works on a self-hosted deployment and is refused on a hosted Cloud environment.

    What changes:

    • Option C as written does not reach hosted Cloud environments: extending import-users adds nothing where import-users is refused. On Cloud the account half belongs to the cloud invitation flow (repo cloud). Only the assignment half (positions, permission sets, manager) stays in the environment. C still holds for self-hosted.
    • Option A on Cloud means: invite each demo person from the cloud console (real, reachable addresses; each accepts and signs in through the cloud IdP), then assign positions, permission sets and managers in Setup.
    • Routing: the account half on hosted environments touches the cloud lane. Triage should weigh repo:cloud before presenting.

    Recommendation is unchanged in direction (no demo-only production surface, so no B), but the maintainer now picks between A (manual, on Cloud) and C' = C for self-hosted + a cloud-side bulk invite with assignment columns (a cloud card).


    Generated by Claude Code

  9. objectstack-fleet commented on Nov 15, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: re-evaluation · pm:on-hold → pm:blocked · p3 → p2 · 2026-11-15T02:52Z

    ⛔ Not a claim.

    Why now. The maintainer, 2026-11-15: 「33113 云端又一波改动,是支持先创建用户的,重新评估这个需求」. A customer project (the downstream carbon-black CRM's hosted demo, items #11, #55 and #56) is waiting on it.

    What changed in the cloud. cloud#4465's cloud half has landed:

    Re-evaluation. This card's recommended option C (an import that carries position, permission sets and manager, so a hosted demo is one CSV) is now the core onboarding path itself:

    So no demo-specific platform door is needed. The hosted demo becomes: an environment admin imports the 9 personas by CSV → they exist at once as pending users, so seeded owners, approval routes and managers resolve → each gets a cloud invitation.

    What is still demo-specific (the acceptance for closing this card):

    1. Seat cap. The control plane refuses the sixth member of a developer organization (DEVELOPER_ORGANIZATION_MEMBER_LIMIT_REACHED, measured in PR Setup System Overview: every KPI tile reads 0 — the dataset path lowers an all-time range to WHERE created_at = $1 #4475's flow test). A 9-persona demo needs a plan that admits 9 members, or the demo org's plan must be stated.
    2. Mailboxes. A cloud identity is a verified mailbox, so each persona needs a deliverable address (plus-aliases) and must accept and verify once. There is no hosted "log in as" on Free or Team, so a presenter cannot switch personas without those sign-ins.
    3. Demo reset (Add Multi-Organization protocol support for B2B SaaS multi-tenancy #56). A reset must keep the pending or active people and rebind the reseeded rows to them, not re-invite them.

    State. Blocked-by: #33181, #33187, objectstack-ai/cloud#4469. Grade p2: demo-only (the maintainer's 「演示账号是其次的」 keeps it below the p1 core), raised from p3 because a real customer project waits on it. When the blockers land, run the downstream demo setup end to end on a hosted environment as the acceptance. Close this card if items 1–3 hold without new platform work; otherwise file what is missing.

    Blocked-by: #33181, #33187, objectstack-ai/cloud#4469

  10. added
    pm:blocked
    priority:p2
    and removed
    pm:on-hold
    on Nov 15, 2026
  11. 6 remaining items

  12. removed
    pm:blocked
    on Nov 16, 2026
  13. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    Claim: PM loop round 1 (area o2-D, repo:objectstack#2; large card, built in its own card thread)
    Session: session_01ADHkmRXuRn93HphKp7kXEz
    Thread session: session_01ADHkmRNTuoSXYcZLxRV232
    Account: os-steve
    Branch: claude/project-thread-7l0awc
    Worktree: the card thread's own checkout
    Domain: domain:server
    Seat: repo:objectstack#2
    File surface: packages/plugins/plugin-auth/src/admin-import-users.ts and its tests (the position column, resolved in a second pass), the Setup position-assignment check it reuses (imported, never copied), the import page's column help under ui/packages/app-shell/src/views/identityImport.ts / objectViewIdentity.tsx and ui/packages/auth/src/types.ts (the row outcome type), content/docs/permissions/authentication.mdx, .changeset/ (stop on breach; explain in the report). ⛔ Not auth-plugin.ts or auth-route-ledger.ts unless measured necessary (open PR #34333 touches both: merge-tree before the first push).
    Container & model: L, mode:thread, model: default judgment tier, effort: high
    Clause-②: yes (widening)
    Metadata-protocol: none
    Responsibility: n/a — not a defect card (maintainer-ruled widening of an admin import door)
    Thread-read: 6920428750
    Premise: holds (admin-import-users.ts on origin/main e8cba8f admits manager_id as its only assignment column)
    Ruling-ref: 6920428750 (maintainer 「C,只加岗位列,p1」, 2026-11-16T15:12Z): one column, the position; resolved in a second pass like manager_id, through the same checks as assigning a position in Setup; an unresolved or refused position is a per-row error and the user is still created; no permission-set column (ADR-0090: a position carries its sets); demoStaff stays development-only; option B not taken. The skills that teach the import are a separate domain:skills card, filed by the seat.
    Serial constraints cleared: open PR #34333 (seat 1, plugin-auth) touches auth-plugin.ts and auth-route-ledger.ts, outside this surface; no open PR touches admin-import-users.ts (intersected on a deepened checkout at 22:31Z).
    Pre-claim lane: domain:server (packages/plugins/plugin-auth) with a ui/** rider kept in-lane (area-lease 留道 rule); large-card trigger (Clause-② yes) ⇒ own card thread, owes a contract-tier L2 review at TIER_DEFAULT.
    Pre-claim deps: the earlier Blocked-by: #33181, #33187, objectstack-ai/cloud#4469 was cleared by the ruling 6920428750, which moved the card to pm:queue.
    Prior rulings read: 6920428750 (this card), ruling D (hotclm#28, demoStaff dev-only, governing text packages/spec/src/system/demo-staff.zod.ts), ruling 5651634638 row 7 (manager_id second pass), ADR-0090 (positions carry permission sets); thread: #33113; repo: objectstack-ai/objectstack

  14. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 16, 2026
  15. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    File surface amended (claim 6931355877, card thread session_01ADHkmRNTuoSXYcZLxRV232, branch claude/project-thread-7l0awc), on the building thread's measured read:

    • added packages/plugins/plugin-auth/src/auth-plugin.ts, ONE line: the import-users mount's deps pass createGrant: createGrantFor(c), the seam create-user and import-sso-users already use, so the position is written under the importing admin's own execution context and meets the security middleware, the delegated-administration gate and the position-catalogue check exactly as a Setup assignment does (a SYSTEM-context write would bypass all three). Open PR feat(auth): an invitation is accepted in one step with the proof its mail carries #34333 adds two lines to the same file: the thread runs git merge-tree against it before the first push and reports the result. auth-route-ledger.ts stays untouched.
    • added packages/plugins/plugin-auth/src/pending-sso-users.ts, export only: readNameList (import-sso-users' positions-column reader) gains export, and import-users imports it rather than copying it.
  16. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    File surface corrected again (claim 6931355877; supersedes the matching lines of the previous amendment), on the building thread's measured read:

    • packages/plugins/plugin-auth/src/pending-sso-users.ts no longer gains an export: readNameList would become a new public name through the package index's export *. It moves instead into a new module packages/plugins/plugin-auth/src/name-list-cell.ts, which the index does not re-export; pending-sso-users.ts and admin-import-users.ts both import it.
    • the console import list lives in ui/packages/app-shell/src/views/IdentityImportPanels.tsx (the field list and the options panel), not in identityImport.ts / objectViewIdentity.tsx: the wizard sends only mapped columns, so the positions column and its one-line help go there.
    • the help is a new i18n key, console.identityImport.positionsHint, so each of the eleven packs under ui/packages/i18n/src/locales/ gains one line (the all-locales key-parity gate).
    • removed: ui/packages/auth/src/types.ts (the row outcome type does not live there).

    The only file shared with open PR #34333 is still packages/plugins/plugin-auth/src/auth-plugin.ts (one line here).

  17. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    File surface amended (claim 6931355877, card thread session_01ADHkmRNTuoSXYcZLxRV232): the derived gate check:tenant-audit-census counts the new sys_user_position write site (321 to 322). Its own fix, node scripts/tenant-audit-census.mjs --write, regenerates the census, so these two files join the surface as gate artefacts (neither is a governed surface):

    • content/docs/permissions/tenant-audit-census.mdx (the generated table and the hand-written count in its prose);
    • docs/audits/2026-08-tenant-audit-write-call-sites.counts.md.
  18. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmRNTuoSXYcZLxRV232
    os-dev-report

    {
      "issue": 33113,
      "status": "done",
      "branch": "claude/project-thread-7l0awc",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34531",
      "session": "session_01ADHkmRNTuoSXYcZLxRV232",
      "premise_still_valid": true,
      "summary": "POST /api/v1/auth/admin/import-users admits one new column, positions (position machine names, ;-separated, the column admin/import-sso-users already reads; seat named it). After runImport, beside the manager pass, each named position is a sys_user_position insert under the importing admin's own execution context (createGrant seam, wired with one line in auth-plugin.ts), so Setup's checks judge it; unresolved/refused positions are per-row outcomes (rows[].positions, summary.positions, audit row) and the user is still created. A file naming positions on a host with no seam answers 501, an unresolvable caller 403, nothing created, dry runs included. Console import wizard offers the column with a hint in all 11 locale packs; authentication.mdx documents it; tenant-audit census re-measured (321 to 322).",
      "tests": "head d3c32ee1c. plugin-auth: pnpm --filter @objectstack/plugin-auth test -> Test Files 280 passed (280), Tests 5774 passed | 10 skipped; new describe in admin-import-users-manager-pass.test.ts, 11 cases green. ui: vitest identityImport.test.ts, identityImportFields.emailRule-11913.test.tsx, identityImport.csvBatches-13315.test.tsx, packages/i18n/ -> Test Files 105 passed, Tests 1924 passed | 13 skipped. Ablations via scripts/ablation-replace.mjs on src (tests import src, no dist leg), each landed (anchor 1->0, blob moved) and restored to HEAD blob 980fdb49c95b with git diff HEAD empty: (1) grant written as SYSTEM_CTX -> 3 red; (2) second pass skipped -> 6 red; (3) up-front settlement skipped -> 7 red.",
      "gates": "local: dispatch-gates --commands derived 111 on head d3c32ee1c, all 111 exit 0; --ran: 111 derived, 111 run, 0 NOT-MEASURED, 0 UNRUN (file /mnt/project-files/objectstack-seat2/33113-gates-ran.txt). plugin-auth typecheck exit 0 (check:test-typecheck OK); @object-ui/i18n and @object-ui/app-shell type-check VERDICT command-exit 0. First run red on check:tenant-audit-census (new write site 321->322): fixed by --write + prose figures in the same PR. CI check-runs: in_progress at hand-back.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "3 — mcp__github__issue_read (get, get_comments) x2, mcp__github__pull_request_read get_files (#34333) x1; no write tool",
      "api_writes": "2 — fleet-write pr_create (POST pulls + POST issues/34531/assignees), post-stamped comment on #33113 (POST issues/33113/comments)",
      "open_questions": [
        { "question": "Needs contract review (Clause-②: yes (widening), TIER_DEFAULT) at head d3c32ee1cc975ea3ffa747f22a32deace0a95208.", "options": ["seat routes to the online review seat"], "recommendation": "seat routes" },
        { "question": "A request whose rows name positions on a host with no grant seam, or whose caller's context does not resolve, is refused whole (501 / 403) before any write, rather than per row.", "options": ["A keep whole-request refusal, as create-user and import-sso-users settle grants before writing", "B create the users and report every position per row"], "recommendation": "A, because the ruling's per-row clause is about a position that does not resolve or is refused, while a host that cannot judge any grant is known before the first write and creating accounts that silently miss every position is the half-done import the sibling doors refuse" }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: POST /api/v1/auth/admin/import-users in multi-organization mode creates users with no membership in the importing admin's current organization (create-user joins it via joinCurrentOrganization; import-users has no join), so every positions cell is refused per row by the grant-holder membership refusal (VALIDATION_FAILED, user_id reference_not_found) · evidence: admin-user-endpoints.ts create-user join block vs admin-import-users.ts createData (authApi.createUser only); reconcile-membership.ts returns none in multi mode · dedupe words: import-users multi-org membership, imported users member-less, import join current organization",
        "class: a · reach: Console Users list Import wizard offers email, phone_number, name, role, positions but no manager_id target, so the manager column the endpoint admits cannot be mapped from the UI · evidence: ui/packages/app-shell/src/views/IdentityImportPanels.tsx identityImportFields · dedupe words: import wizard manager_id column, identityImportFields manager",
        "carrier: seat · the skills that teach import-users need the positions column (domain:skills card, per claim)"
      ]
    }
  19. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

    PR #34531 at 987b7e725: L1 ACCEPT 6936586013 (r3), TIER_DEFAULT declaration record 6936574759 (PASS), landing 6936625179 (ready, auto-merge armed). r3 reports a position that cannot be judged as refused on its row (NOT_IMPLEMENTED / PERMISSION_DENIED) and still creates the user, as ruling 6920428750 directs. Follow-ups filed: #34535, #34536, #34537.

  20. removed
    pm:dispatched
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:serverpriority:p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions