Contract-suite lock rows (task suite-lock-rows): two version-stamped rows discharging the lock backlog rows — lock_ttl_expiry_and_reacquisition (the ADR-008 §7 guarantee row: a held lock excludes a second acquirer (contender None); after a 1 s TTL the exclusion lapses silently — no revocation event, no error — and a second owner acquires; the original holder's post-expiry renew is refused (false, the lost-it arm); the second owner's release frees the name for a third acquirer, which consumes cleanly; tolerance-sleep posture, state outcomes only; ADR-008 §7 + ADR-019 §1, duration-guard legs cross-referenced to duration_refusal_on_non_positive_ttl) and concurrent_try_lock_loser_is_a_value (the contention posture: four sequential contenders — two owners, repeated — against a held lock all land the clean None value, never Database, never a busy-throw; the backlog row's SQLite busy-path open question answered: no divergence from the pg reference; release-then-contend cycle proves the loser path leaves no state blocking a later acquire, granted to a former loser and consumed cleanly; ADR-008 §5 + §7 + ADR-019 §1) — wired into both engines' suite targets (SQLite tokio tests, pg harness_row!s), 23 rows per column up from 21. Dispositions in Notes: no divergence found (no fix/ADR call needed), ADR-023 §2 excluded from stamps (its guard property is the duration-refusal row's, cross-referenced), the backlog parenthetical re-acquire-does-not-refresh-TTL stays engine-pinned, renew-refusal asserted after the second owner's re-acquisition (strongest form), contenders distinct-owner only (same-owner re-acquire grants per the inherited substrate shape), and one unreproducible first-cold-run pg failure recorded (message lost to truncation; 13 subsequent clean runs incl. concurrent SQLite+pg — no timing hazard identified, the lapse assertions are post-sleep state outcomes). Drive-by: alkstore-contract-suite's tokio dep gained the macros feature — a pre-existing compile break in the crate's own tests/suite_harness.rs (since 7f749ac) failed the harness target and the workspace test gate on HEAD; test-side non-event (ADR-017 §2 class 4). Verified: cargo test -p alkstore-sqlite -p alkstore-postgres green (SQLite 121+23+9, pg 189+23 vs harness server on :15432, server-less pg skips clean), workspace cargo test green (12 binaries), clippy -D warnings, fmt clean
This commit is contained in:
1 parent
1d05df200e
commit
98de4a49cd
6 files changed
+285
-17
No files matched your search
@@ -67,9 +67,10 @@ impl StoreFactory for SqliteFactory {
|
||||
|
||||
mod rows {
|
||||
use alkstore_contract_suite::properties::{
|
||||
drop_rollback_leaves_no_ghosts, duration_refusal_on_non_positive_ttl,
|
||||
enqueue_opts_resolution, extent_clamp_semantics, in_tx_reads_see_own_writes,
|
||||
job_handle_validity_predicate, name_validation_rejects_empty_and_reserved,
|
||||
concurrent_try_lock_loser_is_a_value, drop_rollback_leaves_no_ghosts,
|
||||
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, publish_with_key_tx_commit_atomicity,
|
||||
queue_depth_reclaim_and_dead_letter, receiver_close_and_save_arms,
|
||||
@@ -99,6 +100,16 @@ mod rows {
|
||||
duration_refusal_on_non_positive_ttl(&factory("row-duration-refusal")).await;
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn row_lock_ttl_expiry_and_reacquisition() {
|
||||
lock_ttl_expiry_and_reacquisition(&factory("row-lock-ttl-expiry")).await;
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn row_concurrent_try_lock_loser_is_a_value() {
|
||||
concurrent_try_lock_loser_is_a_value(&factory("row-lock-loser-value")).await;
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn row_payload_round_trip_stores_exact_encoding() {
|
||||
payload_round_trip_stores_exact_encoding(&factory("row-payload-round-trip")).await;
|
||||
|
||||
Reference in new issue
Block a user