Skip to content

Require 0xCarbon/go-sqlite3 directly (latest master, SQLCipher 4.17); drop the replace - #2

Merged
canesin merged 3 commits into
mainfrom
deps/direct-0xcarbon-sqlite3
Aug 17, 2026
Merged

canesin merged 3 commits into
mainfrom
deps/direct-0xcarbon-sqlite3

Conversation

@canesin

@canesin canesin commented Aug 17, 2026

Copy link
Copy Markdown

Consumes the SQLCipher driver fork by its own module path (github.com/0xCarbon/go-sqlite3, re-pathed in 0xCarbon/go-sqlite3#4) instead of mattn/go-sqlite3 behind a replace.

  • 33 files: imports switched; go.mod replace + mattn require dropped; direct require at fork master d1c4d3294fa8 (SQLCipher 4.17.0 / SQLite 3.53.3, upstream v1.14.49-era sync, _key DSN param, hardened keyed-open paths)
  • Docs updated (AGENTS.md Fork Deltas, PATTERNS, SQLITE_INTERNALS, VFS example)
  • Consumers need no replace anymore; mattn users must migrate in lockstep (both paths in one binary register sqlite3 twice → init panic). Only the 0xCarbon module is linked into binaries (psanford/sqlite3vfs's mattn requirement is test-only).

Gates (all exit 0): go build, go test, -race, -tags vfs, staticcheck, vet, docker default+hardened, make vfs-linux-amd64 + sqlite3 load oracle; encryption round-trips (raw-byte keys, string forms, concurrent differently-keyed DBs under -race) pass against SQLCipher 4.17.

…er 4.17); drop the replace

Import github.com/0xCarbon/go-sqlite3 by its own module path — the fork
re-pathed its module (0xCarbon/go-sqlite3#4) — instead of requiring
mattn/go-sqlite3 behind a replace directive. Consumers no longer need a
mattn replace to consume litestream; they must use the 0xCarbon path
for their own sqlite imports too (mixing both paths registers the
"sqlite3" driver twice and panics at init).

Bumps the driver to fork master d1c4d32: SQLCipher amalgamation 4.17.0
(SQLite 3.53.3), upstream v1.14.49-era merge, _key DSN parameter,
hardened keyed-open failure paths, key-handling docs.
@github-actions

github-actions Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

PR Build Metrics

✅ All clear — no issues detected

Check Status Summary
Binary size ✅ 35.22 MB (+36.3 KB / +0.10%)
Dependencies ℹ️ 1 added, 1 removed
Vulnerabilities ✅ None detected
Go toolchain ✅ 1.25.13 (latest)
Module graph ✅ 1184 edges (+1)

Binary Size

Size Change
Base (628d9dc) 35.18 MB
PR (488c129) 35.22 MB +36.3 KB (+0.10%)

Dependency Changes

Added:

  • github.com/0xCarbon/go-sqlite3 v1.14.38-0.20260817152354-d1c4d3294fa8

Removed:

  • github.com/mattn/go-sqlite3 v1.14.24

govulncheck Output

=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 1 vulnerability in packages you import and 3
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.

Build Info

Metric Value
Build time 2s
Go version go1.25.13
Commit 488c129

History (2 previous)

Commit Updated Status Summary
ea25ed0 2026-08-17 16:19 UTC ✅ 35.22 MB (+36.3 KB / +0.10%)
2a5560e 2026-08-17 16:13 UTC ✅ 35.22 MB (+36.3 KB / +0.10%)

🤖 Updated on each push.

…gth contract; pin 4.14-ciphertext compatibility

- Replace the remaining mattn/go-sqlite3 prose references (AGENTS.md
  intro and driver bullet, skills, code comments, goreleaser note) with
  the 0xCarbon module path; AGENTS.md previously contradicted its own
  new Driver dependency bullet.
- Document that DB.EncryptionKeyBytes must be exactly 32/48/80 bytes
  (the fork rejects other lengths at the first connection instead of
  silently KDF-falling-back) and cover it with a fail-fast test.
- Add testdata/sqlcipher-v4.14.0/fixture.db (8KB, written by the
  previous driver pin c8f057756220) with a decrypt-through-current-pin
  test, pinning kdf/HMAC default compatibility across amalgamation
  bumps.
…le registerSQLiteDriver reference

The EncryptionKeyBytes field comment now states the fork's 32/48/80-byte
raw-key contract (an earlier edit attempt missed the field's actual
text). The Fork Deltas driver bullet still described the removed
sql.Register registry; point at the OpenDB connector helpers instead.
@canesin
canesin merged commit c47975a into main Aug 17, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant