Skip to content

fix(platform-objects): with SSO-only mode on, Set Password is not offered on an IdP-provisioned user - #39360

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-a6qxbo
Dec 3, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-a6qxbo

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #34225

Thread session: session_01Utp6CbZLcNVF5cbbuDifLD (card thread of zone data-1203, claim 7381634042)

What changes

  • sys_user.set_user_password's visible gains one && conjunct, !(SSO_ONLY_REFUSED_ROW): with SSO-only mode on, Set Password is not offered on an IdP-provisioned row (source == 'idp_provisioned') unless it is the caller's own row (the break-glass password a platform administrator may set for themselves).
    • It reads the two facts the door reads: features.ssoEnforced is served from resolveSsoOnly() (auth-manager.ts:6187), the same accessor the door's isSsoOnlyMode() returns (auth-manager.ts:5847, read at admin-user-endpoints.ts:1246), and the row's stored source, which judgeSsoOnlyLocalPassword reads (sso-only-local-password.ts:212).
    • has() on the flag and on source keeps today's offer when the console holds neither; the door still judges.
    • idp_pending is not refused by this rule (only by the cloud-managed one, where the action is already hidden), so it keeps the offer.
  • feature-gate-guard.test.ts: the registry books only whole-input conjunct gates, so a row-scoped read gets a guard-local list, ROW_SCOPED_HIDES (beside SHOWN_WHEN_ON). The reverse walk accepts it, and a new row asserts the input carries !(has(features.F) && features.F == true && <row terms>) and is not also booked in gatedInputs.
  • public-auth-features.ts: ssoEnforced's exempt.reason text says Set Password reads it to hide those rows. No served key, semantics or surface changes.
  • platform-objects.test.ts: the lowering matrix row for set_user_password pins the new predicate.

Why

With SSO-only mode on, Setup → Users offered Set Password on an IdP-provisioned user and the door then answered 409 RESOURCE_CONFLICT. The action is now offered only where the door would accept it.

Verification

  • New identity/sso-only-set-password-visibility.test.ts evaluates the parsed predicate through @objectstack/formula: hidden on an IdP-provisioned row under SSO-only mode; CONTROLs offered on env_native, null source, idp_pending, the admin's own IdP row, an unprojected source; SSO-only off or no flag served keeps every row's offer; non-admin and cloud-managed still hide.
  • Ablation: dropping the new conjunct turns 2 rows red (the pin above and the ROW_SCOPED_HIDES guard row); restored green.
  • packages/platform-objects: 133 files / 2364 tests pass. packages/spec src/kernel: 65 files / 1519 pass.

Clause-②: no
Metadata-protocol: none

Human Minimum

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

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbZLcNVF5cbbuDifLD

…ered on an IdP-provisioned user

Set Password's visible predicate gains a negated row group reading the
two facts its door reads: features.ssoEnforced (served from the same
SSO-only accessor) and the row's source. The caller's own row stays
offered (break-glass). The feature-gate guard books the row-scoped read
in ROW_SCOPED_HIDES; pins and CONTROLs in
identity/sso-only-set-password-visibility.test.ts.

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

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/platform-objects, @objectstack/spec, touching 3 documentable anchor(s).

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

  • content/docs/automation/approvals.mdx (via idp_provisioned (literal, a string literal in SSO_ONLY_REFUSED_ROW; a string literal in a comment on a changed line))
  • content/docs/permissions/authentication.mdx (via idp_provisioned (literal, a string literal in SSO_ONLY_REFUSED_ROW; a string literal in a comment on a changed line))

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

  • content/docs/releases/v16.mdx (via ssoEnforced (symbol, a field of const object PUBLIC_AUTH_FEATURES))
  • content/docs/releases/v18/18-4.mdx (via idp_provisioned (literal, a string literal in SSO_ONLY_REFUSED_ROW; a string literal in a comment on a changed line))

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

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

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

Which tree this was computed on

