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
fix(cli): fail loudly when turso/libSQL is selected in the open-core CLI (#3276 follow-up)
Same "declared ≠ enforced" bug class as the `memory` fix (#3276): `os dev` /
`os start` / `os serve` advertise a `turso` driver (`--database-driver turso`,
`OS_DATABASE_DRIVER=turso`, `libsql://` URLs), but the dispatch had no `turso`
branch — so selecting it silently fell through to the SQLite default and ignored
the requested remote libSQL connection.
turso/libSQL is a cloud/EE driver (`@objectstack/driver-turso`, an extension of
SqlDriver over `@libsql/client`), composed by the cloud runtime's own kernel
factory; the open-core standalone stack deliberately stopped consuming it and its
config schema lives in the cloud package to keep it out of `@objectstack/spec`.
Rather than pull the EE driver into open-core:
- `createStorageDriver` throws a typed `UnsupportedDriverError` for `turso` /
`libsql`, with an actionable message (names @objectstack/driver-turso + the
open-core alternatives).
- `serve.ts` re-throws it from the driver block's catch so run()'s fatal handler
prints the message and exits 1 (dev AND prod) — never a silent SQLite boot.
- `inferDriverTypeFromUrl` keeps classifying `libsql://` / `*.turso.*` as `turso`
(not '') so those URLs hit the same loud failure instead of the SQLite default.
Verified end-to-end: `OS_DATABASE_DRIVER=turso` and `OS_DATABASE_URL=libsql://...`
both exit 1 with the fatal message; `OS_DATABASE_DRIVER=memory` still boots. Unit
tests prove the branch goes red (dev→SqlDriver, prod→null) without it.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments