Current section

Files

Jump to
quackdb docs protocol fixture-backlog.md
Raw

docs/protocol/fixture-backlog.md

# Protocol fixture backlog
QuackDB keeps byte-for-byte quack-ts fixtures for representative scalar and nested append/data-chunk encoding. Most high-value scalar and nested decode fixtures are now covered; this backlog tracks remaining protocol fixture work before claiming broader conformance.
## Covered fixture areas
- Scalar and nested `DataChunk` encoding fixtures generated by quack-ts.
- Scalar and nested `AppendRequest` encoding fixtures generated by quack-ts.
- Decode fixtures for `BIGNUM`, including zero, large positive, and large negative values.
- Decode fixtures for `INTERVAL`, `TIME_NS`, `TIMESTAMP_NS`, and `TIME WITH TIME ZONE`.
- Decode fixture for DuckDB Spatial `GEOMETRY` bytes compared with WKB-compatible values.
- Null-heavy nested fixtures for lists, structs, and maps.
- QuackDB-owned malformed `BIGNUM` fixture with a truncated magnitude payload.
## High-priority remaining fixtures
- Malformed vector bodies for unsupported compressed vector encodings.
- Malformed logical type metadata fixtures for unsupported or partial type families.
- `UNION` and `VARIANT` logical type fixtures if DuckDB Quack exposes stable payloads that can be captured or generated independently.
- Extension/custom type metadata fixtures once DuckDB exposes stable payloads.
- FSST vector fixtures once DuckDB Quack serializes compressed FSST vectors instead of flattening them.
## Decode-side expectations
Every fixture should have two checks when possible:
1. QuackDB encoding matches the independent fixture byte-for-byte.
2. QuackDB decodes the independent fixture and either re-encodes byte-for-byte or asserts the decoded semantic values when an equivalent Elixir input shape cannot currently re-encode identically.
Nested `MAP` decode currently materializes map entries as Elixir maps, while append encoding accepts map entries as list-like key/value structures. Until those shapes are normalized, semantic decode assertions are more robust than byte-for-byte re-encode assertions for nested map fixtures.
Malformed fixtures should assert a structured `QuackDB.Error` with a protocol-specific code. Avoid adding arbitrary random corrupt bytes; each malformed fixture should document the exact invariant it violates.