This run read content/docs from ea13c6d386fd91b9cd00cec5db4b76be831c37b9 — the merge of head 7035cc676eba464dfc7359d18d375b0cea3c02de into base 779ff419cff5f92ff056e6911abd74eb0b24d697, which is what actions/checkout gives a pull_request run. Not the PR head.

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

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin ea13c6d386fd91b9cd00cec5db4b76be831c37b9 && git checkout ea13c6d386fd91b9cd00cec5db4b76be831c37b9
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 779ff419cff5f92ff056e6911abd74eb0b24d697 7035cc676eba464dfc7359d18d375b0cea3c02de && git checkout -B drift-repro 779ff419cff5f92ff056e6911abd74eb0b24d697 && git merge --no-ff 7035cc676eba464dfc7359d18d375b0cea3c02de

node scripts/docs-audit/affected-docs.mjs --json 779ff419cff5f92ff056e6911abd74eb0b24d697

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

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaJjkQx5fPE4Fbmoeq

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 7035cc676eba464dfc7359d18d375b0cea3c02de
Local-runs: none
Scope: packages/spec/src/kernel/public-auth-features.ts + packages/platform-objects/src/identity/sys-user.object.ts, packages/platform-objects/src/feature-gate-guard.test.ts

Inputs read: card #34225 (body, triage 6905104316, claim 7381634042, amendment 7382503624; no ruling, no earlier record), PR #39360 (body, 6 files, net diff against merge base 850d240b80; none of the touched files nor the two door files moved on main since), and the check-runs on the head. The remainder of the diff (the changeset, identity/sso-only-set-password-visibility.test.ts, the one matrix row of platform-objects.test.ts) is the lane seat's ACCEPT at TIER_DEFAULT.

① Derived judgments

  • Accept-set: none moves. No schema, no door request or response, no served key. PUBLIC_AUTH_FEATURE_NAMES, the requiresFeature enum, featureGatePredicate and lowerRequiresFeature read keys and semantics, and neither changes. Right.
  • Public surface of @objectstack/spec: one string, PUBLIC_AUTH_FEATURES.ssoEnforced.exempt.reason (and, through as const, its literal type in the declaration output). surface: 'login', semantics: 'opt-in', the absence of gatedInputs and the registry key set are unchanged, so plugin-auth's key-set drift guard and every lowering stay as they were. No generated artifact carries the old text (the only occurrence at the head is the source line). Right, and patch-sized.
  • Public surface of @objectstack/platform-objects: sys_user.actions.set_user_password.visible gains one && conjunct. It reads three roots the same object's sibling predicates already read (features, record.source at sys-user.object.ts:84, the caller's id at :1043); current_user and ctx.user are the one subject in the console scope (ui/packages/app-shell/src/providers/ExpressionProvider.tsx:213). Right.
  • Not a narrowing: the offer is withdrawn only on rows where the door already answered 409 RESOURCE_CONFLICT (admin-user-endpoints.ts:1246-1253). Nothing accepted before is refused after, so the plain no on the declaration line is the right arm, and no dogfood battery is owed. Right.
  • The one exact-string consumer of the predicate, the lowering matrix row (platform-objects.test.ts:872), is updated with it; Test Core (12 shards) and Test UI (16 shards) are success on the head, so no other pin of the old string exists.

② Semver level

.changeset/34225-sso-only-set-password-row.md: @objectstack/platform-objects patch, @objectstack/spec patch. Both packages are published and both are moved by the diff; a bug fix with Metadata-protocol: none takes patch. Clause-②: no and Metadata-protocol: none stand line-initial in the changeset and in the PR body, and agree with the claim. Check Changeset is success on the head. Correct.

