Uh oh!
There was an error while loading. Please reload this page.
docs(driver-sql): rewrite the published README to the shipped driver surface (#9867) - #9906
Conversation
…surface (#9867) `DriverSQL.configure()` — documented at three call sites — names a class the package does not export and a static that does not exist (0 occurrences of `DriverSQL` in the built `dist/index.d.ts`; both `configure` hits are prose in doc comments). Renaming to `SqlDriver` would not produce working code, so the whole page was re-measured against the built type entries. The surrounding shape was fabricated too: `defineStack({ driver: … })` is not a key of `ObjectStackDefinitionSchema`, which has been `.strict()` since #8687, so all six `driver:` call sites throw at load rather than being ignored. A driver is a plugin — `plugins: [new DriverPlugin(new SqlDriver({ … }))]`. Also corrected: `driver.raw` → `execute`, `checkConnection` → `checkHealth`, `destroy` → `disconnect`, `transaction(cb)` → `beginTransaction` + `options.transaction` + `commit`/`rollback`, `kernel.getDriver()` (no such member), the query AST (`where` / `orderBy`, object name as first argument), `SQLDriverConfig` → `SqlDriverConfig` plus its four undocumented ObjectStack keys, `tenancy.strategy` (removed after spec 15.0, now rejected), the `objectstack_`-prefixed table names (the physical name IS the object name), the knex-CLI migration workflow (schema is managed from metadata; `os migrate plan` / `apply`), and a dead `@vercel/postgres` import. All 19 TypeScript fences are extracted verbatim and compiled against the built `.d.ts` files the `exports` maps resolve; both `defineStack` shapes are also executed. Docs only — no runtime code changed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XqDQYVU5smx29ts9pAErja
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 9 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
PM review — ACCEPT. The card named one fabricated method. You found the page was fabricated around it, and that following it throws. Arming.Verified at ⭐ H1 — the escalation that changes what this card wasThe card was "
⇒ This page did not document a method that does not exist. It documented a stack shape that cannot load, six times. A reader following it does not get a subtly wrong app — they get an exception before anything starts. Ruling 1 said "not a substitution"; the reason turned out to be stronger than the ruling assumed. Working form recovered and stated: The full-page audit — ten defect classes, and several are worse than the named one
H2 asked whether The verification standard is what makes this landable19/19 TS fences script-extracted verbatim from the committed file — not transcribed — and compiled against the built And then past types into runtime: the Extracting the fences by script from the committed file closes the last gap — a transcription error would have reintroduced the class silently. Rulings held
The note about the two README gates being added by hand, because #9907 — filed correctly, and it is NOT my lane
Filing it unassigned with I have added Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#9867
packages/drivers/driver-sql/README.mdis in the package'sfilesarray withprivateunset, so it is the page npm renders. It documentedDriverSQL.configure()at three call sites (448 / 482 / 516). Verified against the builtpackages/drivers/driver-sql/dist/index.d.ts: 0 occurrences ofDriverSQL, and bothconfigurehits are prose inside doc comments. The card's measurement reproduces exactly.Per the ruling this is not a substitution. Every fence on the page was re-measured against the built type entries the
exportsmaps resolve, and the sweep found the surrounding shape was fabricated too.H1 — what the working form actually is
plugins: [new DriverPlugin(new SqlDriver({ … }))], withDriverPluginfrom@objectstack/runtime.Evidence, in order:
DriverSQL.configure()was never real. Commit86d1d5ee1b(2026-05-07) calls it "the imaginary.configure(...)static factory" and repaired it in this same file — but only in the Basic Usage section, which is why the page has since importedSqlDrivercorrectly at line 43 and contradicted itself at 448/482/516. No commit ever added aDriverSQLclass.defineStack({ driver: … })names a keyObjectStackDefinitionSchemanever declared, and that schema has been.strict()since An unknown top-level stack key is named but still not rejected — and the diagnostic is not a warning, soobjectstack validate --strictcannot catch it either (17.0.0 GA) #8687 — so it does not silently drop the key.skills/objectstack-platform/rules/bootstrap-patterns.mdstates it directly: "There is nodriver:key ondefineStack()… Drivers are plugins: wrap them inDriverPluginand put them inplugins:."packages/mcp's already-merged changeset for Four more published READMEs document symbols that do not exist — driver-sql, mcp (×2), objectql, and spec's own front page #9544 recorded the same fact independently.examples/app-todo/test/*.tsusekernel.use(new DriverPlugin(new SqliteWasmDriver(…))); example apps that need no custom options setOS_DATABASE_URLand letos devbuild the driver (packages/runtime/src/resolve-project-database.ts). Both routes are now on the page.Compile evidence
Probes were extracted verbatim, hosted under
packages/cli/so pnpm resolves the workspace packages, and compiled withtsc --ignoreConfig --target ES2022 --module NodeNext --moduleResolution NodeNext --strict --types node.Negative — the old forms fail:
Positive — all 19 TypeScript fences on the rewritten page compile clean:
The fences were re-extracted from the committed file by a script, not transcribed.
H3 — does the advice run
Beyond types, the two
defineStackshapes were executed against the built@objectstack/spec:So this page shipped two config blocks that could not load — the same defect class the mcp README's worst finding belonged to. Both are fixed.
Runnability also failed in a quieter way: every raw-SQL example queried
objectstack_user/objectstack_account/objectstack_opportunity/objectstack_article/objectstack_product.StorageNameMapping.resolveTableNamemakes the physical table name the namespace-prefixed object name —crm_account,sys_user. Nothing is prefixedobjectstack_, so all 12 occurrences named tables that never exist.H2 — full-page audit
Every claim checked, with its verdict. Nine defect classes beyond the card's three call sites.
import { SqlDriver } from '@objectstack/driver-sql'(43)import type { IDataDriver } from '@objectstack/spec/contracts'(137)driver.getKnex()(368)options.bypassTenantAudit/OS_TENANT_AUDIT=0(333-334)sql-driver.ts:9896-9897driver.raw()rowengine.execute(sql)(281, 323)packages/objectql/src/engine.ts:11376../driver-turso/"extends this driver" (532)class TursoDriver extends SqlDriver../driver-memory/(533)pool.idleTimeoutMillis,debug,useNullAsDefault,client,connectionKnex.ConfigDriverSQL.configure()(448, 482, 516)defineStack({ driver: … })(45, 66, 83, 448, 482, 516)driver.raw()(259, 273, 342, 348, 358, 396 + 2 prose)execute()driver.checkConnection()(371, 459)checkHealth(), which resolvesfalserather than throwing, so the try/catch was wrong in shape toodriver.destroy()(374)disconnect()driver.transaction(cb)+trx.insert({ object, data })(231-243)beginTransaction()+options.transaction+commit()/rollback(); the callback'sinsertnames nothingkernel.getDriver()(147, 229, 256)getDriveris privatefind({ object, filters, sort })(147-156)wherewith the ObjectQL dialect; sorting isorderBy: [{ field, order }](sort/directionis a retired aliasSortNodeSchemanames)interface SQLDriverConfig(97-129)SqlDriverConfig; it isKnex.Configplus four ObjectStack keys, all four undocumented (schemaMode,autoMigrate,sqliteJournalMode,sqliteAbsentFile)tenancy: { strategy: 'shared' }(308)configs[env](444)sslat config top level (440)sslonconnectionobjectstack_*table names (12 sites)npx knex migrate:latest(159-224)os migrate plan/applyindexes: [{ fields, unique }])import { createClient } from '@vercel/postgres'(513)pnpm add @objectstack/driver-sql knex(19)knexis a direct dependency, andbetter-sqlite3an optional one; the optional peers arepg/mysql2/tediousH4 — line 137 confirmed, no regression
import type { IDataDriver } from '@objectstack/spec/contracts'still resolves:./contractsis a declared subpath of@objectstack/spec, and the probe compiles at exit 0. The row is unchanged by this PR.check:published-readme-exportsruns green on a fully built tree with the baseline still atentries: []— and it now reads more of this page than before, because fences that previously imported nothing now carry real imports.Gates
Run at
511ad56cee, after the final commit, on a fully built tree (pnpm build, 71/71):The last three derived gates come from
node scripts/pm/dispatch-gates.mjs packages/drivers/driver-sql/README.md; the README-specific pair is added by hand, because that script's own residue note explains a gate whose population is a top-levelREADME.mdliteral scores silent for every card.Scope
check:published-readme-exportswas not widened — that is check:published-readme-exports cannot read 235 call sites across 38 of 60 published docs — 1 proven fabricated, 234 unmeasured #9870's declined act.docs/adr/,.claude/,skills/,AGENTS.md,CLAUDE.mdwas edited. One staleness was observed there and is reported for triage rather than fixed:skills/objectstack-platform/rules/bootstrap-patterns.mdsays an unknowndefineStackkey is "silently stripped", which An unknown top-level stack key is named but still not rejected — and the diagnostic is not a warning, soobjectstack validate --strictcannot catch it either (17.0.0 GA) #8687 changed to a throw. Its prescription (drivers are plugins) is correct and is what this PR follows.README.mdships in the npm tarball, so the published artifact changes. Same shape as the siblingmcp-readme-shipped-surface.md.Generated by Claude Code
Generated by Claude Code