Goal
Use property-based tests where they prove invariants that example tests miss, without adding test theater.
Dependencies
Acceptance criteria
Add fast-check or an equivalent Bun-compatible property-test library using the project’s existing dependency style.
All property tests run under bun test.
Conversation import normalization properties cover:
required fields are preserved/derived correctly.
invalid and empty inputs are rejected deterministically.
the same input produces deterministic normalized output.
SQLite chunking properties cover:
order preservation.
exactly-once processing.
boundary sizes 0, 1, 499, 500, 501, 999, 1000, 1001, and larger N.
Export properties, once Add mem export with JSON, Markdown, SQL dump, and SQLite backup formats #43 exists, cover:
JSON structural stability for generated records.
Markdown structural stability for generated records.
provenance presence for provenance-bearing exported tables.
manifest counts match exported records.
Dedup properties, once Add non-destructive dedup with provenance-aware survivor selection #45 exists, cover:
idempotence.
survivor priority by provenance.
non-duplicate preservation.
duplicate lineage remains auditable after repeated runs.
Properties should test invariants, not current default strings or formatting details.
Keep generated test sizes bounded so the suite remains practical under normal bun test runs.
Goal
Use property-based tests where they prove invariants that example tests miss, without adding test theater.
Dependencies
Acceptance criteria
fast-checkor an equivalent Bun-compatible property-test library using the project’s existing dependency style.bun test.bun testruns.