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
{{ message }}
Repository navigation
Commit b96f987
Browse filesBrowse the repository at this point in the historyBrowse files
fix(drivers): recover #1204 review debt — driver-e2e false-skip, file: URI checks, Windows paths, telemetry, docs
#1204 (fix/warehouse-store-path-resolution, merged 1caa234) shipped the core
path-resolution fix but merged with only 2 of 47 review threads addressed. This
recovers the real bugs and finishes the incomplete P1 left behind.
Recovered from an orphaned agent worktree, re-applied and re-verified here:
- drivers-e2e.test.ts: three bare connect({ type: "duckdb" }) calls threw
under #1204's new requireStorePath() guard, so probeDuckDB() always
self-caught and 39 of 50 tests in the file silently skipped even with the
duckdb binding installed. Fixed by passing path: ":memory:". Verified
independently: 11 pass/39 skip -> 36 pass/14 skip.
- file-store.ts isLocalFilePath: the scheme-exclusion regex matched any
"2+ letter prefix + colon", misreading a local filename shaped like
data:warehouse.duckdb as a remote scheme. Narrowed to real scheme://
URIs plus DuckDB's specific non-slash extension schemes (md:,
motherduck:, ducklake:). Added a regression unit test.
Completed the incomplete P1 (absoluteFileUriPath() was written but never
wired into assertStoreExists, so behavior was unchanged on main):
- Wired absoluteFileUriPath() into assertStoreExists so a missing
*absolute* file: URI now fails loudly instead of opening silently empty
— the exact bug class #1204 exists to fix. Relative file: URIs are
deliberately left alone (tracked separately as #1209). Added tests for
both.
Remaining live review threads, fixed with tests where testable:
- registry.ts resolveStorePaths: POSIX path.isAbsolute() doesn't
recognize C:\..., so a shared/migrated Windows config path got mangled
by path.resolve. Fixed with path.isAbsolute() || path.win32.isAbsolute().
By-inspection only — no Windows CI.
- warehouse-add.ts: tool description said a relative path resolves
"against the directory of the config that declares it"; Registry.add()
actually resolves against projectRoot() at add-time regardless of where
it's persisted (the global config). Description corrected to match.
- sql-execute.ts: SQL fingerprint telemetry was emitted only on the
success path, so failed executions (including the new error-surfacing
branch) never got fingerprinted — biasing telemetry away from failures.
Extracted a shared emitSqlFingerprint() helper and call it from all
three outcomes (success, result-shaped error, thrown exception).
- docs/configure/warehouses.md: still said path was optional/omittable
for DuckDB and SQLite in-memory; requireStorePath() now rejects that.
Corrected in both the DuckDB and SQLite sections.
- file-store.ts assertStoreExists: fs.existsSync is also true for a
directory at that path, which would have let a misconfigured directory
path through to a confusing driver-level error instead of this guard's
clear one. Added an existsAsFile check.
Out of scope: the registry cross-tenant-scoping P1 (registry.ts:80/:175,
the process-global loaded state) is tracked separately as #1237 and needs
its own design PR — not attempted here.
Gates: bun test packages/drivers/ packages/opencode/test/altimate/ green
(5007+317 pass, 0 fail), bun turbo typecheck 13/13, marker check
--base origin/main --strict clean (no upstream-shared files touched),
prettier clean on all newly-written content.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VqnuBDGkh1ZT65Ti7e6DHZ
Copy file name to clipboardExpand all lines: docs/docs/configure/warehouses.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -261,7 +261,7 @@ If you're already authenticated via `gcloud`, omit `credentials_path`:
261
261
262
262
| Field | Required | Description |
263
263
|-------|----------|-------------|
264
-
|`path`|No| Database file path. Omit or use `":memory:"` for in-memory |
264
+
|`path`|Yes| Database file path, or `":memory:"` for in-memory. Cannot be omitted — a missing `path` is rejected rather than silently falling back to `":memory:"`|
265
265
|`create`| No | Create the database file if it is missing (default: `false`) |
266
266
267
267
!!! warning "The store must already exist"
@@ -461,7 +461,7 @@ If you're already authenticated via `gcloud`, omit `credentials_path`:
461
461
462
462
| Field | Required | Description |
463
463
|-------|----------|-------------|
464
-
|`path`|No| Database file path. Omit or use `":memory:"` for in-memory |
464
+
|`path`|Yes| Database file path, or `":memory:"` for in-memory. Cannot be omitted — a missing `path` is rejected rather than silently falling back to `":memory:"`|
465
465
|`readonly`| No | Open in read-only mode (default: `false`) |
466
466
|`create`| No | Create the database file if it is missing (default: `false`) |
File-backed stores (duckdb, sqlite): the store must already exist — connecting never creates it, because an empty database answers every query with no rows. Pass "create": true only when the store is meant to be created. A relative "path" is resolved against the directory of the config that declares it (the global config resolves against ~/.altimate-code), never against the current working directory; prefer an absolute path.
38
+
File-backed stores (duckdb, sqlite): the store must already exist — connecting never creates it, because an empty database answers every query with no rows. Pass "create": true only when the store is meant to be created. A relative "path" is resolved once, at add-time, against the project root (not the current working directory) and persisted absolute — even though this tool always writes to the global config file, "add" resolves against the project you're in right now, not against ~/.altimate-code; prefer an absolute path to avoid relying on that.
0 commit comments