mem engine integration — the suite's third column lands, born pinned: StoreFactory implemented for the mem engine (alkstore-mem/tests/contract_suite.rs — a fresh MemStore::new() per open, teardown = drop, unit-struct factory with no external backing) and all 25 rows wired under the current-thread flavor (every test explicitly flavor = "current_thread" — the no-spawn_blocking posture proven by the flavor the column runs under, grep re-verified clean): the 24 engine-shared mechanism rows + mem's new PayloadTooLarge non-occurrence arm row (payload_too_large_never_produced_on_mem — properties.rs, stamped ADR-016 §5 + ADR-024 §3, just-past-2-MiB payload, exported from the suite lib; the SQLite/pg rows untouched — a suite-side class-4 addition, recorded in the task Notes). Column green first run (13 s), zero red rows — no mem defects, no row wobbles, no class-1 escalation owed. Full-surface wiring + crate posture/wasm-identity docs verified as landed by the seam/foundations tasks — zero production code changed. engine-mem.md frontmatter: draft → implementation-complete (stable flip stays with the review gate). Task file: status completed, 6 acceptance boxes ticked, Notes (incl. the wasm on-target scope-out's named collapse condition: a wasm-bindgen-test adapter crate, deliberately not an OQ) + Summary filled. Verified: cargo build; workspace cargo test green (core 25, suite harness 3, mem 100 lib + 25 suite, sqlite 191 + 25, pg 124 + 25 + 9); clippy --all-targets -D warnings clean; cargo fmt --check clean; cargo check --target wasm32-unknown-unknown -p alkstore-mem clean

This commit is contained in:
glm-5.3-flash committed 2026-10-10 12:40:26 +00:00
1 parent 47ac6f7739
commit 76c06e42a9
7 files changed
+354 -19

No files matched your search

+6 -6
View File
@@ -42,10 +42,10 @@ pub use properties::{
duration_refusal_on_non_positive_ttl, enqueue_opts_resolution, extent_clamp_semantics,
in_tx_reads_see_own_writes, job_handle_validity_predicate, lock_ttl_expiry_and_reacquisition,
name_validation_rejects_empty_and_reserved, outbox_enqueue_tx_commit_atomicity,
payload_round_trip_stores_exact_encoding, payload_too_large_never_produced_on_sqlite,
payload_too_large_produced_on_pg, publish_with_key_tx_commit_atomicity,
queue_depth_reclaim_and_dead_letter, receiver_close_and_save_arms, scheduler_boundary_fires,
scheduler_bounded_catchup, scheduler_leadership_discipline, stream_ordering_equivalence,
sweep_no_stranded_rows, trim_to_semantics, wake_receiver_shapes,
with_tx_panicking_closure_rolls_back,
payload_round_trip_stores_exact_encoding, payload_too_large_never_produced_on_mem,
payload_too_large_never_produced_on_sqlite, payload_too_large_produced_on_pg,
publish_with_key_tx_commit_atomicity, queue_depth_reclaim_and_dead_letter,
receiver_close_and_save_arms, scheduler_boundary_fires, scheduler_bounded_catchup,
scheduler_leadership_discipline, stream_ordering_equivalence, sweep_no_stranded_rows,
trim_to_semantics, wake_receiver_shapes, with_tx_panicking_closure_rolls_back,
};
+26
View File
@@ -772,6 +772,32 @@ pub async fn payload_too_large_never_produced_on_sqlite(factory: &dyn StoreFacto
factory.teardown().await.expect("factory teardown");
}
/// **`PayloadTooLarge` occurrence asymmetry — the mem arm** — the mem
/// engine never produces the variant at any payload size (no
/// notification limit; the wake delivers the channel alone — the
/// notify transport stores nothing), the same non-occurrence posture
/// as SQLite's arm, born pinned as mem's column of the row
/// ([ADR-024](../../docs/architecture/decisions/024-mem-engine.md)
/// §3's classification pins mem wiring this arm). The row drives an
/// oversized payload — just past the 2 MiB mark the tx seam's mem
/// unit pins — through the store's notify path and asserts success.
///
/// Contract stamp: ADR-016 §5 (the occurrence asymmetry — the
/// non-occurrence arm wiring on mem); ADR-024 §3 (mem's posture in
/// the classification); ADR-008 §5 (universal variant, no
/// engine-specific growth).
pub async fn payload_too_large_never_produced_on_mem(factory: &dyn StoreFactory) {
let store = factory.open().await.expect("factory opens a store");
let big = "x".repeat(2 * 1024 * 1024 + 1);
store
.notify("big", json!({"blob": big}))
.await
.expect("mem notify has no payload limit at any size");
factory.teardown().await.expect("factory teardown");
}
/// **Drop = rollback, no-ghosts** — a transaction handle dropped
/// before commit rolls its writes back through RAII: job rows, stream
/// events, notifies, and offset saves all leave no residue the