Files
alkstore/tasks/sqlite-engine-integration.md
T

4.0 KiB
Raw Blame History

id, name, status, depends_on, scope, risk, impact, level, tags
id name status depends_on scope risk impact level tags
sqlite-engine-integration SQLite engine — integration (lint removal, full-surface wiring, suite adoption) pending
sqlite-engine-notify-listen
sqlite-engine-streams
sqlite-engine-queues
sqlite-engine-locks
sqlite-engine-scheduler-outbox
moderate medium phase implementation
wave-3
sqlite-engine
integration

Description

Close the wave's integration gaps once every mechanism is wired:

  • Remove the two lint suppressions in alkstore-sqlite/src/substrate/mod.rs (#![allow(dead_code)], #![allow(unused_imports)]) — the waves-1–2 review's explicit wave-3 obligation. With the engine layer wired, every substrate surface should be reachable; genuinely dead ported code must be cut, not suppressed (and the cut registered in PROVENANCE.md if it diverges from the lineage's kept set — ADR-018's delta discipline). Fix whatever the lints surface; do not re-add allows.
  • Full-surface sweep: every Store/TxHandle/mechanism trait method implemented (no todo!/unimplemented! anywhere); the engine crate's lib re-exports its public surface (open, SqliteOpts, the concrete store type) per the module-per-file convention.
  • Contract-suite adoption (the plan's "waves 3 and 4 adopt the harness"): implement StoreFactory for the SQLite engine (fresh temp-file store per open, idempotent teardown) and wire the engine's backlog column — the rows this engine owns now, per ADR-023's verification-backlog additions and the engine-scoped backlog rows:
    • Extent-clamp semantics (claim_batch(n <= 0), stream reads limit <= 0) — stamped ADR-023 §2
    • Duration-refusal (try_lock/renew with ttl <= 0) — stamped ADR-023 §2
    • encode_payload typed-failure round-trip (enqueue/publish store
      • decode the exact serialization) — stamped ADR-023 §1
    • Plain-path open (?name=value suffix = literal filename) — stamped ADR-023 §3
    • Poll-cadence default + knob (config-surface accounting, not wall-clock) — stamped ADR-023 §4
    • The engine-scoped rows core-contract.md assigns this engine: PayloadTooLarge never produced (ADR-016 §5), drop = rollback no-ghosts (ADR-021 §4), in-tx read-your-own-writes (ADR-021 §1), enqueue-opts resolution (ADR-020 §1–§3), receiver close arms (ADR-021 §5) — each stamped per the suite's convention. Rows run against the SQLite factory now; wave 5 runs the same rows against pg (the factory-parameterized point).
  • Crate docs: the engine crate's lib-level doc comments state the single-host posture and the writer-parking honesty note (ADR-016, ADR-007's negative consequence) — the identity statements this crate owns.
  • Gates: full workspace build/test/clippy/fmt; coverage spot-check on the engine crate (no large uncovered regions outside error arms).

Acceptance Criteria

  • Both #![allow] lints removed from substrate/mod.rs; any code the removal surfaces is cut (and registered) or wired — clippy -D warnings green without them
  • No todo!/unimplemented! in the engine crate; full trait surface implemented
  • StoreFactory implemented for SQLite; the backlog-column rows listed above exist, version-stamped, and run green against the SQLite factory
  • Engine crate lib docs carry the single-host + writer-parking posture statements
  • Workspace gates green: cargo build, cargo test, clippy -D warnings, fmt clean

References

  • docs/reviews/2026-10-08-waves-1-2-general-review.md (§2 smells, §7)
  • docs/architecture/decisions/023-fourth-review-round.md (Verification backlog additions)
  • docs/architecture/core-contract.md (§Verification backlog)
  • docs/architecture/decisions/022-contract-suite-layout.md
  • docs/architecture/decisions/016-deployment-honesty.md
  • alkstore-contract-suite/src/factory.rs

Notes

To be filled by implementation agent

Summary

To be filled on completion