SQLite engine integration: lint removal, contract-suite adoption, backlog column (task sqlite-engine-integration)

- Remove the wave-2 lint suppressions from substrate/mod.rs; the
  six genuinely dead surfaces the removal exposed are cut, not
  suppressed, and registered D-32..D-36 in PROVENANCE.md
  (arg_opt_i64, ops::now_unix, queue_next_claim_at,
  Writer::try_acquire, UpdateWatcher::spawn,
  SharedUpdateWatcher::new); test-observation items
  (subscriber_count, the poll-interval default re-export) are
  honestly #[cfg(test)]-gated
- Contract suite: eight new version-stamped backlog rows
  (extent-clamp + boundary totality, duration-refusal,
  encode_payload round-trip, PayloadTooLarge-never-produced SQLite
  arm, drop=rollback no-ghosts, in-tx read-your-own-writes,
  enqueue-opts resolution, receiver close/save arms)
- Fix the exemplar row's real-engine sequencing defect: the held tx
  handle across the with_tx leg deadlocked any single-writer factory
  (mock-invisible; ADR-007's parking is the pinned behavior)
- SQLite factory: SqliteFactory in the new tests/contract_suite.rs
  target; all nine rows green against it; the factory contract
  (isolation + idempotent teardown) pinned
- Engine lib docs: the single-host and writer-parking posture
  statements surfaced under # Posture
- Gates: build/test/clippy -D warnings/fmt green; coverage 93.6%
  lines, misses confined to error arms
This commit is contained in:
glm-5.3-flash committed 2026-10-08 16:15:43 +00:00
1 parent 8502a51af7
commit a82c543b40
12 files changed
+1067 -245

No files matched your search

+2 -19
View File
@@ -9,7 +9,6 @@
use parking_lot::{Condvar, Mutex};
use rusqlite::functions::FunctionFlags;
use rusqlite::{Connection, OpenFlags};
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};
#[derive(thiserror::Error, Debug)]
@@ -373,13 +372,6 @@ impl Writer {
}
}
pub(crate) fn try_acquire(&self) -> Option<Connection> {
if self.closed.load(Ordering::Acquire) {
return None;
}
self.slot.lock().take()
}
pub(crate) fn release(&self, conn: Connection) {
if self.closed.load(Ordering::Acquire) {
return;
@@ -478,6 +470,7 @@ fn closed_err() -> Error {
#[cfg(test)]
mod writer_reader_tests {
use super::*;
use std::sync::Arc;
fn mem() -> Connection {
Connection::open_in_memory().unwrap()
@@ -495,21 +488,11 @@ mod writer_reader_tests {
p
}
#[test]
fn writer_try_acquire_returns_none_when_held() {
let w = Writer::new(mem());
let conn = w.acquire().unwrap();
assert!(w.try_acquire().is_none());
w.release(conn);
assert!(w.try_acquire().is_some());
}
#[test]
fn writer_close_drops_idle_connection() {
let w = Writer::new(mem());
w.close();
assert!(w.acquire().is_none());
assert!(w.try_acquire().is_none());
}
#[test]
@@ -518,7 +501,7 @@ mod writer_reader_tests {
let conn = w.acquire().unwrap();
w.close();
w.release(conn);
assert!(w.try_acquire().is_none());
assert!(w.acquire().is_none());
}
#[test]