Files
alkblobs/tests/conformance/main.rs
T
glm-5.3-flash 532adfa707 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.
2026-10-11 22:18:32 +00:00

39 lines
1.5 KiB
Rust

//! `main.rs` — the conformance test target's root.
//!
//! The suite is in-crate by decided point (docs/plans/implementation.md):
//! engines are features of one crate, so the harness is factory-
//! parameterized over engine constructors rather than a sibling suite
//! crate. This target carries the skeleton (factory trait shape, the
//! stamp convention, the invariant backlog registry — see
//! [`README`](./README.md)) plus the **wave-2 factory binding**: the
//! `Store` facade type landed as the concrete `alkblobs::Store`
//! (engine-blind; src/store.rs holds the engine-representation design
//! point), and the skeleton's `Store` associated type collapsed into
//! it — `open` vends the concrete facade type directly, recorded in
//! `factory.rs` and the README. The wave-1 mock probe retired with it;
//! the binding demonstrator ([`binding`], mem-gated — mem is the
//! skip-free reference shape) proves the contract implementable
//! against the real type. Rows arrive with wave 2's columns (mem
//! first, the contract-reference engine).
//!
//! Items beyond the tests below are the wave-2 drivers' surface, hence
//! the scoped `#![allow(dead_code)]` — it shrinks as rows land.
#![allow(dead_code)]
mod backlog;
#[cfg(feature = "mem")]
mod binding;
mod factory;
mod stamp;
#[test]
fn stamp_marker_matches_convention() {
assert_eq!(stamp::STAMP_MARKER, "Contract stamp:");
}
#[test]
fn backlog_registers_the_seven_invariants() {
backlog::assert_traceable();
}