feat(store): the Store facade — constructor modes, size-threshold dispatch, the factory binding

The wave-2 facade skeleton and routing (tasks/store-construction.md):
the public surface consumers program against, with the ops methods
still to land against it in store-read-paths/gc-protocol/store-put-paths.

- src/store.rs — the public `Store` type (engine-blind, ADR-007/008/
  010) over crate-internal tier enums (`KvEngine`{mem}, `LargeEngine`{
  local}): the engine-representation design point decided as concrete
  + enum dispatch, generic rejected (pub(crate) engines, no dyn);
  the three constructor modes as named constructors — `mem_only`,
  `kv_only_mem`, `dual_tier_mem_local` (the ADR-012 §6.3
  dispatch-coverage shape) — with `StoreMode` introspection; the
  write-side routing seam (`tier_for`), the read-side fall-through
  order (`kv()` then `large()`, ADR-012 §6.1), and the `GcHome`
  GC-state field; the ADR-012 §3 fleet declaration ruled deferred to
  the engine waves (nothing fleet-valid is constructible yet)
- src/dispatch.rs — the pure routing function (`route`, at-or-below
  → kv), `DEFAULT_DISPATCH_THRESHOLD` (128 KiB) exported at the
  crate root, boundary-value unit tests (exactly-at-threshold,
  degenerate tunings, purity)
- src/gc.rs — `GcHome`: the store-instance GC-state home the
  gc-protocol task fills (in-process; fleet state stays on the
  engine-state seam per ADR-010 §2/ADR-012 §4)
- tests/conformance — the wave-2 binding made as anticipated: the
  factory's `Store` associated type collapsed into the concrete
  `alkblobs::Store` (`open` vends it directly), recorded in
  factory.rs + README; the wave-1 mock probe retired, replaced by
  mem-gated binding demo factories (binding.rs) over both
  constructible shapes

Verification: `cargo test` (default), `cargo test --features mem`,
`cargo test --all-features` green (41/53/53 unit + conformance
targets green in all three shapes); `cargo clippy --all-targets
-- -D warnings` green in all three feature shapes; `cargo fmt
--check` green; `cargo doc --no-deps` adds no warnings beyond the
pre-existing private-intra-doc-links class.
This commit is contained in:
glm-5.3-flash committed 2026-10-11 22:18:32 +00:00
1 parent 856d436f81
commit 532adfa707
9 files changed
+840 -84

No files matched your search

+16 -9
View File
@@ -95,11 +95,16 @@ row with its own owner stamp, still one per property.
the temp dir, dropping the schema, closing the pool — and owns the
isolated-ness guarantee above.
- Factories are `Send + Sync`: shareable across row runs.
- The wave-2 binding note: the trait's `Store` associated type is the
stub's placeholder for the `Store` facade type (wave 2). Wave 2's
first column binds it; if binding reveals a shape correction (e.g.
the associated type collapses to the concrete facade type), that is
wave 2's to make and record in this README and `factory.rs`.
- **The wave-2 binding — made and recorded.** The `Store` facade type
landed with wave 2's store-construction task as a concrete type
(`alkblobs::Store`, engine-blind; src/store.rs holds the engine-
representation design point). The binding made the anticipated
shape correction: the skeleton's `Store` associated type collapsed
into the concrete facade — `open()` vends `alkblobs::Store`
directly (factory.rs records the ruling; the wave-1 mock probe
retired with it, replaced by the mem-gated binding demo factories
in `main.rs`). A new engine column binds by implementing the trait;
there is no longer a vendible type to choose.
## The SKIP posture
@@ -146,7 +151,9 @@ and first run in wave 6.
## Current state
The harness skeleton is compile-able with **zero rows** (this task's
scoped deliverable): the trait shape, the stamp convention, and the
backlog registry are in place; the rows arrive with wave 2's mem
column.
The harness skeleton is compile-able with **zero rows**: the trait
shape, the stamp convention, and the backlog registry are in place;
the wave-2 factory binding is **made** — `open()` vends the concrete
`alkblobs::Store` facade (see §The factory contract), demonstrated by
the mem-gated binding demo factories. The rows arrive with wave 2's
mem column.