Found during the consumer sweep on #11757 (leg 1a of #11632). Filed unassigned, out of that card's scope, not fixed there.
What was measured
packages/plugins/plugin-auth/src/auth-schema-config.ts:1005 declares:
exportconstAUTH_SCIM_PROVIDER_SCHEMA={modelName: 'sys_scim_provider',fields: {providerId: 'provider_id',scimToken: 'scim_token',organizationId: 'organization_id',userId: 'user_id',},}asconst;Nothing in the repository reads it. Measured on origin/main at 5cb62d88b8:
$ git grep -n "AUTH_SCIM_PROVIDER_SCHEMA" origin/main -- .
origin/main:packages/plugins/plugin-auth/src/auth-schema-config.ts:1005:export const AUTH_SCIM_PROVIDER_SCHEMA = {
One hit — its own declaration. No call site, no test, no doc.
Why it is inert by construction, not merely unused yet
Its own doc comment states the reason it can never be applied: @better-auth/scim "hardcodes its model and exposes NO schema option — still true of the installed @better-auth/scim@1.7.0-rc.1 (SCIMOptions declares no schema / modelName / fields member at all)". There is nowhere to pass it. The mapping that actually governs those writes is the adapter layer — AUTH_MODEL_TO_PROTOCOL in objectql-adapter.ts:57 plus the mechanical camelCase → snake_case resolution — which derives the same four column names independently.
So this is a declared-but-unenforced residue of the shape Prime Directive #10 names: a second declaration of one contract, where only the other one is load-bearing. Its sibling constants in the same file (buildDeviceAuthorizationPluginSchema, buildOrganizationPluginSchema, …) are all genuinely passed as schema options; this one is the odd member.
Two consequences worth the file:
- It is public API.
packages/plugins/plugin-auth/src/index.ts:69 does export * from './auth-schema-config.js', so the inert mapping is exported from the published package and a downstream consumer could read it as authoritative. - It can drift silently. If the real adapter-side names ever change, nothing fails when this copy does not follow — there is no consumer to break.
Disposition is adjacent to #11632
sys_scim_provider itself is under a retirement ruling (#11693), and #11632 scope item 2 rewrites the scim({...}) call for stable. Whoever moves that pin should decide this constant's fate in the same stroke rather than carrying it forward — it is either deleted with the object, or (if stable ever accepts a schema option) it becomes real for the first time. Recording it now so it is not carried across the migration unexamined.
Not urgent, not a runtime defect: no behaviour depends on it today.
Refs: #11757 (the sweep that found it) · #11632 · #11693 · #3653
Found during the consumer sweep on #11757 (leg 1a of #11632). Filed unassigned, out of that card's scope, not fixed there.
What was measured
packages/plugins/plugin-auth/src/auth-schema-config.ts:1005declares:Nothing in the repository reads it. Measured on
origin/mainat5cb62d88b8:One hit — its own declaration. No call site, no test, no doc.
Why it is inert by construction, not merely unused yet
Its own doc comment states the reason it can never be applied:
@better-auth/scim"hardcodes its model and exposes NOschemaoption — still true of the installed@better-auth/scim@1.7.0-rc.1(SCIMOptionsdeclares noschema/modelName/fieldsmember at all)". There is nowhere to pass it. The mapping that actually governs those writes is the adapter layer —AUTH_MODEL_TO_PROTOCOLinobjectql-adapter.ts:57plus the mechanical camelCase → snake_case resolution — which derives the same four column names independently.So this is a declared-but-unenforced residue of the shape Prime Directive #10 names: a second declaration of one contract, where only the other one is load-bearing. Its sibling constants in the same file (
buildDeviceAuthorizationPluginSchema,buildOrganizationPluginSchema, …) are all genuinely passed asschemaoptions; this one is the odd member.Two consequences worth the file:
packages/plugins/plugin-auth/src/index.ts:69doesexport * from './auth-schema-config.js', so the inert mapping is exported from the published package and a downstream consumer could read it as authoritative.Disposition is adjacent to #11632
sys_scim_provideritself is under a retirement ruling (#11693), and #11632 scope item 2 rewrites thescim({...})call for stable. Whoever moves that pin should decide this constant's fate in the same stroke rather than carrying it forward — it is either deleted with the object, or (if stable ever accepts aschemaoption) it becomes real for the first time. Recording it now so it is not carried across the migration unexamined.Not urgent, not a runtime defect: no behaviour depends on it today.
Refs: #11757 (the sweep that found it) · #11632 · #11693 · #3653