--- id: suite-column-mem name: Conformance suite — factory binding and the mem column (the reference column) status: pending depends_on: [store-read-paths, store-put-paths, gc-protocol] scope: moderate risk: medium impact: phase level: implementation tags: [wave-2, suite, mem] --- ## Description Bind the conformance harness to the real facade and grow the **mem column** — the contract-reference column that defines the required set every other engine's rows mirror (store-api.md invariant 7; ADR-011 §2). - **The factory binding** (the skeleton's anticipated wave-2 moment): bind `StoreFactory::Store` to the real facade type — most plausibly the associated type collapsing to the concrete `Store` across all factories. If binding reveals a shape correction, make it and record it in `tests/conformance/factory.rs` + `README.md` per the skeleton's note. The mem factory vends fresh, isolated in-memory stores (no shared state between rows) with idempotent teardown; mem never skips (README §SKIP posture — SKIP machinery stays unneeded until the SQL waves). - **The mem column's rows**, each ADR-stamped per the convention (`Contract stamp:` citing the pinning spec §/ADR §), tracing to the backlog entries: - **INV-1 round-trips**: whole-blob put/get byte-identical under the canonical derivation, over a content matrix looping both put paths (known-length, unknown-length) in-body; the git-interop test remains the derivation's source of truth. - **INV-2 dedup**: identical content twice (same and different put path) is one pool entry; the re-put's `Pin` protects exactly as a fresh put's. - **INV-3 stage hygiene**: exact counts over both put paths and both failure modes (explicit discard, failed commit) — zero residue on failure, exactly one committed entry on success (the degenerate kv stage form). - **INV-4 sweep safety**: single-node exact-count family — happy shape (exact `SweepReport` counts), abort shapes (`ProtectFailed`, `NoLivenessSources` — nothing deleted, `Ok(SweepReport)` always), and the sweep-vs-pinned-put race. - **INV-5 list correctness**: asserted through sweep outcomes (exact counts), never by comparing enumerated lists directly. - **INV-6 stat discipline**: `stat` returns length + algorithm without fetching content. - **Constructor-mode rows** (facade contract, ADR-011 §4 / ADR-012 §6.2/§6.3): mem-only mode; kv-only(mem) over-threshold put-time rejection (known-length immediate, unknown-length mid-stream). - Rows take factories, never stores (factory.rs contract); a failing assertion panics the row; teardown is idempotent against that path. ## Acceptance Criteria - [ ] `StoreFactory::Store` bound to the real facade; any shape correction recorded in factory.rs + README - [ ] The mem column green: INV-1/2/3/4/5/6 rows plus constructor-mode rows, every row ADR-stamped and traceable to the backlog - [ ] The mem column's row set is the reference set (INV-7's basis) — recorded in README as what other columns mirror - [ ] Factory isolation + idempotent teardown hold (fresh store per call; teardown safe against a panicking row) - [ ] `cargo test --features mem` green (the column runs under its feature); clippy/fmt gates green ## References - tests/conformance/README.md (the conventions this grows against) - tests/conformance/backlog.rs (INV-1…7 entries and their first-column plan) - docs/architecture/store-api.md (§Invariants — the test gate) - docs/architecture/decisions/011-vocabulary-tiers-engines-and-fleet-state.md §2 (mem's reference role) - docs/plans/implementation.md (Decided points — suite home; §Wave 2 — suite columns) ## Notes > To be filled by implementation agent ## Summary > To be filled on completion