OpenClaw / wacli
Merged upstreamCorrectnessMerged Jul 16, 2026

Open SQLite stores on Windows

Fixed wacli authentication startup on Windows by normalizing absolute drive-letter paths into valid SQLite file URIs.

openclaw/wacli · #304

Problem

On Windows, wacli auth could serialize C:\Users\... as file://C:%5CUsers..., causing SQLite to treat C: as a URI authority and reject the database before QR pairing with invalid uri authority.

Approach

Centralized SQLite file URI construction in sqliteutil.FileURI, normalized Windows drive-letter paths, preserved UNC share paths, and routed writable, read-only session, and auth-status database openers through the same helper.

Impact and scope

  • Unblocks first-time Windows users who could not start wacli auth because SQLite rejected the local store URI.
  • Keeps writable and read-only SQLite open paths consistent through one shared URI builder.
  • Preserves Unix path escaping and existing query behavior while adding Windows drive and UNC handling.

Validation

  • Added regressions for drive-letter paths, UNC shares, and both read-only SQLite call paths.
  • PR validation covered focused Go tests, sqlite_fts5 tests, pnpm test, lint, build, formatting, and diff checks.
  • Cross-compiled the sqliteutil test binary for Windows amd64 to guard the changed helper surface.