- The column (tests/conformance/postgres_column.rs, feature `postgres`, default-off): the factories are the alkstore pg-factory pattern reused — `dual-tier postgres+local` (kv = postgres + large = local at the column-declared threshold 1024, window delay `Duration::ZERO`) and `kv-only(postgres)` at 1024 (the rejection row's host); a fresh engine-owned schema per `open()` (unique per call, seeded per tag/pid/time — racing opens included), registry-tracked per instance, teardown `DROP SCHEMA IF EXISTS … CASCADE` over exactly the minted schemas + the vended temp roots (idempotent, owned, panicking-row-safe) - The SKIP posture: connection settings ride the environment (ALKBLOBS_PG_HOST/PORT/USER/PASSWORD/DB), every runner gates behind a reachability probe, server-less runs skip cleanly (a skip is not a failure); the acceptance run is green against the harness server (dockerized `pglo-poc`, :15432 — the alkstore harness's same server) - Rows: the form-independent reference rows mirror verbatim (INV-1, INV-6, the NoLivenessSources/ProtectFailed abort shapes, the kv-only rejection row); the sqlite column's durable-schedule sweep family mirrors (schedule-relative INV-2/INV-3 readings, the two-sweep exact counts over the full protection set, the race across the window delay, the holder-stages-only lease shape, INV-5 list correctness); the dispatch rows adapt the placement oracle by medium (independent- connection counts of the schema's rows vs the root's committed files) plus the virgin-store row; every row ADR-stamped, traced to the backlog - Structural factory tests: fresh isolated opens (two opens mint distinct schemas and share nothing) and teardown against a panicking row (schemas really dropped, pg_namespace-verified) - README amended: the postgres rows table in §Columns beyond the reference set; the column plan's SKIP-posture note names the landed column; current state (four columns, waves 2–4) Verification: cargo test (default) 69/19/3 ok — the column compiles out; cargo test --features postgres 102/36/3 ok against the harness server (and green skipping server-less); cargo clippy --all-targets -- -D warnings green (default, postgres, all-features); cargo fmt --check green; pg_namespace verified schema-clean after live runs.
67 lines
2.8 KiB
Rust
67 lines
2.8 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.
|
|
//!
|
|
//! The reference rows landed with wave 2's mem column: [`rows`] holds
|
|
//! the reference row set (INV-1…6 plus the two constructor-mode rows,
|
|
//! ADR-stamped, traced to [`backlog`]); the columns' records live in
|
|
//! their module docs ([`README`](./README.md) §The reference row set
|
|
//! is the recorded inventory other columns mirror).
|
|
//!
|
|
//! The columns: [`mem_column`] — the contract-reference column;
|
|
//! [`local_column`] — the suite's first dual-tier column (the
|
|
//! `kv = mem` + `large = local` dispatch-coverage shape ADR-012 §6.3
|
|
//! names), which mirrors the reference set and grows the
|
|
//! dispatch-coverage and local-specific rows; [`sqlite_column`] — the
|
|
//! suite's first SQL-backed column (the default-build production
|
|
//! shape, `kv = sqlite` + `large = local`), which mirrors the
|
|
//! form-independent reference rows and grows the durable-schedule
|
|
//! sweep rows (README §The schedule-relative reading for SQL-backed
|
|
//! columns); [`postgres_column`] — the suite's first SKIP-posture
|
|
//! column (the fleet-capable-kv shape, `kv = postgres` + `large =
|
|
//! `local`, feature `postgres` default-off), which mirrors the same
|
|
//! sets against the harness server and skips cleanly server-less.
|
|
//!
|
|
//! Items beyond the tests below are the later columns' surface, hence
|
|
//! the scoped `#![allow(dead_code)]` — it shrinks as columns land.
|
|
|
|
#![allow(dead_code)]
|
|
|
|
mod backlog;
|
|
#[cfg(feature = "mem")]
|
|
mod binding;
|
|
mod factory;
|
|
#[cfg(feature = "mem")]
|
|
mod local_column;
|
|
#[cfg(feature = "mem")]
|
|
mod mem_column;
|
|
#[cfg(feature = "postgres")]
|
|
mod postgres_column;
|
|
mod rows;
|
|
#[cfg(feature = "sqlite")]
|
|
mod sqlite_column;
|
|
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();
|
|
}
|