Brief for Cedric: Quack round 3 (FLT-281). Andrew chose to keep Quack and patch the provider¶
You are Cedric Jones-Gaffney (Codex), the implementer. Clahadore orchestrates. Work in this worktree (branch quack-tls, HEAD 01a8217, v0.1.2). Edit files only, because Clahadore commits.
Evidence: end-to-end against a REAL DuckDB 2.0.0 server over Quack¶
Run on 2026-10-31. The harness lives at C:\Users\fives\AppData\Local\Temp\claude\C--Users-fives-source-repos-Verse4Verse\2fb3dcfb-23e1-4a3e-b000-ac8110b71479\scratchpad\quack-e2e. It uses our own Windows libduckdb 2.0.0 build, SHA-256 999fdc4da4a8983b4cd14cea8fde16f37636d64092dbc10c777b77c0257f69ef, at ...\scratchpad\quack-artifacts\win\duckdb.dll. Copy it over the 1.5.6 native in the output folder. The server is C:\Tools\duckdb\2.0.0\duckdb.exe, with a token taken at runtime from an env var.
PASS version() through UseQuack :: v2.0.0
PASS Insert 3 rows (SaveChanges)
PASS Roundtrip hostile/$/unicode + all types
PASS Where with string/int/decimal/datetime/guid params
FAIL Update :: DbUpdateConcurrencyException: Expected to update 1 row, but DuckDB updated 0 rows.
FAIL Contains(list of ids) :: InvalidOperationException: Expression '@ids' in the SQL tree does not have a type mapping assigned.
PASS Delete
PASS Transaction rollback / commit
- The UPDATE is applied on the server, but over Quack the affected-row count comes back as 0. A raw
ExecuteSqlRawUPDATE reported rows=0, and a raw DELETE also reported 0. Containsfails the same way on a local in-memory DuckDB, so it is a general provider bug.
Tasks¶
- Affected-row counts in Quack mode. DuckDB returns a DML result as a one-row result set with a
Countcolumn. Verify this over Quack with the CLI client, for examplequack_queryor an ATTACHed catalog. Then: - In Quack mode, run DML so that the count is read from that result, and surface it as
ExecuteNonQuery's return value. It must also come through the data reader'sRecordsAffected, because EF's modification batches read through the reader. YourQuackDataReaderis the natural place for this. - If
Countis not available over Quack, useRETURNING-based counting instead. Note the earlier local finding:UPDATE ... RETURNINGon a parent row that a foreign key references fails in DuckDB. Test that case, and pick the approach that is correct for both. - EF optimistic concurrency must work: a stale update must still raise
DbUpdateConcurrencyException. - Fix
Containson aList<Guid>/List<int>(a parameter collection) locally and over Quack. This is likely missing primitive-collection parameter translation or type mapping. Compare how the Npgsql and Sqlite providers handle@ids. Inlining a list literal such as[...]orIN (...)is fine in Quack mode, if it is correct. - Review findings (Susie, security seat):
- High.
QuackErrors.Run/RunAsyncconverts every driver failure intoInvalidOperationException. That breaks EF's DbException-based handling, and the sync path drops cancellation. Throw aDbExceptionsubclass with a redacted message instead, and keep its ErrorCode/SqlState where available. LetOperationCanceledExceptionandTaskCanceledExceptionpass through untouched, and honor theCancellationTokenon the sync path. - Medium.
QuackDataReader.GetStream()/GetTextReader()buffer the whole value. Delegate to the inner reader's streams where possible. - Low. Call
base.Dispose(disposing)in the dispose pattern. - Tests and evidence.
- Add unit tests for each item.
- Rerun the e2e harness above. Fix or extend it so that it also tests a stale-update concurrency conflict and an UPDATE of a referenced parent row. Every step must pass.
- Paste the real program output into
QUACK-ROUND3-RESULT.md. - Build and package. Run
dotnet build -c Release -m:1anddotnet test -c Release -m:1serially, because the PC is under memory pressure. Bump the version to 0.1.3, then rundotnet pack -c Release.
Put the files changed, the tests before and after, the full e2e output and the nupkg path in QUACK-ROUND3-RESULT.md, and list anything you could not do.