Six tasks against the wave-2 contract surface as reviewed (no amendments from the gate): - engine-sqlite: the default kv engine — WAL + synchronous=NORMAL, prepared statements, the indexed size column probe (B5's row shape), has-as-EXISTS, virgin-store no-tables-yet tolerance, spawn_blocking discipline - engine-sqlite-window: the engine-state seam's window family only (ADR-012 §5's reduction — gc_window, stage/take; no pin rows, no sweep-lock body) - store-sqlite-construction: KvEngine::Sqlite slots in, the dual-tier/kv-only constructors with the constructor-tunable window delay (default 5 min), ensure_gc_schema at construction, the one-window-host posture - store-sweep-durable-window: the sweep's SQL-backed form — overdue rows execute with re-arbitration before/alongside marking, candidates stage at mark_end + window, counts exact relative to the schedule (ADR-012 §6.7); the inline form preserved verbatim - suite-column-sqlite: the first SQL-backed column, server-less — form-independent reference rows mirror directly; the sweep rows are schedule-relative (the recorded INV-4/5 mirror amendment) - review-wave-3: the engine-wave gate (engine-vs-contract conformance) Verification: dependency graph validated (all ids resolve, no cycles, topological order clean); docs-only change. Refs: docs/plans/implementation.md §Wave 3
4.1 KiB
4.1 KiB
id, name, status, depends_on, scope, risk, impact, level, tags
| id | name | status | depends_on | scope | risk | impact | level | tags | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| review-wave-3 | Wave 3 review gate — the sqlite engine vs the contract | pending |
|
narrow | low | phase | review |
|
Description
The wave-3 review gate — the engine-wave review shape (docs/plans/implementation.md §Review gates: "engine-vs-contract conformance"), before wave 4 decomposes. The gate reads the implementation against the pinned ADR text line by line (the wave-1/2 gates' method).
Gate checks:
- Engine-vs-contract conformance: the suite column green
server-less; the engine-state window family contract-tested per its
applicability row (ADR-012 §5's table — window family yes, pin
clauses no, sweep-lock body no); virgin-store semantics including
the no-tables-yet form; the
sizemetadata-only discipline (the indexed column probe never loads the value blob). - The sqlite posture vs ADR-003/007: WAL +
synchronous=NORMALas the shipped durability tier; the single-writer ceiling documented as posture, not hedged (REQ-1's economics); prepared-statement discipline;hasas an EXISTS probe; the B5 row shape (key/value/ size); bounded reads. - The durable-window sweep vs ADR-008 §2 / ADR-012 §5/§6.7:
candidates staged at
visible_after = mark_end + window(the constructor-tunable delay, shipped default 5 min); the executor is the next sweep; execution-time re-arbitration; report counts exact relative to the schedule; the inline form preserved verbatim for non-SQL engines; the single-node posture unchanged (pins/liveness/ arbitration lock in-process — only the window's persistence is engine rows); the one-window-host posture recorded. - The seam reduction honored: no pin rows, no sweep-lock body
anywhere in the sqlite engine (dead machinery per ADR-012 §5);
ensure_gc_schemacreatesgc_windowonly; the embedder's liveness table never created by the engine. - Blocking discipline: all rusqlite work off the async path
(
spawn_blocking); no blocking I/O under internal locks; the connection posture recorded. - Named design points audited as resolved (each recorded in its task's Notes): the connection posture; the timestamp encoding; schema-creation timing vs the no-tables-yet tolerance; the kv cursor dispatch shape over multiple kv engines; the protect-consult posture on overdue execution; the delay-0 test tuning's legality.
- Family conventions: no comments in code (doc comments on public
API fine), thiserror, tokio-only async, no unwrap/expect outside
tests, naming, one-module-per-file re-export shape, the
#![allow(dead_code)]scope notes matching their remaining scope. - Gates green:
cargo test(default — the sqlite column runs here),cargo test --features mem,cargo test --all-features,cargo clippy --all-targets -- -D warnings,cargo clippy --all-features --all-targets -- -D warnings,cargo fmt --check.
Findings are fixed inline where cheap, or recorded as wave-4 amendments where they shape the next decomposition. The gate's completion is what unblocks wave 4's decomposition.
Acceptance Criteria
- Every gate check above read and verified against the cited ADR text (not from memory of it)
- Named design points each decided, recorded, and consistent with the specs
- Findings fixed inline or recorded as wave-4 amendments with owners
- All gates re-run green after any fixes
- Wave 4 decomposition unblocked (recorded in this task's Summary)
References
- docs/plans/implementation.md (§Wave 3, §Review gates — engine wave reviews)
- docs/architecture/decisions/003-backend-contract-and-dispatch.md
- docs/architecture/decisions/007-two-kv-engines-sqlite-and-postgres.md
- docs/architecture/decisions/008-trait-size-probe-fleet-gc-and-large-engines.md §2
- docs/architecture/decisions/010-backend-io-seams-and-fleet-state.md §2
- docs/architecture/decisions/012-pre-decomposition-consistency-rulings.md §1/§5/§6.7
- docs/architecture/store-api.md
- tasks/review-wave-2.md (the gate method)
Notes
To be filled by the review agent
Summary
To be filled on completion