The CLI advertises memory as a database driver — --database-driver … | memory (packages/cli/src/commands/dev.ts:88), and OS_DATABASE_DRIVER=memory is special-cased in dev (dev.ts:41; resolveDefaultDevDbUrl at dev.ts:40-42).
But packages/cli/src/commands/serve.ts's driver dispatch has no memory branch (verified by grep). So OS_DATABASE_DRIVER=memory falls through to the isDev SQLite default (resolveSqliteDriver at :memory:), yielding SQLite-in-memory, not the mingo InMemoryDriver. The InMemoryDriver is only reached if both native better-sqlite3 and the wasm fallback fail to load.
Impact: declared ≠ enforced — selecting the memory driver silently gives a different engine than intended.
Fix: add a driverType === 'memory' branch in the serve.ts dispatch that returns the InMemoryDriver.
Found during the #1880 docs implementation-accuracy audit (PR #3243); out of scope for that docs-only PR.
The CLI advertises
memoryas a database driver —--database-driver … | memory(packages/cli/src/commands/dev.ts:88), andOS_DATABASE_DRIVER=memoryis special-cased in dev (dev.ts:41;resolveDefaultDevDbUrlatdev.ts:40-42).But
packages/cli/src/commands/serve.ts's driver dispatch has nomemorybranch (verified by grep). SoOS_DATABASE_DRIVER=memoryfalls through to the isDev SQLite default (resolveSqliteDriverat:memory:), yielding SQLite-in-memory, not the mingoInMemoryDriver. TheInMemoryDriveris only reached if both nativebetter-sqlite3and the wasm fallback fail to load.Impact: declared ≠ enforced — selecting the
memorydriver silently gives a different engine than intended.Fix: add a
driverType === 'memory'branch in theserve.tsdispatch that returns theInMemoryDriver.Found during the #1880 docs implementation-accuracy audit (PR #3243); out of scope for that docs-only PR.