Implementation plan: wave-based decomposition; waves 1-2 decomposed (11 tasks)

docs/plans/implementation.md records the wave structure (core ->
substrate fork || pg engine -> sqlite engine -> contract suite ->
release), the decided points (contract-suite layout = option (a),
engine-tests vs equivalence-suite split, no CI, mem-engine/fuzzing
deferrals surfaced), and the review-gate rhythm.

Wave 1 (foundations): workspace scaffold, core errors/validation,
value types, trait surface, contract-suite scaffold (+ADR-022),
review gate.
Wave 2 (substrate fork): fork scaffold/provenance, connection+watcher
port, queue-op re-derivation on contract v1, provenance/floor close,
review gate.
This commit is contained in:
glm-5.3-flash committed 2026-10-07 14:37:31 +00:00
1 parent 83767e880b
commit 49743c690e
12 files changed
+1009

No files matched your search

+68
View File
@@ -0,0 +1,68 @@
---
id: review-wave-1
name: Review gate — wave 1 (core contract surface)
status: pending
depends_on: [core-trait-surface, contract-suite-scaffold]
scope: narrow
risk: low
impact: project
level: review
tags: [wave-1, review]
---
## Description
Review the wave-1 output before wave 2/3/4 work builds on it. The core
trait surface is versioned contract surface from the first release
(ADR-017) — a shape error found here is cheap; found in wave 5 it is a
migration. This review is line-by-line against the pinned ADR text,
not a general code review.
Check:
- **Trait surface vs. ADR text** — every method set and signature in
`core-trait-surface` against ADR-008 §1–§3/§8, ADR-014, ADR-019 §1–§5,
ADR-021: exact names, exact field types, the one-shot/repeatable
split (`heartbeat(&self)` vs `self: Box<Self>` ops), the
`recv_timeout`/no-`recv_timeout` asymmetry between the two receiver
traits, `with_tx`'s pinned signature.
- **Value types vs. ADR text** — `Job`'s full field list (including
`claimed_at`, ADR-021 §2), `StreamEvent`'s shape (ADR-015 §3), opts
structs' types and defaults (ADR-010 §3, ADR-020), the
`#[non_exhaustive]` split (read types yes, opts structs no —
ADR-017 §3).
- **Error taxonomy** — exactly six variants, no extras; `Database`
opaque with source chain; the pinning rule respected.
- **Validation** — both name classes correct (shared-namespace vs
consumer-local; ADR-008 §4 third-round annotation).
- **Family standards** — no panics, no `unwrap()`/`expect()` outside
tests, no comments in code (doc comments on public API fine),
module-per-file, re-exports from `lib.rs`.
- **Lean core** — no engine machinery, no resolution arithmetic, no
SQL-shaped anything in core (ADR-012 §2's boundary).
- **Suite scaffold** — ADR-022 exists and is coherent with ADR-017;
exemplar property green; stamp convention usable.
- **Gates** — `cargo test` (workspace), `cargo clippy --all-targets --
-D warnings`, `cargo fmt --check` all green.
## Acceptance Criteria
- [ ] Every divergence from pinned ADR text found and fixed (or an ADR
amendment proposed if the text itself is wrong)
- [ ] All gates green
- [ ] Findings recorded (task Summary or review notes)
## References
- docs/architecture/decisions/008-contract-v1-pinning.md
- docs/architecture/decisions/019-mechanism-handle-surfaces.md
- docs/architecture/decisions/021-tx-reads-and-value-shape-fixes.md
- docs/plans/implementation.md (Review gates)
## Notes
> To be filled by implementation agent
## Summary
> To be filled on completion