Found while converting the five plugin-auth harnesses in #14756 to import
authIdentityObjects from the plugin manifest. Filed unassigned, not fixed
there: the objects involved are not in authIdentityObjects, so the manifest
import cannot reach them, and picking a fix crosses a package ownership line
that card does not own.
What is measured
packages/plugins/plugin-auth/src/sso-register-platform-admin-gate.test.ts
boots an in-memory engine in bootEngine() and registers the auth identity
objects plus two hand-declared fixtures, sys_permission_set and
sys_user_permission_set. It never registers sys_position or
sys_user_position.
The platform-admin standing resolver the suite drives reads both:
packages/core/src/security/admin-standing-surface.ts declares
sys_user_position and the position lookup beside it. Those objects are owned
by plugin-security (packages/plugins/plugin-security/src/objects/sys-position.object.ts
and its SysUserPosition sibling), not by plugin-auth.
So every green run of that suite emits driver errors for tables that do not
exist. Tallied on main at 2d40f9146, one vitest run of that single file:
| table |
refused-read lines per run |
sys_position |
4 |
sys_user_position |
4 |
Each is a [sql-driver] DATABASE_ERROR ... no such table line. The suite still
reports Tests 4 passed (4) — the resolver treats the failed read as "no
positions" and the assertions never notice.
This is unchanged by the #14756 conversion (verified: 4 and 4 both before and
after), because neither object is in the auth identity manifest.
Why it matters
It is the same shape #14756 exists to remove: a harness whose registered object
set is narrower than the code path it drives, kept invisible because the errors
are logged rather than thrown and the run is green. A future change that makes
platform-admin standing actually depend on a position row would be tested
against an engine that can never return one, and the suite would keep passing.
Possible directions, not a recommendation
Which of those is right is a judgement about ownership and about the resolver's
contract, so this is filed for triage rather than fixed.
Generated by Claude Code
Generated by Claude Code
Found while converting the five plugin-auth harnesses in #14756 to import
authIdentityObjectsfrom the plugin manifest. Filed unassigned, not fixedthere: the objects involved are not in
authIdentityObjects, so the manifestimport cannot reach them, and picking a fix crosses a package ownership line
that card does not own.
What is measured
packages/plugins/plugin-auth/src/sso-register-platform-admin-gate.test.tsboots an in-memory engine in
bootEngine()and registers the auth identityobjects plus two hand-declared fixtures,
sys_permission_setandsys_user_permission_set. It never registerssys_positionorsys_user_position.The platform-admin standing resolver the suite drives reads both:
packages/core/src/security/admin-standing-surface.tsdeclaressys_user_positionand the position lookup beside it. Those objects are ownedby plugin-security (
packages/plugins/plugin-security/src/objects/sys-position.object.tsand its
SysUserPositionsibling), not by plugin-auth.So every green run of that suite emits driver errors for tables that do not
exist. Tallied on
mainat2d40f9146, onevitest runof that single file:sys_positionsys_user_positionEach is a
[sql-driver] DATABASE_ERROR ... no such tableline. The suite stillreports
Tests 4 passed (4)— the resolver treats the failed read as "nopositions" and the assertions never notice.
This is unchanged by the #14756 conversion (verified: 4 and 4 both before and
after), because neither object is in the auth identity manifest.
Why it matters
It is the same shape #14756 exists to remove: a harness whose registered object
set is narrower than the code path it drives, kept invisible because the errors
are logged rather than thrown and the run is green. A future change that makes
platform-admin standing actually depend on a position row would be tested
against an engine that can never return one, and the suite would keep passing.
Possible directions, not a recommendation
hand-declares
sys_permission_setandsys_user_permission_set.make it not log. That overlaps the fenced arm of [finding] plugin-auth SCIM harnesses register no OAuth objects, so every sign-in logs a Better Auth ERROR (
back-channel logout planning failed … no such table: sys_oauth_access_token) #14615 and should not bechosen here without that decision.
Which of those is right is a judgement about ownership and about the resolver's
contract, so this is filed for triage rather than fixed.
Generated by Claude Code
Generated by Claude Code