--- id: review-wave-1 name: Wave 1 review gate — the one-way-door gate status: pending depends_on: [core-hashing-keys, core-error-model, core-trait-and-types, suite-scaffold] scope: narrow risk: low impact: phase level: review tags: [wave-1, review] --- ## Description The wave-1 review gate, before wave 2 decomposes. Wave 1 is the contract surface every later wave implements against, and it carries the crate's declared one-way door — a shape error found here is a task revision; found after an engine ships data it is a migration ADR. The gate reads the code against the pinned ADR text line by line. Gate checks: - **Key encoding vs ADR-002, line by line** (the one-way door): byte layout (`1 alg byte + digest`, 0x01/0x02, 0x00 reserved, 33/21 lengths), rejects-never-guesses, sort stability, the preamble-as- abstraction derivation, the interop test's fidelity (git CLI, not just vectors), the oid hex policy decision recorded. - **Backend trait + seams vs ADR-003/010**: the seven-method set with `size` metadata-only; opaque byte keys; the read-cursor abstraction (two body families, range contract at one seam, not public API); the staged-put contract (staging cursor, commit publishes, discard converges); the engine-state companion trait's clause families and per-engine applicability vs ADR-012 §5's table. - **Error model vs store-api.md / ADR-012 §6.5**: the five variants; the altitude discipline; the single-enum reading audited against the spec text (the named design point from `core-error-model`). - **Feature graph vs ADR-013 §4**: the manifest's feature set, the pg-lo-no-implies-postgres rule, `sqlite` default-on, `local` ungated. - **The named design points audited as resolved** (each recorded in its task's Notes): single-enum error reading; Backend trait visibility; trait put-form method shapes; oid hex policy; async trait shape (AFIT vs async_trait). - **Suite convention**: the factory contract, stamp format, and backlog traceable to store-api.md's invariants. - **Family conventions**: no comments in code (doc comments on public API fine), thiserror, tokio-only async, no unwrap/expect outside tests, naming, module structure. - **Gates green**: `cargo test`, `cargo clippy --all-targets -- -D warnings`, `cargo fmt --check`, `cargo check --all-features`. Findings are fixed inline where cheap, or recorded as wave-2 amendments where they shape the next decomposition. The gate's completion is what unblocks wave 2'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-2 amendments with owners - [ ] All gates re-run green after any fixes - [ ] Wave 2 decomposition unblocked (recorded in this task's Summary) ## References - docs/plans/implementation.md (§Wave 1, §Review gates) - docs/architecture/decisions/002-canonical-hash-and-key-encoding.md - docs/architecture/decisions/003-backend-contract-and-dispatch.md - docs/architecture/decisions/010-backend-io-seams-and-fleet-state-home.md - docs/architecture/decisions/012-pre-decomposition-consistency-rulings.md - docs/architecture/decisions/013-family-composition-reactive-boundary-and-feature-graph.md §4 - docs/architecture/store-api.md ## Notes > To be filled by implementation agent ## Summary > To be filled on completion