③ Boundary flags

  • Card fact 3 (is a pending SSO user hidden already?): answered, with one residual. The door refuses an idp_pending row through its own arm, in every mode (admin-user-endpoints.ts:1222-1231), not through the SSO-only rule. A pending row is born only on a cloud-managed environment (pending-sso-users.ts:596, :675, :811 refuse elsewhere), where features.cloudManaged != true already hides the action whole. Residual: an environment that leaves cloud-managed mode with pending rows left would offer the action on them and get the pending refusal. It is outside the SSO-only rule this card and this contract sentence name; a follow-up card is the seat's call, not a finding on this head.
  • Card ask 1 ("if the facts are not visible to the predicate, say so"): both are visible. features.ssoEnforced is served, and source is a sys_user field in the default list columns (sys-user.object.ts:1230). No new exposure was needed.
  • Claim note ("the spec text owes a contract-tier review"): this record.
  • Booking outside the registry (ROW_SCOPED_HIDES, guard-local): follows the precedent on main, SHOWN_WHEN_ON (feature-gate-guard.test.ts:181-200), which books a polarity the registry does not model beside the reverse walk that reads it. Accepted.
  • SQL push-down: the diff adds no read, no id materialisation and no join. Nothing to push down.
  • Seen outside the changed hunks, for the seat only: public-auth-features.ts:325-326 (the cloudManaged comment on set_user_password) says the server keeps answering on an env_native row, while the door refuses every target there since Managed environments: the framework's remaining local-password doors and copy (set-user-password on env_native rows, the platform-admin break-glass wording, the 'set a backup password' banner) contradict hosted's no-local-password rule #33203 (admin-user-endpoints.ts:1233-1239). It is stale on main, untouched here and not made false by this diff: a follow-up card, not a fix on this head.

④ Design judgment

packages/spec/src/kernel/public-auth-features.ts (hits), the new ssoEnforced reason, sentence by sentence.

  • "Login-surface consumption: objectui LoginForm hides the password form and self-registration (break-glass link remains)." Holds: ui/packages/auth/src/LoginForm.tsx:373 reads features.ssoEnforced, unchanged by this diff.
  • "No spec input is gated on it as a whole: sys_user.actions.set_user_password reads it only to hide the rows its door refuses under SSO-only mode (IdP-provisioned, not the caller's own)." Holds against the tree. The door (admin-user-endpoints.ts:1246-1253) calls judgeSsoOnlyLocalPassword (sso-only-local-password.ts:212-223), which refuses exactly when SSO-only is on, the stored source equals DIRECTORY_MANAGED_SOURCE = 'idp_provisioned' (scim-identity-source.ts:62, strict equality at :195-197), and actor.id === userId is false. SSO_ONLY_REFUSED_ROW (sys-user.object.ts:97-99) is that conjunction term for term, negated once at :658.
  • "a row-scoped read booked in platform-objects' feature-gate guard (ROW_SCOPED_HIDES), not here (Setup Users: with SSO-only mode on, Set Password is offered on an IdP-provisioned user and then refused #34225)." Holds: feature-gate-guard.test.ts:214-216 books it, :365-369 admits it in the reverse walk, :386-399 asserts the shape and that it is not also in gatedInputs.

sys-user.object.ts, the docblock at :86-96 against the code and the door.

  • Same flag source: features.ssoEnforced is resolveSsoOnly() (auth-manager.ts:6072, served at :6187, not refined at the route); the door's deps.ssoOnlyMode is isSsoOnlyMode() (auth-plugin.ts:4879), which returns resolveSsoOnly() (auth-manager.ts:5847-5848). One accessor, as the docblock says.
  • Same row fact: the stored sys_user.source, compared to the same literal the door compares.
  • Self exception: !(has(record.id) && record.id == current_user.id) is the door's actor.id === userId, asked only inside the refused group, as the door asks it only once the row is IdP-provisioned.
  • Fault directions, tried: no served flag gives has(features.ssoEnforced) false, the group false, the offer kept; an unprojected source the same; source null or env_native the same; SSO-only off the same. A row with source IdP-provisioned and no projected id hides (the stricter side, and a row always carries its id). A missing current_user.id faults, and an action predicate is fail-soft, so the offer is kept and the door judges. Every direction either matches the door or keeps today's offer; none hides a row the door would accept except the id-less row above. The docblock's last sentence ("a console holding neither keeps today's offer, and the door still judges") holds.
  • Arms of the door the predicate does not model, and need not: the 503 on an unreadable source (the console cannot know it) and the pending arm (③).

feature-gate-guard.test.ts, the gate against its docblock (:202-213). The row requires one top-level && conjunct of the form !(...) whose inner conjuncts start has(features.F), features.F == true and number more than two, and refuses a path also booked in gatedInputs. On the head's predicate the three top-level conjuncts split as intended and the negated group yields five inner conjuncts, so the row is green for the right reason; dropping the conjunct from visible leaves no negated group and the row is red. The docblock and the assertion agree.

