Files
alkstore/tasks/review-wave-3.md
T

2.9 KiB

id, name, status, depends_on, scope, risk, impact, level, tags
id name status depends_on scope risk impact level tags
review-wave-3 Review gate — wave 3 (SQLite engine) pending
sqlite-engine-integration
moderate low phase review
wave-3
review

Description

Review the SQLite engine before wave 4 (or 5) decomposes. Primary lens per the plan's review gates: engine-vs-contract conformance — the engine crate now carries the first real consumer surface, so this is the gate that checks the code against the pinned contract text line by line (the wave-1 gate's discipline, now against an implementation that must honor the surface, not just declare it).

Check:

  • Contract conformance: every trait method's behavior against core-contract.md's per-mechanism text — validation at entry points (auto-commit AND tx paths), error arms (Database-only receivers, Codec at payload seams, LeadershipLost vs clean stop), value shapes (Job/StreamEvent field-for-field), the no-work-is-a-value vocabulary (None/false/empty-Vec where pinned, never errors).
  • ADR-023 follow-through: the extent guards actually sit at the trait-impl entry (not substrate-side patches); duration guards on both lock call sites; plain-path open holds; poll_interval wired; encode_payload consumed fallibly at every call site.
  • Seam integrity: drop = rollback under panic; writer-slot lease released on every path (commit, rollback, drop, error); spawn_blocking used consistently (no blocking call inside async context, no connection moved across await).
  • Substrate boundary: still contract-blind (no alkstore:: under src/substrate/); the lint removal didn't leave dead ported code behind; any new divergence registered in PROVENANCE.md.
  • Backoff curve: the engine-side formula matches ADR-010 §3's pinned range and cap exactly (wave 4 re-derives it; wave 5 pins equivalence — this gate checks the one implementation against the text).
  • Backlog column: the engine's suite rows present, stamped, green.
  • Family standards: no panics, no unwrap/expect outside tests, no inline comments (doc comments fine), module-per-file.
  • Gates: full workspace build/test/clippy/fmt.

Acceptance Criteria

  • Contract conformance spot-checked against the spec text (not just the tests)
  • ADR-023's five backlog rows verified implemented as decided
  • Seam/lease/rollback paths verified (code-read, not test-name-trust)
  • Substrate boundary + provenance register still clean
  • All gates green
  • Findings recorded; wave 4/5 decomposition may proceed

References

  • docs/plans/implementation.md (Review gates)
  • docs/architecture/core-contract.md
  • docs/architecture/engine-sqlite.md
  • docs/architecture/decisions/023-fourth-review-round.md
  • docs/reviews/2026-10-08-waves-1-2-general-review.md (the posture this gate inherits)

Notes

To be filled by implementation agent

Summary

To be filled on completion