//! `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 currently carries the **skeleton only** — the //! factory trait shape, the stamp convention, and the invariant backlog //! registry (see [`README`](./README.md) for the conventions' normative //! statement). Rows arrive with wave 2's first column (mem, the //! contract-reference engine); if binding the `Store` facade type //! reveals a shape correction, that is wave 2's to make and record. //! //! 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; mod factory; mod stamp; use factory::StoreFactory; /// The harness probe factory: not an engine — a minimal mock proving /// the [`StoreFactory`] contract is implementable with async methods /// and reports the identity `name()` carries (the alkstore harness's /// "exemplar against a trivial in-crate mock" posture, sized down to /// the skeleton's no-rows state). struct Probe { label: &'static str, } impl StoreFactory for Probe { type Store = (); fn name(&self) -> &'static str { self.label } async fn open(&self) -> Result { Ok(()) } async fn teardown(&self) -> Result<(), alkblobs::Error> { Ok(()) } } #[test] fn probe_factory_implements_the_contract() { let factory = Probe { label: "probe" }; assert_eq!(factory.name(), "probe", "factory identity is reportable"); } #[tokio::test] async fn probe_factory_open_teardown_lifecycle() { let factory = Probe { label: "probe" }; factory.open().await.expect("open vends the instance"); factory.teardown().await.expect("teardown is idempotent"); factory.teardown().await.expect("teardown repeats cleanly"); } #[test] fn stamp_marker_matches_convention() { assert_eq!(stamp::STAMP_MARKER, "Contract stamp:"); } #[test] fn backlog_registers_the_seven_invariants() { backlog::assert_traceable(); }