You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SCIM: a PATCH that replaces only name.givenName / name.familyName leaves displayName and sys_user.name on the old name #32380
ObjectOS Enterprise, framework pin e24136c2 (@better-auth/scim 1.7.12). Local SCIM run for objectstack-ai/cloud#3667.
Measured
A user whose display name is "Renamed InOkta" gets PATCH /Users/{id} with Entra's path-addressed shape: [{"op":"Replace","path":"name.givenName","value":"Entra"},{"op":"Replace","path":"name.familyName","value":"Style"}]. The answer is 200, but:
name.givenName / familyName change;
displayName, name.formatted and sys_user.name (what the console shows) keep "Renamed InOkta".
Okta's path-less replace ({"op":"replace","value":{"name.givenName":…,"name.familyName":…}}) behaves the same.
Only a PATCH of displayName, or a full PUT, moves sys_user.name.
The cause is vendor behaviour: setNamePart stores the part and never recomposes formatted / displayName. The code has a composeName helper, which only the remove path uses.
Impact
Low while the IdP also sends displayName, as Entra's default mapping does when that attribute changes. A tenant whose mapping sends only given/family name keeps showing the old name in ObjectOS indefinitely.
Expected
When displayName / formatted were derived from the parts (the same test setFormattedName already makes), recompose them after a part changes. Either upstream it to @better-auth/scim, or apply it in the host's identity.reconcileUser before the user row is written.
Lane:domain:server (the host's SCIM reconcile in plugin-auth). The vendor fix goes upstream to @better-auth/scim. Measured during cloud#3667's local SCIM run.
Grade: p3 as filed. Entra's default mapping sends displayName with the parts, so only a tenant mapping that sends only given or family name sees a stale name. It is not a security hole: no identity, grant or account state is wrong, only the display name.
Claim: PM loop round 1
Session: session_012MmDsNv6qb5gT8Pd98AmCB
Account: os-lizheng (the seat's linked user as GET /user answers it; the card's assignee)
Branch: claude/issue-32380-scim-name-recompose
Worktree: objectstack-issue-32380
Domain: domain:server
Seat: domain:server#4
File surface: packages/plugins/plugin-auth/src/** — the host's SCIM identity.reconcileUser path (auth-manager.tsreconcileScimUserLifecycle and the helper it calls), a new or existing SCIM test file beside scim-deactivation-reconcile-user.test.ts; root .changeset/. ⛔ objectql-adapter.ts (#32388 in flight), pnpm-workspace.yaml / vendor patches, ui/**, skills/**, docs/adr/** (stop on breach; explain in the report)
Container & model: M, mode:subagent, model: default tier — dispatch-gates --tier: no path-derived mandate, effort: high
Clause-②: no
Metadata-protocol: none
Responsibility: @better-auth/scimsetNamePart (vendor) never recomposes; the host half identity.reconcileUser in objectstack plugin-auth | none | a tenant whose IdP mapping sends only given/family name; Entra's default mapping does not hit it
Thread-read: 6784696655
Premise: holds (re-read on origin/main7d82b2d at 2026-11-11T12:56Z)
Serial constraints cleared: #32388 (seat 3) edits plugin-auth/src/objectql-adapter.ts only — excluded from this surface
{
"issue": 32380,
"status": "needs_decision",
"branch": "claude/issue-32380-scim-name-recompose",
"pr": null,
"session": "session_012MmDsNv6qb5gT8Pd98AmCB",
"premise_still_valid": true,
"summary": "Defect reproduced on origin/main 7d82b2da with @better-auth/scim 1.7.12, both PATCH shapes, through AuthManager.handleRequest with a real SCIM bearer: a user provisioned with givenName Renamed / familyName InOkta (displayName and name.formatted DERIVED = 'Renamed InOkta') gets PATCH name.givenName=Entra, name.familyName=Style (Entra path-addressed, and Okta path-less) → 200, parts move, but the SCIM resource displayName, name.formatted and sys_user.name all stay 'Renamed InOkta'. The ruled lane (the host's identity.reconcileUser) cannot tell derived from explicit, so per the dispatch's Zone 2 stop condition no code was written: measured inside the callback, the vendor has ALREADY written both the sys_user row (name = the unchanged old displayName, updateManagedBetterAuthUser) and the scimUser row (NEW parts, OLD displayName/formattedName) before it calls reconcileUser, and SCIMIdentityState carries only userId/active/profileSourceId/sources; the OLD parts are gone. The control proves the ambiguity: an IdP-explicit displayName 'Bob B' (parts Robert Smith) after PATCH givenName=Rob reaches the callback as displayName=formattedName='Bob B', parts Rob/Smith — the same shape as the derived case, so any rule there either overwrites an explicit name (forbidden) or fixes nothing. Second measurement kills the Zone 3 route outright: a host write of sys_user.name alone ('Entra Style') is reverted by the very next unrelated changing PATCH (title=Engineer → sys_user.name back to 'Renamed InOkta'), because the vendor rewrites name from its own stored scimUser.displayName on every profile-source PATCH. Mechanism correction to the card's Expected: reconcileUser does not run 'before the user row is written' — it runs after. The fix has to change the vendor's scimUser state (upstream setNamePart, or a host pre-image hook that rewrites vendor rows); that is a fork, analysed in open_questions.",
"tests": "No code change, so no package test run is owed. Evidence runs (a temporary probe test, deleted, never committed; copy kept at the seat scratchpad issue-32380/zz-probe-32380.test.ts): `pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2 src/zz-probe-32380.test.ts` under os-verify-lock, both runs `VERDICT command-exit 0`, Tests 2 passed (2), tree 7d82b2da. Readings: 'entra PATCH 200 Renamed InOkta {formatted:Renamed InOkta, givenName:Entra, familyName:Style}', 'entra sys_user.name Renamed InOkta'; same three lines for okta; reconcile callback saw src {displayName:'Renamed InOkta', formattedName:'Renamed InOkta', givenName:'Entra', familyName:'Style'}, user.name 'Renamed InOkta'; 'HOSTFIX sys_user.name after simulated host write Entra Style' then 'HOSTFIX unrelated PATCH 200 sys_user.name now Renamed InOkta'; 'EXPLICIT CREATE 201 Bob B {formatted:Bob B, givenName:Robert, familyName:Smith}', 'EXPLICIT PATCH 200 RECONCILE SAW [{displayName:Bob B, formattedName:Bob B, givenName:Rob, familyName:Smith}]'. Vendor source read: node_modules/@better-auth/scim/dist/index.mjs setNamePart (stores the part only), composeName (used only by name.formatted remove), setFormattedName (displayName===formattedName test), PATCH handler order updateManagedBetterAuthUser → trx.update scimUser → projection.reconcileUser → identity.reconcileUser. Ablation: n/a (no tested behaviour changed).",
"gates": "No diff: `node scripts/pm/dispatch-gates.mjs --commands` exit 2 — 'this branch changes nothing against origin/main (merge base 7d82b2dab) — nothing to derive'. No local gate owed; no PR, so no check-runs. Only build run: `pnpm --workspace-concurrency=2 --filter '@objectstack/plugin-auth^...' build` under the lock, VERDICT command-exit 0. pnpm lint not run (no diff).",
"dogfood_battery": "n/a — no PR, no `!` in any title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "1 — POST issues/32380/comments (this os-dev-report, via scripts/pm/post-stamped.mjs). Plus 1 git push (empty claimed branch claude/issue-32380-scim-name-recompose at 7d82b2da, the routing probe). pr_create: 0.",
"files_changed": [],
"line_budget": "n/a — no diff",
"deviations": "Stopped before code per the dispatch's Zone 2 stop condition (host reconcile cannot see enough to tell derived from explicit). Zone 2 assumption 'reconcileUser runs before the user row is written' (card Expected) measured false. Zone 3 route measured unstable (host-only sys_user.name write is reverted by the next unrelated PATCH). The empty branch stays pushed at 7d82b2da for a resume.",
"open_questions": [
{
"question": "Where should the recompose of displayName / name.formatted after a name-part PATCH live, given the host's identity.reconcileUser sees only the post-image (new parts, old displayName/formatted; old parts already overwritten) and a host-only sys_user.name write is reverted by the vendor on the next PATCH?",
"options": [
"A — Upstream only: a PR to @better-auth/scim making setNamePart recompose formattedName (and, through setFormattedName, displayName) when formattedName === composeName(state) BEFORE the part changes — the same derived test the card names. Host change: none now; a dependency bump when the vendor releases, plus a pin in plugin-auth that both PATCH shapes move sys_user.name and an explicit displayName survives. Business need: measured pull is one local SCIM run (cloud#3667) and a tenant mapping that sends only given/family name; Entra's default mapping sends displayName, so waiting costs little. Long-term: fixes the producer (the vendor's state machine), so the SCIM resource, the vendor row and sys_user.name all converge and stay converged. AI-error resistance: one owner, no host shadow of vendor logic. No scope creep: zero host surface, no gate. Cost: ~10 vendor lines + a vendor test; release latency is outside our control. Effort S (plus an S bump PR later).",
"B — Host pre-image hook: add a user.update.before database hook (fires inside the SCIM transaction from updateManagedBetterAuthUser, before the vendor's scimUser update, and only for the profile source) that stashes the source's OLD parts/formatted/displayName on the SCIM request scope; reconcileUser then compares pre and post and, when derived, rewrites the vendor's sys_scim_user row (displayName, formattedName, and name.formatted inside serializedAttributes JSON) and sys_user.name. Business need: same thin pull as A. Long-term: a consumer-side workaround of a producer defect, coupled to the vendor's private storage format (column semantics + serialized JSON) and to its call order — breaks silently on a vendor refactor; uses reconcileUser outside its declared contract ('reconciles global enabled or disabled state'). AI-error resistance: poor — hidden cross-hook state is exactly what later agents misread. Scope: adds a new host seam beside a path with open security findings (#32113, #32115). Mechanism of the before-hook firing inside the transaction is read from vendor source, not measured. Effort M-L (~200 lines + two-shape pins + controls + ablation).",
"C — A, plus an interim pnpm patch of the vendor dist carrying the same setNamePart change until the release, removed on the bump. Same axes as A, with a short-lived vendor patch (maintainer-owned surface: pnpm-workspace.yaml / patches, excluded from this claim). Effort S.",
"D — Close the host half as won't-fix-in-host and leave the card tracking only the upstream fix (no host PR at all). Same as A minus the later pin PR."
],
"recommendation": "A, because the defect is in the producer (vendor setNamePart) and the host cannot fix it soundly from the ruled lane: the reconcile callback sees no pre-image, and a host-only sys_user.name write is reverted by the vendor's next PATCH. A keeps contract-first and adds no host surface; the measured business pull is thin (p3, Entra's default mapping unaffected), so the release latency is acceptable. C only if the maintainer wants it now and accepts a vendor patch; B is not recommended (consumer-side workaround over vendor-private storage)."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: this card (#32380) — the upstream @better-auth/scim PR (setNamePart recompose when formatted was derived from the parts) is owed under option A/C; it is a vendor-repo PR, not filed here. Dedupe words: scim setNamePart composeName displayName formatted recompose",
"carrier: none — the card's Expected wording 'apply it in the host's identity.reconcileUser before the user row is written' is mechanically false on 1.7.12 (the callback runs after updateManagedBetterAuthUser and after the scimUser update); noted for the seat's re-read, not filed."
]
}
Ruling recorded · #32380 · C (upstream fix, and a temporary patch now) · 2026-11-13T05:47Z
Maintainer, verbatim (triage#1 session): 「创业项目,应该是需求合理就做」, then 「第三批同意」, approving the batch as revised under that principle: 32380 C / 31797 C / 32678 B / 32679 B + one-click reset. The batch was analysed independently at the fable tier, with prior rulings checked first.
C: fix it now and fix it at the source.
(1) The domain:server lane drafts the upstream PR to @better-auth/scim (recompose displayName / name.formatted when it was derived from the name parts, plus the vendor test) from the kept branch claude/issue-32380-scim-name-recompose. The maintainer, or someone with access to that repo, submits it; agents cannot.
(2) A temporary pnpm patch on the vendor package makes a name-only PATCH recompose the display name today, with a regression test for both PATCH shapes.
(3) When the vendor ships the fix, the patch is removed in the upgrade PR and the regression test stays.
On the AGENTS.md conflict: 「No workarounds … not temporary patches」 is set aside here by the maintainer's ruling for this card only. The patch carries a header naming this ruling and its removal condition, and patches/ gains no other better-auth patch.
Picked by card-pick.mjs --order area:data --seat repo:objectstack#8 at 2026-11-28T03:11Z: rank 8 (p3 close-out, first non-fleet card of the grade); the p2 cards above it are a cross-repo step (#34365), an un-triaged card (#37375), an ADR card (#37405), seat 2's trunk card (#37768), a card queued behind this seat's #37709 on the same package (#37852) and a contract-shape design card (#37909). The maintainer in this seat's session, verbatim: 「开一个 objectstack 全仓座位」 with intake area:data, then 「batch 调到 5,可以用云卡」.
Claim: PM loop round 1
Session: session_017xRBcSAaBEfQpU2yJexSJ8
Account: sunhaolin
Branch: claude/issue-32380-scim-name-recompose
Worktree: objectstack-issue-32380
Domain: domain:server
Seat: repo:objectstack#8
File surface: one new patches/@better-auth__scim*.patch and its patchedDependencies row (pnpm-workspace.yaml or root package.json, wherever the three existing patches are registered), pnpm-lock.yaml as pnpm writes it, a regression test under packages/plugins/plugin-auth/src/** for both PATCH shapes, the upstream draft as text in the PR body, one changeset for @objectstack/plugin-auth if its published behaviour moves; ⛔ no other patches/ file, no change to the callback hooks near #32115 (stop on breach; explain in the report)
Container & model: M, mode:subagent, model: opus (dispatch-gates --tier: no path-derived mandate; default tier), effort: high (ruling implementation: M treatment)
Clause-②: no
Metadata-protocol: none
Responsibility: vendor — @better-auth/scim setNamePart stores the part and never recomposes formatted/displayName; this repo carries it through a temporary pnpm patch by ruling | none — only a displayName PATCH or a full PUT moves sys_user.name | tenants whose IdP mapping sends only name parts (Entra path-addressed and Okta path-less shapes measured on 7d82b2da)
Thread-read: 6845302116
Premise: holds — the ruling's premise (defect reproduced on 7d82b2d, dev report 6796756062) is re-measured first by the dev on current main before the patch is written.
Resume-from: claude/issue-32380-scim-name-recompose@7d82b2da
Serial constraints cleared: seat 3's #36160 declares package.json / pnpm-lock.yaml / pnpm-workspace.yaml (dependency work); textual overlap re-checked with overlap-check.mjs before every push and the lockfile follows the os-regen merge order if it conflicts.
Scope this dispatch: ruling C items (1)–(2) (draft upstream text, temporary patch + regression test); item (3) is the future upgrade PR. Fixes #32380.
Ruling-ref: 6845302116 — 「创业项目,应该是需求合理就做」 then 「第三批同意」 (32380 C).
{
"issue": 32380,
"status": "done",
"branch": "claude/issue-32380-scim-name-recompose",
"pr": "https://github.com/objectstack-ai/objectstack/pull/38181",
"session": "session_017xRBcSAaBEfQpU2yJexSJ8",
"premise_still_valid": true,
"summary": "Re-measured on current main first: with the patch registration removed, both PATCH shapes (Entra path-addressed Replace pair, Okta path-less replace with dotted keys) through AuthManager.handleRequest with a real SCIM bearer still leave displayName, name.formatted and sys_user.name on 'Renamed InOkta' (premise holds). Implemented ruling 6845302116 items (1)-(2): a temporary pnpm patch patches/@better-auth__scim@1.7.12.patch (header names the ruling and the removal condition) makes setNamePart recompose name.formatted, and through the vendor's setFormattedName displayName, with the vendor's composeName when name.formatted equalled composeName of the parts before the change; registered in pnpm-workspace.yaml beside the three existing patches; regression pin scim-name-recompose.test.ts (8 cases: both shapes, an unrelated PATCH keeps the new name, four CONTROLs that keep explicit names and let a displayName PATCH win in both orders, and one edge case); the upstream draft (vendor diff, vendor tests, PR paragraph) is in the PR body. MEASURED FINDING for the maintainer: @better-auth/scim's own suite at v1.7.12 and at main (1.7.28) pins 'preserves explicitly supplied formatted and display names when patching one name part' with an explicit name EQUAL to the composed parts; the vendor stores no provenance, so the ruled value test reads that shape as derived and recomposes it. The patch therefore reverses that vendor-pinned case (pinned here as case (c)), and the upstream draft has to change that vendor test's fixture, which the vendor may refuse (open_questions). No changeset: measured that the published plugin-auth tarball is unchanged and a pnpm patch reaches only installs of this workspace (dev, CI, framework-build-base image), never an npm install of @objectstack/plugin-auth; skip-changeset rides pr_create.",
"tests": "Red without the patch (row deleted from pnpm-workspace.yaml, pnpm install, vendor dist carrying 0 patched lines), tree 58bebae26: `pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2 src/scim-name-recompose.test.ts` under os-verify-lock, VERDICT command-exit 1, 'Tests 6 failed | 2 passed (8)', received displayName/formatted/userName 'Renamed InOkta' vs expected 'Entra Style' (the 2 that pass red are the explicit-name preservation CONTROLs). Green with it (git restore --source=HEAD, pnpm install --frozen-lockfile): VERDICT command-exit 0, 'Tests 8 passed (8)'. Whole package on 6206923a6: `pnpm --filter @objectstack/plugin-auth build && ... typecheck && ... exec vitest run --maxWorkers=2`, VERDICT command-exit 0, check:test-typecheck OK, 'Test Files 297 passed (297)', 'Tests 6313 passed | 10 skipped (6323)'. Final head c40d3488e5 = 6206923a6 + merge of origin/main touching no file under plugin-auth, patches/, pnpm-lock.yaml, pnpm-workspace.yaml or package.json (git diff --stat empty); the scoped SCIM re-run on c40d3488e5 is NOT MEASURED, reason: the verify lock was not acquired in three 9-minute windows (VERDICT queue-timeout exit 99, holder another session's dogfood run, 27-40 min); declared narrowing, CI Test Core runs it. Ablation: the red run above is the registration ablation (rebuild = reinstall, on-disk proof = 0 occurrences of formattedNameWasDerived in the installed vendor dist, 2 after restore). Upstream draft NOT MEASURED against the vendor's own suite (its workspace not installed here).",
"gates": "Local: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` on c40d3488e5 derived 61 families (same list as on 58bebae26); all 61 run on c40d3488e5 with exit codes recorded (`cmd > out 2>&1; EXIT=$?`), `--ran` reconciliation: '61 derived famil(ies) accounted for — 60 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)'. 60 exit 0. check:type-check-debt exit 3 on c40d3488e5 (prerequisite not met after the merge moved packages/spec; rebuild blocked by the lock) = NOT MEASURED there; on 58bebae26 exit 0, '0 ledger entr(ies) re-measured in 817.5s, 0 raw tsc error(s) total'. check:test-source-alias was red on the first test draft (egress guard loaded in a case) and exit 0 after the module-top import (commit 6206923a6). check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure exit 3 before the closure build, exit 0 after. Published-content check: after building plugin-auth, the patched line occurs in 0 files of dist/ while dist/index.js and dist/index.mjs import @better-auth/scim (positive control). CI on c40d3488e5 at report time (one read, no polling): Check Changeset, Lint · ESLint, Lint · repo & tooling gates, Type Check · workspace, Type Check · debt ledger, Governed Surface Queue Guard, PR-body guards and the rest queued or in_progress; no conclusion yet. pnpm lint not run (CI-owned).",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2 relay strokes via fleet-write/dispatch.mjs (each a POST /repos/objectstack-ai/objectstack/dispatches): (1) pr_create = POST pulls (draft, PR #38181), POST issues/38181/assignees [sunhaolin], POST issues/38181/labels [skip-changeset], read back identical 16248 bytes, assignee and label listed; (2) this os-dev-report = POST issues/32380/comments via post-stamped.mjs. Plus 3 git pushes (not REST).",
"files_changed": [
"patches/@better-auth__scim@1.7.12.patch",
"pnpm-workspace.yaml",
"pnpm-lock.yaml",
"packages/plugins/plugin-auth/src/scim-name-recompose.test.ts"
],
"line_budget": "+429 -2 against origin/main: test 377, patch 32 (18 header lines + 14 diff), pnpm-workspace.yaml 15, pnpm-lock.yaml +5 -2",
"deviations": "(1) No changeset, against the dispatch's parenthetical 'it does': measured the published tarball unchanged and the patch install-local (see summary); skip-changeset declared on pr_create. (2) pnpm patch-commit wrote patchedDependencies into package.json's pnpm field (duplicating the three rows); reverted and registered in pnpm-workspace.yaml as its comment block prescribes; package.json unchanged. (3) Final-head scoped test re-run and check:type-check-debt NOT MEASURED (lock), declared. (4) Case (c) pins the value-test edge the ruling's test implies; it reverses a vendor-pinned case. (5) Upstream draft unverified against the vendor suite. (6) The whole-package run built plugin-auth itself (its examples typecheck imports its own dist). (7) Commits carry the model-free trailer pair.",
"open_questions": [
{
"question": "The ruled derived test (value equality, 'the same test setFormattedName already makes') also recomposes a formatted/display name the IdP supplied explicitly when it EQUALS the composed parts, which @better-auth/scim's own suite pins as preserved (since v1.7.12). Keep it, or narrow?",
"options": [
"A — keep as ruled and landed here: every name that differs from the parts is kept; an explicit name equal to the parts follows the parts. The upstream PR changes that vendor test's fixture to differing names (drafted). Cost: none here; upstream may refuse a reversal of a pinned case, in which case ruling item (3) never fires and the patch stays until a re-ruling.",
"B — provenance: persist whether name.formatted was composed (a vendor-state field set at create/PATCH) and recompose only then. Keeps the vendor test as is, so upstream acceptance is likelier. Cost: a vendor schema/state change — a much larger patch than four lines, migration of stored scimUser rows; M-L upstream work.",
"C — keep A in this repo, and submit upstream as an opt-in (plugin option) so the vendor default is unchanged. Cost: upstream option design; the patch here stays as is."
],
"recommendation": "A, because the observable harm of recomposing a name that already equals 'given family' is nil for the measured tenants, it is the ruled test, and it lands today; submit the drafted upstream PR and, if the vendor refuses the fixture change, bring B or C back as a ruling then."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: maintainer (ruling 6845302116 item 3) · an npm install of the published @objectstack/plugin-auth resolves an unpatched @better-auth/scim until the vendor ships the recompose; noted in PR Acceptance notes, not filed",
"carrier: cloud · the ruling notes the cloud SCIM doc's known-issue line is no longer needed once the patch lands; a cloud doc edit, not made here",
"carrier: none · a user created with no name parts has name.formatted = primary email, and a later PATCH adding parts does not recompose it (not composed from parts); removing both parts one by one leaves name.formatted on the last single part; noted in Acceptance notes",
"carrier: none · pnpm patch-commit writes patchedDependencies into package.json's pnpm field, not pnpm-workspace.yaml (the yaml's comment already says to move it); noted in Acceptance notes"
]
}
Done · 2026-11-28T08:40Z — PR #38181 merged; this card closed as completed by its Fixes line. Delivered per ruling 6845302116 C items (1)–(2): the temporary @better-auth/scim@1.7.12 patch (a name-part PATCH recomposes a derived display name) with its regression pin, and the upstream draft in the PR body for the maintainer to submit. Remaining by the ruling's own words: item (3), removing the patch in the upgrade PR to the vendor release that ships the recompose (the regression pin stays); and the cloud SCIM doc's known-issue line, which is cloud's lane. pm:dispatched removed.
Activity
objectstack-fleet commentedon Nov 11, 2026
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U
Path: none
Triage:
findingpromoted →domain:server· p3 ·pm:queue· 2026-11-11T01:55Z⛔ Not a claim.
domain:server(the host's SCIM reconcile inplugin-auth). The vendor fix goes upstream to@better-auth/scim. Measured during cloud#3667's local SCIM run.displayNamewith the parts, so only a tenant mapping that sends only given or family name sees a stale name. It is not a security hole: no identity, grant or account state is wrong, only the display name.Generated by Claude Code
objectstack-fleet commentedon Nov 11, 2026
domain:server#4 · os-lizheng · session_012MmDsNv6qb5gT8Pd98AmCB
Claim: PM loop round 1
Session:
session_012MmDsNv6qb5gT8Pd98AmCBAccount:
os-lizheng(the seat's linked user asGET /useranswers it; the card's assignee)Branch:
claude/issue-32380-scim-name-recomposeWorktree:
objectstack-issue-32380Domain:
domain:serverSeat:
domain:server#4File surface:
packages/plugins/plugin-auth/src/**— the host's SCIMidentity.reconcileUserpath (auth-manager.tsreconcileScimUserLifecycleand the helper it calls), a new or existing SCIM test file besidescim-deactivation-reconcile-user.test.ts; root.changeset/. ⛔objectql-adapter.ts(#32388 in flight),pnpm-workspace.yaml/ vendor patches,ui/**,skills/**,docs/adr/**(stop on breach; explain in the report)Container & model:
M,mode:subagent,model: default tier — dispatch-gates --tier: no path-derived mandate,effort: highClause-②: no
Metadata-protocol: none
Responsibility:
@better-auth/scimsetNamePart(vendor) never recomposes; the host halfidentity.reconcileUserin objectstackplugin-auth| none | a tenant whose IdP mapping sends only given/family name; Entra's default mapping does not hit itThread-read: 6784696655
Premise: holds (re-read on
origin/main7d82b2d at 2026-11-11T12:56Z)Serial constraints cleared: #32388 (seat 3) edits
plugin-auth/src/objectql-adapter.tsonly — excluded from this surfaceobjectstack-fleet commentedon Nov 11, 2026
domain:server#4 · os-lizheng · session_012MmDsNv6qb5gT8Pd98AmCB
os-dev-report
{ "issue": 32380, "status": "needs_decision", "branch": "claude/issue-32380-scim-name-recompose", "pr": null, "session": "session_012MmDsNv6qb5gT8Pd98AmCB", "premise_still_valid": true, "summary": "Defect reproduced on origin/main 7d82b2da with @better-auth/scim 1.7.12, both PATCH shapes, through AuthManager.handleRequest with a real SCIM bearer: a user provisioned with givenName Renamed / familyName InOkta (displayName and name.formatted DERIVED = 'Renamed InOkta') gets PATCH name.givenName=Entra, name.familyName=Style (Entra path-addressed, and Okta path-less) → 200, parts move, but the SCIM resource displayName, name.formatted and sys_user.name all stay 'Renamed InOkta'. The ruled lane (the host's identity.reconcileUser) cannot tell derived from explicit, so per the dispatch's Zone 2 stop condition no code was written: measured inside the callback, the vendor has ALREADY written both the sys_user row (name = the unchanged old displayName, updateManagedBetterAuthUser) and the scimUser row (NEW parts, OLD displayName/formattedName) before it calls reconcileUser, and SCIMIdentityState carries only userId/active/profileSourceId/sources; the OLD parts are gone. The control proves the ambiguity: an IdP-explicit displayName 'Bob B' (parts Robert Smith) after PATCH givenName=Rob reaches the callback as displayName=formattedName='Bob B', parts Rob/Smith — the same shape as the derived case, so any rule there either overwrites an explicit name (forbidden) or fixes nothing. Second measurement kills the Zone 3 route outright: a host write of sys_user.name alone ('Entra Style') is reverted by the very next unrelated changing PATCH (title=Engineer → sys_user.name back to 'Renamed InOkta'), because the vendor rewrites name from its own stored scimUser.displayName on every profile-source PATCH. Mechanism correction to the card's Expected: reconcileUser does not run 'before the user row is written' — it runs after. The fix has to change the vendor's scimUser state (upstream setNamePart, or a host pre-image hook that rewrites vendor rows); that is a fork, analysed in open_questions.", "tests": "No code change, so no package test run is owed. Evidence runs (a temporary probe test, deleted, never committed; copy kept at the seat scratchpad issue-32380/zz-probe-32380.test.ts): `pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2 src/zz-probe-32380.test.ts` under os-verify-lock, both runs `VERDICT command-exit 0`, Tests 2 passed (2), tree 7d82b2da. Readings: 'entra PATCH 200 Renamed InOkta {formatted:Renamed InOkta, givenName:Entra, familyName:Style}', 'entra sys_user.name Renamed InOkta'; same three lines for okta; reconcile callback saw src {displayName:'Renamed InOkta', formattedName:'Renamed InOkta', givenName:'Entra', familyName:'Style'}, user.name 'Renamed InOkta'; 'HOSTFIX sys_user.name after simulated host write Entra Style' then 'HOSTFIX unrelated PATCH 200 sys_user.name now Renamed InOkta'; 'EXPLICIT CREATE 201 Bob B {formatted:Bob B, givenName:Robert, familyName:Smith}', 'EXPLICIT PATCH 200 RECONCILE SAW [{displayName:Bob B, formattedName:Bob B, givenName:Rob, familyName:Smith}]'. Vendor source read: node_modules/@better-auth/scim/dist/index.mjs setNamePart (stores the part only), composeName (used only by name.formatted remove), setFormattedName (displayName===formattedName test), PATCH handler order updateManagedBetterAuthUser → trx.update scimUser → projection.reconcileUser → identity.reconcileUser. Ablation: n/a (no tested behaviour changed).", "gates": "No diff: `node scripts/pm/dispatch-gates.mjs --commands` exit 2 — 'this branch changes nothing against origin/main (merge base 7d82b2dab) — nothing to derive'. No local gate owed; no PR, so no check-runs. Only build run: `pnpm --workspace-concurrency=2 --filter '@objectstack/plugin-auth^...' build` under the lock, VERDICT command-exit 0. pnpm lint not run (no diff).", "dogfood_battery": "n/a — no PR, no `!` in any title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "1 — POST issues/32380/comments (this os-dev-report, via scripts/pm/post-stamped.mjs). Plus 1 git push (empty claimed branch claude/issue-32380-scim-name-recompose at 7d82b2da, the routing probe). pr_create: 0.", "files_changed": [], "line_budget": "n/a — no diff", "deviations": "Stopped before code per the dispatch's Zone 2 stop condition (host reconcile cannot see enough to tell derived from explicit). Zone 2 assumption 'reconcileUser runs before the user row is written' (card Expected) measured false. Zone 3 route measured unstable (host-only sys_user.name write is reverted by the next unrelated PATCH). The empty branch stays pushed at 7d82b2da for a resume.", "open_questions": [ { "question": "Where should the recompose of displayName / name.formatted after a name-part PATCH live, given the host's identity.reconcileUser sees only the post-image (new parts, old displayName/formatted; old parts already overwritten) and a host-only sys_user.name write is reverted by the vendor on the next PATCH?", "options": [ "A — Upstream only: a PR to @better-auth/scim making setNamePart recompose formattedName (and, through setFormattedName, displayName) when formattedName === composeName(state) BEFORE the part changes — the same derived test the card names. Host change: none now; a dependency bump when the vendor releases, plus a pin in plugin-auth that both PATCH shapes move sys_user.name and an explicit displayName survives. Business need: measured pull is one local SCIM run (cloud#3667) and a tenant mapping that sends only given/family name; Entra's default mapping sends displayName, so waiting costs little. Long-term: fixes the producer (the vendor's state machine), so the SCIM resource, the vendor row and sys_user.name all converge and stay converged. AI-error resistance: one owner, no host shadow of vendor logic. No scope creep: zero host surface, no gate. Cost: ~10 vendor lines + a vendor test; release latency is outside our control. Effort S (plus an S bump PR later).", "B — Host pre-image hook: add a user.update.before database hook (fires inside the SCIM transaction from updateManagedBetterAuthUser, before the vendor's scimUser update, and only for the profile source) that stashes the source's OLD parts/formatted/displayName on the SCIM request scope; reconcileUser then compares pre and post and, when derived, rewrites the vendor's sys_scim_user row (displayName, formattedName, and name.formatted inside serializedAttributes JSON) and sys_user.name. Business need: same thin pull as A. Long-term: a consumer-side workaround of a producer defect, coupled to the vendor's private storage format (column semantics + serialized JSON) and to its call order — breaks silently on a vendor refactor; uses reconcileUser outside its declared contract ('reconciles global enabled or disabled state'). AI-error resistance: poor — hidden cross-hook state is exactly what later agents misread. Scope: adds a new host seam beside a path with open security findings (#32113, #32115). Mechanism of the before-hook firing inside the transaction is read from vendor source, not measured. Effort M-L (~200 lines + two-shape pins + controls + ablation).", "C — A, plus an interim pnpm patch of the vendor dist carrying the same setNamePart change until the release, removed on the bump. Same axes as A, with a short-lived vendor patch (maintainer-owned surface: pnpm-workspace.yaml / patches, excluded from this claim). Effort S.", "D — Close the host half as won't-fix-in-host and leave the card tracking only the upstream fix (no host PR at all). Same as A minus the later pin PR." ], "recommendation": "A, because the defect is in the producer (vendor setNamePart) and the host cannot fix it soundly from the ruled lane: the reconcile callback sees no pre-image, and a host-only sys_user.name write is reverted by the vendor's next PATCH. A keeps contract-first and adds no host surface; the measured business pull is thin (p3, Entra's default mapping unaffected), so the release latency is acceptable. C only if the maintainer wants it now and accepts a vendor patch; B is not recommended (consumer-side workaround over vendor-private storage)." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: this card (#32380) — the upstream @better-auth/scim PR (setNamePart recompose when formatted was derived from the parts) is owed under option A/C; it is a vendor-repo PR, not filed here. Dedupe words: scim setNamePart composeName displayName formatted recompose", "carrier: none — the card's Expected wording 'apply it in the host's identity.reconcileUser before the user row is written' is mechanically false on 1.7.12 (the callback runs after updateManagedBetterAuthUser and after the scimUser update); noted for the seat's re-read, not filed." ] }objectstack-fleet commentedon Nov 11, 2026
domain:server#4 · os-lizheng · session_012MmDsNv6qb5gT8Pd98AmCB
需裁决 · 待维护者 · 2026-11-11T13:14Z
Release: claim 6796434983 (
session_012MmDsNv6qb5gT8Pd98AmCB,domain:server#4) · cause: devneeds_decision(report 6796756062), nothing landedResume-from:
claude/issue-32380-scim-name-recompose@7d82b2da(empty branch)一句话问题: 企业的身份系统(Okta、Entra)只改了某位员工的「名」或「姓」时,ObjectOS 里显示的仍是旧名字。在本平台这一侧无法安全地修复,因为平台看不出这个显示名原本是由姓名拼出来的,还是管理员特意设的。
背景: dev 在
origin/main7d82b2d(@better-auth/scim1.7.12)上用真实 SCIM 令牌复现了两种 PATCH 形状。名字的各部分改了,但displayName、name.formatted和sys_user.name不变。席位在 vendor 源码里复读(dist/index.mjs):setNamePart只是state[attribute] = value,不重新拼名。PATCH 依次执行updateManagedBetterAuthUser→ 更新scimUser→identity.reconcileUser。所以宿主的回调运行时,旧的姓名各部分已经被覆盖了。卡上 Expected 写的「在写用户行之前」与实测不符。dev 还测了第二点:宿主单独改写sys_user.name,下一次无关的 PATCH(例如改 title)会把它写回旧名。Governing text: AGENTS.md L200 "No workarounds. Adopt sustainable, well-architected solutions — not temporary patches."(
git grep -n "No workarounds" origin/main -- AGENTS.md,对照词Post-Task Checklist)。分诊 6784696655:"not a security hole … only the display name"。是否改协议:否,不涉及元数据契约。前提与复核命令:
grep -n "function setNamePart" -A2 <scim dist>/index.mjs→ 函数体只有一行赋值(对照词composeName)。grep -n "updateManagedBetterAuthUser(\|identity.reconcileUser(" <scim dist>/index.mjs,看前者的行号是否小于后者。SCIMIdentityState只有userId、active、profileSourceId、sources(dev 探针zz-probe-32380.test.ts,未提交)。@better-auth/scim提上游 PR:setNamePart在原名是由姓名拼出时重新拼名;vendor 发版后本仓升级依赖,并加 pinreconcileUser里改写 vendor 的sys_scim_user行和sys_user.name业务含义直译: A = 请供应商修自己的零件;B = 在我们这边加一层转换来遮住零件的毛病;C = 先临时打个补丁,等正式件到了再拆;D = 只记账,不动手。
四维(业务立场):
source = env_native("Local Account"), so the managed-identity refusals never fire — the stamp waits for asys_accountinsert that @better-auth/scim 1.7.x no longer makes #32113、plugin-auth SCIM: re-activating a deactivated user (active: true) brings back the API keys and local password from before the deactivation #32115)。os-decision-facets
① 长远:A 缩小特例(修在生产方),B 扩大(消费端复刻 vendor 逻辑),C 同 A 外加一个临时件,D 中性。
② 拉动:今天只有只映射名/姓的租户会撞上,实测一次(cloud#3667),Entra 默认映射不撞。
③ 防错:A 单一归属方;B 静默不一致,出错时看不出来。
④ 不扩散:A、D 零新增宿主面;B 新增钩子接缝;C 新增临时补丁面。
Prior rulings read:
scim name displayName recompose reconcileUser→ 0 hits on rulings inplugin-auth/srcscope (auth-manager.ts holds 73 ruling/⛔ markers, none on SCIM name composition); ADR none; thread: none推荐:A。 只看①选 A;②③④ 是否翻转:否。置信缺口:vendor 是否接受 PR、何时发版,本席不可控。C 是在 A 之上的提速选项,只有维护者要立即修好、并接受临时补丁时才取。不取 B,因为它属于绕行。不取 D,因为升级后应有回归 pin。
裁后执行段: 选 A:dev 起草上游 PR 文本和 vendor 测试,由维护者或有该仓权限的人提交;本卡转
pm:on-hold,Restart-when:写「@better-auth/scim发布含该修复的版本」,唤醒后派一个 S 级升级+pin 的 PR。选 C:另加维护者批准的 patch PR。选 B:按 dev 方案派 M-L 卡,先实测 before 钩子是否在事务内触发(dev 未测)。1 remaining item
objectstack-fleet commentedon Nov 13, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Brief-claimed-by: session_01Q4EjjMnyLqJdzuktEmRPXH · batch #3 · 2026-11-13T05:26Z
Decision batch #3 (the last four of the box), on the maintainer's 「5张一批按总监决裁格式给我」.
objectstack-fleet commentedon Nov 13, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Ruling recorded · #32380 · C (upstream fix, and a temporary patch now) · 2026-11-13T05:47Z
Maintainer, verbatim (triage#1 session): 「创业项目,应该是需求合理就做」, then 「第三批同意」, approving the batch as revised under that principle:
32380 C / 31797 C / 32678 B / 32679 B + one-click reset. The batch was analysed independently at the fable tier, with prior rulings checked first.domain:serverlane drafts the upstream PR to@better-auth/scim(recomposedisplayName/name.formattedwhen it was derived from the name parts, plus the vendor test) from the kept branchclaude/issue-32380-scim-name-recompose. The maintainer, or someone with access to that repo, submits it; agents cannot.pnpm patchon the vendor package makes a name-only PATCH recompose the display name today, with a regression test for both PATCH shapes.patches/gains no other better-auth patch.active: true) brings back the API keys and local password from before the deactivation #32115.needs-user-decision→pm:queue. The cloud SCIM doc's known-issue line is no longer needed once the patch lands.Generated by Claude Code
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8
Picked by
card-pick.mjs --order area:data --seat repo:objectstack#8at 2026-11-28T03:11Z: rank 8 (p3 close-out, first non-fleet card of the grade); the p2 cards above it are a cross-repo step (#34365), an un-triaged card (#37375), an ADR card (#37405), seat 2's trunk card (#37768), a card queued behind this seat's #37709 on the same package (#37852) and a contract-shape design card (#37909). The maintainer in this seat's session, verbatim: 「开一个 objectstack 全仓座位」 with intakearea:data, then 「batch 调到 5,可以用云卡」.Claim: PM loop round 1
Session:
session_017xRBcSAaBEfQpU2yJexSJ8Account:
sunhaolinBranch:
claude/issue-32380-scim-name-recomposeWorktree:
objectstack-issue-32380Domain:
domain:serverSeat:
repo:objectstack#8File surface: one new
patches/@better-auth__scim*.patchand itspatchedDependenciesrow (pnpm-workspace.yamlor rootpackage.json, wherever the three existing patches are registered),pnpm-lock.yamlas pnpm writes it, a regression test underpackages/plugins/plugin-auth/src/**for both PATCH shapes, the upstream draft as text in the PR body, one changeset for@objectstack/plugin-authif its published behaviour moves; ⛔ no otherpatches/file, no change to the callback hooks near #32115 (stop on breach; explain in the report)Container & model:
M,mode:subagent,model: opus (dispatch-gates --tier: no path-derived mandate; default tier),effort: high(ruling implementation: M treatment)Clause-②: no
Metadata-protocol: none
Responsibility:
vendor — @better-auth/scim setNamePart stores the part and never recomposes formatted/displayName; this repo carries it through a temporary pnpm patch by ruling|none — only a displayName PATCH or a full PUT moves sys_user.name|tenants whose IdP mapping sends only name parts (Entra path-addressed and Okta path-less shapes measured on 7d82b2da)Thread-read: 6845302116
Premise: holds — the ruling's premise (defect reproduced on 7d82b2d, dev report 6796756062) is re-measured first by the dev on current main before the patch is written.
Resume-from:
claude/issue-32380-scim-name-recompose@7d82b2daSerial constraints cleared: seat 3's #36160 declares
package.json/pnpm-lock.yaml/pnpm-workspace.yaml(dependency work); textual overlap re-checked withoverlap-check.mjsbefore every push and the lockfile follows the os-regen merge order if it conflicts.Scope this dispatch: ruling C items (1)–(2) (draft upstream text, temporary patch + regression test); item (3) is the future upgrade PR.
Fixes #32380.Ruling-ref: 6845302116 — 「创业项目,应该是需求合理就做」 then 「第三批同意」 (32380 C).
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8
os-dev-report
{ "issue": 32380, "status": "done", "branch": "claude/issue-32380-scim-name-recompose", "pr": "https://github.com/objectstack-ai/objectstack/pull/38181", "session": "session_017xRBcSAaBEfQpU2yJexSJ8", "premise_still_valid": true, "summary": "Re-measured on current main first: with the patch registration removed, both PATCH shapes (Entra path-addressed Replace pair, Okta path-less replace with dotted keys) through AuthManager.handleRequest with a real SCIM bearer still leave displayName, name.formatted and sys_user.name on 'Renamed InOkta' (premise holds). Implemented ruling 6845302116 items (1)-(2): a temporary pnpm patch patches/@better-auth__scim@1.7.12.patch (header names the ruling and the removal condition) makes setNamePart recompose name.formatted, and through the vendor's setFormattedName displayName, with the vendor's composeName when name.formatted equalled composeName of the parts before the change; registered in pnpm-workspace.yaml beside the three existing patches; regression pin scim-name-recompose.test.ts (8 cases: both shapes, an unrelated PATCH keeps the new name, four CONTROLs that keep explicit names and let a displayName PATCH win in both orders, and one edge case); the upstream draft (vendor diff, vendor tests, PR paragraph) is in the PR body. MEASURED FINDING for the maintainer: @better-auth/scim's own suite at v1.7.12 and at main (1.7.28) pins 'preserves explicitly supplied formatted and display names when patching one name part' with an explicit name EQUAL to the composed parts; the vendor stores no provenance, so the ruled value test reads that shape as derived and recomposes it. The patch therefore reverses that vendor-pinned case (pinned here as case (c)), and the upstream draft has to change that vendor test's fixture, which the vendor may refuse (open_questions). No changeset: measured that the published plugin-auth tarball is unchanged and a pnpm patch reaches only installs of this workspace (dev, CI, framework-build-base image), never an npm install of @objectstack/plugin-auth; skip-changeset rides pr_create.", "tests": "Red without the patch (row deleted from pnpm-workspace.yaml, pnpm install, vendor dist carrying 0 patched lines), tree 58bebae26: `pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2 src/scim-name-recompose.test.ts` under os-verify-lock, VERDICT command-exit 1, 'Tests 6 failed | 2 passed (8)', received displayName/formatted/userName 'Renamed InOkta' vs expected 'Entra Style' (the 2 that pass red are the explicit-name preservation CONTROLs). Green with it (git restore --source=HEAD, pnpm install --frozen-lockfile): VERDICT command-exit 0, 'Tests 8 passed (8)'. Whole package on 6206923a6: `pnpm --filter @objectstack/plugin-auth build && ... typecheck && ... exec vitest run --maxWorkers=2`, VERDICT command-exit 0, check:test-typecheck OK, 'Test Files 297 passed (297)', 'Tests 6313 passed | 10 skipped (6323)'. Final head c40d3488e5 = 6206923a6 + merge of origin/main touching no file under plugin-auth, patches/, pnpm-lock.yaml, pnpm-workspace.yaml or package.json (git diff --stat empty); the scoped SCIM re-run on c40d3488e5 is NOT MEASURED, reason: the verify lock was not acquired in three 9-minute windows (VERDICT queue-timeout exit 99, holder another session's dogfood run, 27-40 min); declared narrowing, CI Test Core runs it. Ablation: the red run above is the registration ablation (rebuild = reinstall, on-disk proof = 0 occurrences of formattedNameWasDerived in the installed vendor dist, 2 after restore). Upstream draft NOT MEASURED against the vendor's own suite (its workspace not installed here).", "gates": "Local: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` on c40d3488e5 derived 61 families (same list as on 58bebae26); all 61 run on c40d3488e5 with exit codes recorded (`cmd > out 2>&1; EXIT=$?`), `--ran` reconciliation: '61 derived famil(ies) accounted for — 60 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)'. 60 exit 0. check:type-check-debt exit 3 on c40d3488e5 (prerequisite not met after the merge moved packages/spec; rebuild blocked by the lock) = NOT MEASURED there; on 58bebae26 exit 0, '0 ledger entr(ies) re-measured in 817.5s, 0 raw tsc error(s) total'. check:test-source-alias was red on the first test draft (egress guard loaded in a case) and exit 0 after the module-top import (commit 6206923a6). check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure exit 3 before the closure build, exit 0 after. Published-content check: after building plugin-auth, the patched line occurs in 0 files of dist/ while dist/index.js and dist/index.mjs import @better-auth/scim (positive control). CI on c40d3488e5 at report time (one read, no polling): Check Changeset, Lint · ESLint, Lint · repo & tooling gates, Type Check · workspace, Type Check · debt ledger, Governed Surface Queue Guard, PR-body guards and the rest queued or in_progress; no conclusion yet. pnpm lint not run (CI-owned).", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 relay strokes via fleet-write/dispatch.mjs (each a POST /repos/objectstack-ai/objectstack/dispatches): (1) pr_create = POST pulls (draft, PR #38181), POST issues/38181/assignees [sunhaolin], POST issues/38181/labels [skip-changeset], read back identical 16248 bytes, assignee and label listed; (2) this os-dev-report = POST issues/32380/comments via post-stamped.mjs. Plus 3 git pushes (not REST).", "files_changed": [ "patches/@better-auth__scim@1.7.12.patch", "pnpm-workspace.yaml", "pnpm-lock.yaml", "packages/plugins/plugin-auth/src/scim-name-recompose.test.ts" ], "line_budget": "+429 -2 against origin/main: test 377, patch 32 (18 header lines + 14 diff), pnpm-workspace.yaml 15, pnpm-lock.yaml +5 -2", "deviations": "(1) No changeset, against the dispatch's parenthetical 'it does': measured the published tarball unchanged and the patch install-local (see summary); skip-changeset declared on pr_create. (2) pnpm patch-commit wrote patchedDependencies into package.json's pnpm field (duplicating the three rows); reverted and registered in pnpm-workspace.yaml as its comment block prescribes; package.json unchanged. (3) Final-head scoped test re-run and check:type-check-debt NOT MEASURED (lock), declared. (4) Case (c) pins the value-test edge the ruling's test implies; it reverses a vendor-pinned case. (5) Upstream draft unverified against the vendor suite. (6) The whole-package run built plugin-auth itself (its examples typecheck imports its own dist). (7) Commits carry the model-free trailer pair.", "open_questions": [ { "question": "The ruled derived test (value equality, 'the same test setFormattedName already makes') also recomposes a formatted/display name the IdP supplied explicitly when it EQUALS the composed parts, which @better-auth/scim's own suite pins as preserved (since v1.7.12). Keep it, or narrow?", "options": [ "A — keep as ruled and landed here: every name that differs from the parts is kept; an explicit name equal to the parts follows the parts. The upstream PR changes that vendor test's fixture to differing names (drafted). Cost: none here; upstream may refuse a reversal of a pinned case, in which case ruling item (3) never fires and the patch stays until a re-ruling.", "B — provenance: persist whether name.formatted was composed (a vendor-state field set at create/PATCH) and recompose only then. Keeps the vendor test as is, so upstream acceptance is likelier. Cost: a vendor schema/state change — a much larger patch than four lines, migration of stored scimUser rows; M-L upstream work.", "C — keep A in this repo, and submit upstream as an opt-in (plugin option) so the vendor default is unchanged. Cost: upstream option design; the patch here stays as is." ], "recommendation": "A, because the observable harm of recomposing a name that already equals 'given family' is nil for the measured tenants, it is the ruled test, and it lands today; submit the drafted upstream PR and, if the vendor refuses the fixture change, bring B or C back as a ruling then." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: maintainer (ruling 6845302116 item 3) · an npm install of the published @objectstack/plugin-auth resolves an unpatched @better-auth/scim until the vendor ships the recompose; noted in PR Acceptance notes, not filed", "carrier: cloud · the ruling notes the cloud SCIM doc's known-issue line is no longer needed once the patch lands; a cloud doc edit, not made here", "carrier: none · a user created with no name parts has name.formatted = primary email, and a later PATCH adding parts does not recompose it (not composed from parts); removing both parts one by one leaves name.formatted on the last single part; noted in Acceptance notes", "carrier: none · pnpm patch-commit writes patchedDependencies into package.json's pnpm field, not pnpm-workspace.yaml (the yaml's comment already says to move it); noted in Acceptance notes" ] }objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8
Done · 2026-11-28T08:40Z — PR #38181 merged; this card closed as completed by its
Fixesline. Delivered per ruling 6845302116 C items (1)–(2): the temporary@better-auth/scim@1.7.12patch (a name-part PATCH recomposes a derived display name) with its regression pin, and the upstream draft in the PR body for the maintainer to submit. Remaining by the ruling's own words: item (3), removing the patch in the upgrade PR to the vendor release that ships the recompose (the regression pin stays); and the cloud SCIM doc's known-issue line, which is cloud's lane.pm:dispatchedremoved.