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
The engine-registration path is still unreached by the introspection compile channel: IDataDriver declares no introspectSchema, and IDataEngine.introspectDatasource() returns Promise<unknown> #11493
Found while implementing #11381 (option C of the #11123 ruling — tightening DatasourceDriverHandle.introspectSchema to the spec IntrospectedSchema, PR #11492). Out of scope there by the ruling's own boundary: the ruling names the DatasourceDriverHandle seam; this is the other road into the same runtime read. Filed unassigned, measured at b6d9432d1a.
The gap
#11492 wires the compiler channel for drivers that cross DatasourceDriverHandle — the host-factory path. But a custom driver has a second documented entry: constructed by the host and handed to IDataEngine.registerDriver() (directly, or via the handle's driver: unknown escape hatch that the connection service registers for it). On that path nothing types the introspection result:
packages/spec/src/contracts/data-driver.ts — IDataDriver declares nointrospectSchema member at all, so a driver author implementing the interface gets no signature to mis-match against.
packages/objectql/src/engine.ts — introspectDatasource(datasource: string): Promise<unknown> duck-types the call (this.drivers.get(datasource) as any … driver.introspectSchema()), and its Promise<unknown> return then forces every consumer to re-narrow (the one in-tree consumer, service-datasource/src/plugin.ts, declares its own structural DataEngineLike with the spec type to get around it).
So a mis-shaped driver registered through the engine still compiles clean and is absorbed only by the PR #11001 runtime shim — exactly the population/channel argument recorded in #11123, one seam over.
Candidate shape (needs its own ruling — both are public-surface changes)
Tighten introspectDatasource(): Promise<unknown> to the spec type in objectql, which then lets plugin.ts drop its structural re-declaration.
Blast radius is wider than #11381's (the engine and the central driver contract vs one handle member), so it wants its own four-axis pass, not a rider.
Refs: #11123 (ruling + analysis) · #11381 / PR #11492 (the handle-side tightening) · PR #11001 (the runtime shim both channels fall back to)
Found while implementing #11381 (option C of the #11123 ruling — tightening
DatasourceDriverHandle.introspectSchemato the specIntrospectedSchema, PR #11492). Out of scope there by the ruling's own boundary: the ruling names theDatasourceDriverHandleseam; this is the other road into the same runtime read. Filed unassigned, measured atb6d9432d1a.The gap
#11492 wires the compiler channel for drivers that cross
DatasourceDriverHandle— the host-factory path. But a custom driver has a second documented entry: constructed by the host and handed toIDataEngine.registerDriver()(directly, or via the handle'sdriver: unknownescape hatch that the connection service registers for it). On that path nothing types the introspection result:packages/spec/src/contracts/data-driver.ts—IDataDriverdeclares nointrospectSchemamember at all, so a driver author implementing the interface gets no signature to mis-match against.packages/objectql/src/engine.ts—introspectDatasource(datasource: string): Promise<unknown>duck-types the call (this.drivers.get(datasource) as any…driver.introspectSchema()), and itsPromise<unknown>return then forces every consumer to re-narrow (the one in-tree consumer,service-datasource/src/plugin.ts, declares its own structuralDataEngineLikewith the spec type to get around it).So a mis-shaped driver registered through the engine still compiles clean and is absorbed only by the PR #11001 runtime shim — exactly the population/channel argument recorded in #11123, one seam over.
Candidate shape (needs its own ruling — both are public-surface changes)
introspectSchema?(): Promise<IntrospectedSchema>(spec contract) toIDataDriver— an optional-member addition on the central driver contract; audit the in-tree drivers' declared return types (driver-sql / objectql types already extend the spec contract post-fix(driver-sql):introspectSchema()emits the spec introspection contract —primaryKey,dialect,introspectedAt(#10676, #10998) #11124/spec: withdraw the never-honored introspectionindexespromise; widendefaultValue/maxLengthto the measured emitted types #11270).introspectDatasource(): Promise<unknown>to the spec type in objectql, which then letsplugin.tsdrop its structural re-declaration.Blast radius is wider than #11381's (the engine and the central driver contract vs one handle member), so it wants its own four-axis pass, not a rider.
Refs: #11123 (ruling + analysis) · #11381 / PR #11492 (the handle-side tightening) · PR #11001 (the runtime shim both channels fall back to)