No must-fix, no should-fix.

  • N1 (nit) — public-auth-features.ts:38-45 and :57-68: the module header still says every features.* reference in a visible predicate "must be booked here", and the surface doc names a notice as the only authored read that leaves a flag off crud. The row-scoped read of a login, exempt flag is stated only in the entry's own reason. SHOWN_WHEN_ON already made the header sentence loose on main, the reason names where the booking lives, and no runtime reads surface. Follow-up card or accepted deviation.
  • N2 (nit) — feature-gate-guard.test.ts:392-397: the row asserts that the group is opened by the two flag terms and holds more, not that the remaining terms read record.; and the reverse walk (:364-369) admits any read of the flag on a listed path, as it does for SHOWN_WHEN_ON. With one entry whose verdict table is pinned in identity/sso-only-set-password-visibility.test.ts, nothing is unguarded today. Follow-up card or accepted deviation.

Check-runs on the head, all success: Lint & Repo Gates, TypeScript Type Check, Type Check · workspace / source gates / consumer gates / debt ledger, Type Check UI, Test Core (1-12 of 12), Test UI (1-16 of 16), Build Core, Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, Governed Surface Queue Guard, PR-body guards, Spec property liveness. Dogfood battery (opt-in) is skipped and not owed (no !, no narrowing arm).

Implemented-by: claude/project-thread-a6qxbo
Reviewed-by: session_01Utp6CaJjkQx5fPE4Fbmoeq

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaJjkQx5fPE4Fbmoeq

席位核对

ACCEPT (zone data-1203 L1) · Head-sha: 7035cc676eba464dfc7359d18d375b0cea3c02de · 2026-12-03T15:42Z

  • 形态: one PR, Fixes #34225, six files = claim 7381634042 + amendment (platform-objects.test.ts matrix row); patch changeset on both published packages; Clause-②: no, Metadata-protocol: none.
  • 前提实测: isolated reviewer read the new set_user_password visible conjunct (sys-user.object.ts:97–99, :658) term by term against the door's refusal judgeSsoOnlyLocalPassword (sso-only-local-password.ts:212–223, called at admin-user-endpoints.ts:1246–1253): same resolveSsoOnly() source for the flag, stored source === 'idp_provisioned', self row kept. Unprojected flag or source keeps the offer (pinned). Guard booking ROW_SCOPED_HIDES consistent with the reverse walk.
  • 门禁 check-runs: head 7035cc6, 60 success, 13 skipped, 0 red; dogfood battery not owed.
  • 接受的偏差: contract-review nits N1 (public-auth-features.ts:38–45, :57–68 header does not name the row-scoped read) and N2 (feature-gate-guard.test.ts:392–397); PR body says 2 rows go red on ablation, three bind to the conjunct.
  • 范围外去向: Acceptance notes, not filed (zone closing under the maintainer's quota pause; the seat decides) — (1) idp_pending rows are refused by the door in every mode (admin-user-endpoints.ts:1222–1231) but still offered Set Password outside cloud-managed; pending rows are created only on cloud-managed (pending-sso-users.ts:596), so no reach today; (2) stale comment on main at public-auth-features.ts:325–326 (env_native under cloud-managed is refused since Managed environments: the framework's remaining local-password doors and copy (set-user-password on env_native rows, the platform-admin break-glass wording, the 'set a backup password' banner) contradict hosted's no-local-password rule #33203).
  • 落地条款: Contract review PASS at this head: 7383603252. Not Tier H (no governed path). Owed: seat landing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

Landing: 2026-12-03T15:43Z · head 7035cc67, zone L1 ACCEPT 7383619424 and contract review PASS 7383603252 at this head, CI green. Not governed (check-governed-merges --pr), 166 lines. The seat marks it ready and arms auto-merge. On merge, #34225 closes. The ACCEPT's two out-of-scope notes (idp_pending rows offered Set Password outside cloud-managed, unreachable today; a stale comment at public-auth-features.ts:325–326) go to one follow-up card that the seat files.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 3, 2026 15:44
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 3, 2026
Merged via the queue into main with commit 1cbcf46 Dec 3, 2026
74 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-a6qxbo branch December 3, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup Users: with SSO-only mode on, Set Password is offered on an IdP-provisioned user and then refused

2 participants