Engine execution layer for V2 replication protocol: - RebuildInstaller: full state handoff (dirty map, WAL, superblock, flusher) - TruncateToLSN: exact safety predicate (checkpointLSN == truncateLSN), ErrTruncationUnsafe escalation to NeedsRebuild - SyncReceiverProgress: unconditional Store for post-rebuild alignment - V2StatusSnapshot: CommittedLSN = nextLSN-1 for sync_all V2 bridge real I/O executors: - TransferFullBase: TCP streaming + RebuildInstaller + second catch-up - TransferSnapshot: SHA-256 verified streaming to disk - TruncateWAL: ErrTruncationUnsafe detection + escalation - StreamWALEntries: rebuild-mode TCP apply Engine executor interfaces: - CatchUpIO.TruncateWAL, RebuildIO.TransferFullBase returns achievedLSN - CatchUpExecutor truncation-only skip, NeedsRebuild escalation - RebuildExecutor uses achievedLSN for progress tracking Design docs reorganized: superseded planning docs removed, protocol truths and closure map added. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 KiB
V2 Product Completion Overview
Date: 2026-03-31 Status: active Purpose: provide one product-level overview of current V2 engineering completion, V1 reuse strategy, and the roadmap from the accepted candidate path to a production-ready block engine
Why This Document Exists
The project now has enough accepted V2 algorithm, engine, and hardening evidence that the next question is no longer only:
- is the protocol correct
It is also:
- how complete is the product path
- which parts are already strong
- which parts can reuse V1 engineering
- which parts still require major implementation work
- which future phases actually move product completion
This document is the product-completion view.
It complements:
v2-protocol-truths.mdfor accepted semantics../docs/archive/design/v2-production-roadmap.mdfor the older roadmap ladder../.private/phase/phase-08.mdfor current phase contract
Current Position
The accepted first candidate path is:
RF=2sync_all- existing master / volume-server heartbeat path
- V2 engine owns recovery policy
v2bridgetranslates real storage/control truthblockvolremains the execution backend
This means the project is no longer at "algorithm only". It already has:
- accepted protocol truths
- accepted engine execution closure
- accepted hardening replay on a real integrated path
- one bounded candidate statement
Engineering Completion Snapshot
These levels are rough engineering estimates, not exact percentages.
| Area | Current level | Notes |
|---|---|---|
| Algorithm / protocol truths | Strong | Core V2 semantics are accepted and should remain stable unless contradicted by live evidence. |
| Simulator / prototype evidence | Strong | Main failure classes and protocol boundaries are already well-exercised. |
| Engine recovery core | Strong | Sender/session/orchestrator/driver/executor are substantially implemented. |
| Weed bridge integration | Strong | Reader / pinner / control / executor are real and tested on the chosen path. |
| Integrated candidate path | Strong on chosen path | Backend, control-plane, and selected product surfaces are now accepted on one bounded chosen path. |
| Runtime ownership inside live server loop | Strong on chosen path | Accepted chosen-path execution/control ownership exists; later work is restart/disturbance hardening, not first-closure rebinding. |
| Production-grade data transfer | Strong on chosen path | TransferFullBase and TransferSnapshot execution closure are accepted on the chosen path; later work is hardening. |
| Truncation / replica-ahead execution | Strong on chosen path | TruncateWAL narrow chosen-path closure is accepted; later work is hardening/planning improvement. |
| End-to-end control-plane closure | Strong on chosen path | Phase 10 accepted bounded end-to-end control-path closure on the chosen path. |
Product surfaces (CSI, NVMe, iSCSI, snapshot productization) |
Strong on chosen path | Phase 11 accepted bounded product-surface rebinding on the chosen path. |
| Production hardening / ops | Partial | Phase 12 is now the next active stage. |
Reuse Strategy
Use this rule:
- if a component decides truth, V2 must own it
- if a component consumes truth, V1 engineering can often be reused
V2-owned semantics
These should not inherit V1 semantics casually:
- recovery choice:
zero_gap/catchup/needs_rebuild - sender/session ownership and fencing
- stable
ReplicaIDand stale-authority rejection - committed/checkpoint interpretation
- rebuild-source choice and recovery outcome meaning
V1 engineering that is usually reusable
These are implementation/reality layers, not protocol truth:
blockvolstorage runtime- WAL / flusher / checkpoint machinery
- real assignment receive/apply path
- front-end adapters such as
NVMe/iSCSI - much of
CSIlifecycle integration - monitoring / metrics / test harness infrastructure
Reuse with explicit bounds
These can reuse implementation, but their semantic placement must remain V2-owned:
- snapshot export / checkpoint plumbing
- rebuild transport / extent read path
- master/heartbeat/control delivery path
Module Treatment Overview
| Module area | Current treatment | Near-term plan |
|---|---|---|
| Recovery engine | V2-owned | Keep semantics stable and focus next on restart/disturbance hardening. |
v2bridge |
V2 boundary adapter | Chosen-path execution closure is accepted; later work is hardening without leaking policy downward. |
blockvol WAL/flusher/runtime |
Reuse reality | Reuse implementation, but do not let V1 replication semantics redefine V2 truth. |
| Snapshot capability | Reuse implementation, V2-owned semantics | Rebinding is accepted on the chosen path; later work is hardening. |
CSI |
Accepted product surface on chosen path | Keep the bounded contract stable and harden under disturbance. |
NVMe / iSCSI |
Accepted front-end adapters on chosen path | Keep publication/address truth stable and harden runtime behavior. |
| Rebuild server / transfer mechanisms | Reuse with redesign boundary | Chosen-path execution closure is accepted; later work is disturbance hardening. |
| Control plane | Reuse existing path | Bounded chosen-path closure is accepted; later work is restart/disturbance hardening. |
What The Candidate Path Already Proves
For the chosen RF=2 sync_all path, the project can already claim:
- stable remote identity across address change when
ServerIDis present - stale epoch/session fencing through the integrated path
- real catch-up one-chain closure on the chosen path
- rebuild control/execution chain proven on the chosen path
- chosen-path execution closure accepted in
Phase 09 - later work is restart/disturbance/perf hardening rather than first-path closure
- chosen-path execution closure accepted in
- replay of accepted failure classes on the unified live path
- one real failover / reassignment cycle
- one true simultaneous-overlap retention safety proof
- committed/checkpoint separation accepted for this candidate path:
CommittedLSN = WALHeadLSNCheckpointLSNremains the durable base-image boundary
What Is Still Missing For Product Completion
The biggest remaining product-completion gaps are now production-hardening gaps:
- restart / recovery disturbance hardening
- accepted chosen-path behavior must remain correct under restart, rejoin, and repeated failover
- long-run / soak stability
- accepted behavior must remain stable across repeated cycles and longer-running operation
- operational diagnosability
- blockers, symptoms, and operator-visible diagnosis quality must be explicit
- performance floor and rollout gates
- production claims need bounded floor numbers and explicit rollout criteria
Recommended Completion Roadmap
Stage 1: Finish Phase 08 cleanly
Target:
- close candidate-path judgment with explicit bounds and package it cleanly inside
Phase 08 P4
Main output:
- one accepted candidate package for the chosen path
Stage 2: Phase 09 Production Execution Closure
Target:
- turn validation-grade execution into production-grade execution
Main work:
- real
TransferFullBase - real
TransferSnapshot - real
TruncateWAL - stronger runtime ownership of recovery execution
Why it matters:
This is the largest remaining engineering block between "candidate-safe-with-bounds" and a serious product path.
Stage 3: Phase 10 Real Control-Plane Closure
Target:
- strengthen from accepted assignment-entry closure to fuller end-to-end control-path closure
Status:
- accepted and closed on the chosen path
Main work:
- heartbeat/gRPC-level proof
- stronger control/result convergence
- better identity completeness for local and remote server roles
Stage 4: Phase 11 Product Surface Rebinding
Target:
- connect product-facing surfaces to the V2-backed block path
Status:
- accepted and closed on the chosen path
Candidate areas:
- snapshot product path
CSINVMeiSCSI
Recommended first cut:
- snapshot product path first
CSIandNVMe/iSCSIafter one bounded product-visible surface is already accepted
Suggested order inside Phase 11:
P1snapshot product pathP2CSIP3NVMe/iSCSIP4broader residual workflow closure if still required
Rule:
Do this after the backend engine/runtime path is strong enough, not before.
Stage 5: Phase 12 Production Hardening
Target:
- move from candidate-safe to production-safe
Status:
- next active stage
Main work:
- soak / restart / repeated failover
- operational diagnosis quality
- performance floor and cost characterization
- explicit production blockers / rollout gates
Completion Gates
The most important gates from here are:
- execution gate
- validation-grade transfer/truncation must become production-grade
- runtime ownership gate
- V2 recovery must be a stronger live runtime path, not only a bounded tested path
- control-plane gate
- stronger end-to-end control delivery proof
- product-surface gate
- front-end surfaces should only rebind after backend correctness is strong enough
- production-hardening gate
- restart, soak, diagnosis, and repeated disturbance must be acceptable
Near-Term Planning Guidance
If the goal is to maximize product completion efficiently:
- do not make
CSI,NVMe, or broad snapshot productization the immediate next heavy phase - first close production execution gaps in the backend path
- then strengthen control-plane closure
- then rebind product surfaces
In short:
- backend truth and execution first
- product surfaces second
- production hardening last
Short Summary
The V2 line is already beyond "algorithm only". It has an accepted bounded chosen path through backend, control-plane, and selected product surfaces.
But the remaining work is still substantial, and it is mostly engineering work:
- production hardening under restart / disturbance
- long-run stability and diagnosability
- performance floor and rollout gating
That is the practical path from the current candidate-safe engine to a production-ready block product.