Make the first V2 core owner explicit in sw-block by freezing Phase 14 docs, mode/readiness/publication semantics, and bounded command emission rules. This turns accepted Phase 13 constraints into executable core behavior without overclaiming live runtime cutover. Made-with: Cursor
27 KiB
V2 Phase Development Plan
Date: 2026-04-02 Status: active Purpose: define the execution-oriented phase plan after the current candidate-path work, with explicit module status and target phase ownership
Why This Document Exists
The project now needs a development plan that is:
- phase-oriented
- execution-oriented
- large enough to avoid overhead-heavy micro-slices
- explicit about which module belongs to which future phase
This document is the planning bridge between:
v2-product-completion-overview.md../.private/phase/phase-08.md- future implementation phases
Planning Rules
Use these rules for all later phases:
- one phase should close one meaningful product/engineering outcome
- every phase must have a clear delivery object and a clear closed-loop validation mechanism
- every slice inside a phase should also name:
- what is delivered
- what loop is proven closed
- what reject shapes remain insufficient
- phases should prefer real code/test/evidence over wording-only progress
- later phases may reuse V1 engineering reality, but must not inherit V1 recovery semantics as truth
- a phase is too small if it does not move the overall product-completion state clearly
Current Baseline
Current accepted path through Phase 13, with Phase 14 now the immediate next engineering focus:
- protocol/algo truth set is strong
- engine recovery core is strong on the chosen path
- control-plane closure is accepted on the chosen path
- selected product-surface rebinding is accepted on the chosen path
- bounded production hardening is accepted on the chosen path
- one bounded accepted path exists for:
RF=2sync_all- existing master / volume-server heartbeat path
blockvolas execution backend
Phase 13has now closed the boundedWAL V1.5contract package for the current constrained chosen path:
- real-workload package accepted
- assignment/publication closure accepted
- bounded mode normalization accepted
Phase-accounting note:
Phase 08is closedPhase 09is closedPhase 10is closedPhase 11is closedPhase 12is the accepted hardening baseline for the chosen pathPhase 13is closed and should be read as one bounded constrained-runtime contract package, not as launch approvalPhase 14is now the immediate next engineering focus:- explicit
V2 coreextraction - not more deepening of constrained-
V1validation by default
- explicit
Important interpretation rule:
- the accepted chosen path and claim/evidence set are real
- the current
weed/runtime structure is not automatically the finalV2structure - until
Phase 14establishes an explicitV2 core, current integrated tests should be read primarily as:V1runtime validation underV2constraints- not proof that a completed
V2 runtimealready exists
- future phases must treat:
v2-protocol-claim-and-evidence.mdas current claim authorityv2_mini_core_design.mdas engineering-structure authorityv2-reuse-replacement-boundary.mdas reuse vs replacement authority
This means the next phases should focus mainly on:
- extracting the long-term
V2 corestructure explicitly - rebinding
weed/into adapter / projection / backend roles - closing one bounded
V2-native runtime path before productionization - using
Phase 13evidence as acceptance input rather than continuing to treat constrained-V1validation as the main workstream
Phase Roadmap
Phase 09: Production Execution Closure
Goal:
- turn validation-grade backend execution into production-grade backend execution
Must prove:
- full-base rebuild performs real data transfer
- snapshot rebuild performs real image transfer
- replica-ahead path is physically executable, not only detected
- runtime execution ownership is stronger than the current bounded candidate path
Typical outputs:
- real
TransferFullBase - real
TransferSnapshot - real
TruncateWAL - stronger executor/runtime integration in the live volume-server path
Verification mechanism:
- one-chain execution tests on real backend paths
- cleanup assertions after success/failure/cancel
- focused adversarial tests for truncation and rebuild execution
Workload:
- large
- this is likely the single biggest remaining engineering phase
Status:
- complete
- accepted closeout exists in
../.private/phase/phase-09.md
Phase 10: Real Control-Plane Closure
Goal:
- strengthen from accepted assignment-entry closure to fuller end-to-end control-plane closure
Why this is next:
Phase 09already closed the main backend execution gaps- the most important remaining product risk is no longer storage execution itself
- it is now control-path completeness:
- heartbeat / gRPC delivery
- reassignment / result convergence
- cleaner local identity than transport-shaped
listenAddr
Phase 10can also absorb bounded low-severity cleanup discovered duringPhase 09if it is directly relevant to live control/runtime ownership
Current accepted progress inside Phase 10:
P1accepted:- stable identity and control-truth closure on the chosen block assignment wire
P2accepted:- reassignment/result convergence through the accepted volume-server-side chosen-path ingress
P3accepted:- bounded repeated-assignment / idempotence cleanup on the chosen live path
P4accepted:- master-driven heartbeat / gRPC control-loop closure on the chosen path
Phase 10is now closed:- bounded end-to-end control-plane closure for the chosen path is accepted
Must prove:
- heartbeat/gRPC-level delivery is real for the chosen path
- failover / reassignment state converges through the real control path
- local and remote identity are consistent enough for product use
Typical outputs:
- stronger heartbeat/gRPC delivery proof
- stronger result/reporting convergence
- cleaner local identity than transport-shaped
listenAddr
Verification mechanism:
- real failover/reassignment tests at the fuller control-plane level
- identity/fencing assertions through the end-to-end path
Suggested first targets:
- keep accepted
Phase 10control-plane closure closed - start
Phase 11with one bounded product-surface rebinding slice - prefer selected surface proofs over broad surface explosion
- keep any residual control-path cleanup narrow; do not reopen accepted
Phase 10closure casually
Workload:
- medium-large
Phase 11: Product Surface Rebinding
Goal:
- bind product-facing surfaces onto the V2-backed block path after backend closure is strong enough
Must prove:
- the V2-backed backend can support selected product surfaces without semantic drift
- reuse of V1 surfaces does not reintroduce V1 recovery truth
Candidate areas:
- snapshot product path
CSINVMeiSCSI
Recommended first slice:
- start with bounded
snapshot product pathrebinding - defer
CSIandNVMe/iSCSIuntil one simpler product-visible surface is already accepted
Suggested slice order:
P1snapshot product-path rebindingP2CSIrebindingP3NVMe/iSCSIfront-end rebindingP4broader workflow closure such as snapshot restore/clone if still needed
Verification mechanism:
- selected surface integration tests
- product-surface contract checks
- no-overclaim review that the surface does not imply unsupported backend capability
Workload:
- medium-large
- can be split by product surface if needed, but only after backend closure is strong
Phase 12: Production Hardening
Goal:
- move from candidate-safe to production-safe
Must prove:
- restart/recovery stability under repeated disturbance
- long-run/soak viability
- operational diagnosability
- acceptable production blockers list or production-ready gate
Verification mechanism:
- soak/adversarial runs
- failover/restart under disturbance
- runbook/debug validation
Workload:
- large
Recommended initial planning cut:
- treat
P0as hardening-plan freeze - first hardening slice should likely target restart / recovery disturbance before soak or perf
Current slice order:
P0hardening-plan freezeP1restart / recovery disturbance hardeningP2soak / long-run stability hardeningP3diagnosability / blocker accounting / runbook hardeningP4performance floor / rollout-gate hardening
Slice delivery / closed-loop bar:
- every
Phase 12slice must end with:- one bounded delivery object
- one bounded closed-loop validation object
- one explicit no-overclaim boundary
- “tests exist” is not enough:
- the tests must close the loop from disturbance/input to visible accepted truth
- “code changed” is also not required:
- a hardening slice may legitimately close by proving existing production code is already correct under the targeted disturbance class
Current status:
P0accepted:- hardening object frozen as the accepted chosen path from
Phase 09+Phase 10+Phase 11 - slice order frozen as
P1/P2/P3/P4 - evidence ladder frozen as disturbance correctness, soak, diagnosability, then perf/rollout gates
- hardening object frozen as the accepted chosen path from
P1accepted:- acceptance object = correctness under restart/disturbance on the chosen path
- not soak, not diagnosability, not performance, not rollout readiness
P2accepted:- acceptance object = bounded soak / long-run stability on the chosen path
- repeated-cycle coherence and bounded runtime-state hygiene are accepted inside a bounded test envelope
P3accepted:- acceptance object = bounded diagnosability / blocker accounting / runbook hardening on the chosen path
- bounded operator-visible diagnosis surfaces and finite blocker accounting are accepted
P4accepted:- acceptance object = bounded performance floor / rollout-gate hardening on the chosen path
- not broad rollout readiness beyond the named launch envelope
Phase 12is now closed:- one bounded hardening package is accepted for the chosen path
Current P4 first delivery shape:
- proof-first hardening slice with explicit measured floor and launch-gate artifacts
- one bounded performance package:
- named workload envelope
- repeatable measurement harness
- explicit floor values
- one explicit rollout-gate artifact:
- finite supported launch envelope
- cleared blockers/gates
- remaining blockers/gates
- current evidence shape:
- measured floor values are tied to one named accepted workload envelope
- cost/resource trade-offs are explicit
- rollout discussion is bounded by an explicit finite gate package
- current reuse boundary:
- accepted chosen-path runtime/control/product surfaces remain stable unless perf-floor work exposes a real bug or measurement gap
- focused benchmarks/tests and bounded launch-gate artifacts carry the main delivery burden
Closed-loop expectation for P4 review:
- one bounded workload envelope runs on the accepted chosen path
- measured floor values and cost characteristics are explicit
- launch claims map back to accepted prior slices plus the measured envelope
- remaining rollout blockers are explicit and finite
- claims remain bounded to measured floor / named launch envelope only
Phase 13: V1.5 Contract Closure And Contradiction Ledger
Goal:
- close the bounded
RF=2 sync_allcontract on the current chosen path - freeze what
WAL V1.5is allowed to claim - classify remaining live contradictions as:
- reusable-core bug
- adapter-boundary bug
V2-authority bug
Delivery object:
- one frozen
CP13-*contract package - one centralized claim/evidence ledger for the active chosen path
- one explicit contradiction/rerun queue for invalidated or narrowed evidence
Closed-loop validation:
- protocol/unit/adversarial proofs for
CP13-1..7 - bounded real-workload validation, assignment/publication closure, and mode normalization are all accepted
- explicit narrowing or restoration of claims in the centralized ledger
Non-claims:
- not full
V2 coreextraction - not launch approval
- not proof that current
weed/structure is the finalV2structure
Key files / ownership:
sw-block/.private/phase/phase-13-*.mdsw-block/design/v2-protocol-claim-and-evidence.mdsw-block/design/v2-protocol-truths.md
Phase 14: V2 Core Extraction
Goal:
- make the
V2 coreexplicit as a long-term code structure - stop relying on implicit semantic ownership spread across runtime files
Execution rule:
- define core-owned state and transitions first
- freeze command-emission rules second
- freeze projection contracts third
- only then connect adapters
Delivery object:
- one explicit
V2 corepackage/file layout with named:stateeventcommandprojection
- one minimal real code path for:
ApplyEvent()Decide()EmitCommands()
- one bounded parity package showing accepted prototype/FSM semantics are preserved
Closed-loop validation:
- focused engine tests proving accepted claims can be represented through the new event/command core
- parity checks against accepted prototype/FSM semantics
- no-overclaim review that this is structural extraction, not live-path cutover
Recommended slice order:
Phase 14A: core-owned automata- explicit assignment / recovery / boundary / mode / publication automata
- structural tests only
Phase 14B: command semantics- bounded command sequences derived from semantic state
- still no live
weed/execution
Phase 14C: projection contracts- lookup / heartbeat / debug / tester normalization from core-owned state
- surface-consistency tests
Immediate focus inside Phase 14:
- start from one complete semantic chain:
modereadinesspublication
- use accepted
CP13-8AandCP13-9as the first hard input package
Non-claims:
- not full live-path cutover
- not replacement of all
weed/logic - not a separate process yet
Key files / ownership:
sw-block/design/v2_mini_core_design.mdsw-block/design/v2-phase14plus-semantic-framework.mdsw-block/engine/replication/
Phase 15: Adapter And Projection Rebinding
Goal:
- make
weed/a bounded adapter/projection layer instead of mixed semantic authority - close assignment -> readiness -> publication through named
V2state
Delivery object:
- one explicit adapter-boundary package on the live path
- one explicit projection store / projection surface package for:
- readiness
- publication
- diagnostics
- one narrowed role definition where:
BlockServiceis closer to command executor- registry is closer to projection store
Closed-loop validation:
- live-path tests proving assignment delivered != receiver ready != publish healthy unless the named readiness/projection loop is closed
- focused regression package for the
CP13-8Abug class - operator-visible projection checks rather than internal-state-only proof
Recommended slice order:
Phase 15A: minimal adapter hook- one narrow event path into the core
- one bounded command path back out
- prove no semantic split on that narrow path
Phase 15B: projection-store rebinding- registry / lookup / tester-facing surfaces consume core-owned projection truth
- prove assignment delivered != ready != publish healthy on the real path
Non-claims:
- not backend rewrite
- not broader productization
- not new transport matrix claims
Key files / ownership:
sw-block/design/v2-reuse-replacement-boundary.mdsw-block/design/v2-phase14plus-semantic-framework.mdweed/server/volume_server_block.goweed/server/block_heartbeat_loop.goweed/server/master_block_registry.goweed/server/master_block_failover.go
Phase 16: V2-Native Runtime Closure
Goal:
- make the integrated runtime behave as a
V2-owned recovery/control system - stop depending on a merely improved
WAL V1.5path for correctness interpretation
Execution precondition:
- do not enter
Phase 16untilPhase 14has frozen state / command / projection semantics - do not treat adapter rebinding alone as runtime closure
Delivery object:
- one bounded product/runtime path where failover, recovery, publication, and selected surfaces are driven by the
V2 core+ adapter contract - one explicit runtime integration package that maps simulator/prototype failure classes to live-path behavior
Closed-loop validation:
- end-to-end failover/recovery scenarios on the core-driven path
- simulator-to-runtime consistency checks for the named failure classes that
V2is supposed to survive - bounded real-workload checks on the core-driven path, not just on the legacy-integrated path
Non-claims:
- not broad rollout approval
- not physical split into an independent
V2 core processunless the logic is already structurally independent
Key files / ownership:
sw-block/engine/replication/weed/server/- selected
weed/storage/blockvol/v2bridge/*files
Cross-Phase Review Rule For Phase 14+
For any new transition, command, or projection rule in Phase 14+, require a
short justification in the delivery note or code review:
- semantic constraint satisfied
- which
claim / truth / CP13-*item it is implementing
- which
- overclaim avoided
- which false healthy / ready / durable / recoverable interpretation is being prevented
- proof preserved
- which accepted test or checkpoint remains valid because of the rule
Productionization Program After Phase 16
Goal:
- turn the accepted
Phase 16bounded path into a bounded first-launch product envelope without reopening protocol discovery or core-ownership questions
Program slices:
- Program
P0: launch-envelope freeze- freeze the first supported launch envelope from accepted hardening + runtime-closure evidence
- lock:
- supported topology / transport matrix
- explicit exclusions
- launch-blocking vs post-launch blockers
- reject if any launch claim outruns the measured matrix or accepted blockers/gates
- Program
P1: internal pilot pack- convert the frozen launch envelope into a limited internal pilot package
- define:
- pilot environment and topology
- preflight checklist
- success criteria
- stop / rollback conditions
- incident intake template tied to accepted diagnosability surfaces
- reject if pilot success depends on tribal knowledge or undefined operator judgment
- Program
P2: incident-driven hardening loop- route pilot findings into explicit buckets:
- config / environment issue
- known exclusion
- true product bug
- keep one bounded incident ledger and one bounded fix queue
- reject if incidents accumulate as vague notes or exclusions are silently redefined
- route pilot findings into explicit buckets:
- Program
P3: controlled rollout review- decide whether to:
- stay in pilot
- widen within the same launch envelope
- block expansion
- require explicit mapping from any expansion decision back to:
- accepted
Phase 16evidence - pilot outcomes
- incident dispositions
- accepted
- reject if rollout broadens beyond the named envelope or reuses pilot success as generic production proof
- decide whether to:
Cross-cutting rules:
- do not invent a
Phase 12 P5; productionization remains separate from hardening - do not collapse
Phase 13-16into generic productionization; they are engineering-structure phases - keep the accepted chosen path fixed unless contradiction or incident evidence exposes a real bug
- treat known missing evidence as explicit constraints until cleared, especially:
- failover-under-load performance
- hours/days soak under load
RF>2- broad transport matrix
- full gRPC-stream integration evidence
- keep the roadmap aligned with:
v2-protocol-claim-and-evidence.mdv2_mini_core_design.mdv2-reuse-replacement-boundary.md
Module Status Map
| Module area | Current status | Current owner phase | Next target phase | Notes |
|---|---|---|---|---|
sw-block/engine/replication core FSM/orchestrator/driver |
Strong long-term V2 core asset |
Phase 09 accepted, Phase 13 active constraints |
Phase 14 |
Main next work is explicit state / event / command / projection extraction, not reopening accepted semantics. |
Engine executor real I/O boundary (CatchUpIO / RebuildIO) |
Strong on chosen path | Phase 09 accepted |
Phase 14/16 |
Keep the boundary stable; later work is to connect it to explicit V2 core ownership and runtime closure. |
weed/storage/blockvol/v2bridge/control.go |
Strong boundary adapter on chosen path | Phase 08/09/10 accepted |
Phase 15 |
Remains a bridge between V2 truth and runtime execution; should not accumulate new semantic authority casually. |
weed/storage/blockvol/v2bridge/reader.go |
Strong backend-facing adapter | Phase 09 accepted |
Phase 15/16 |
Mostly stable; later work is explicit boundary ownership and runtime proof, not new protocol semantics. |
weed/storage/blockvol/v2bridge/pinner.go |
Strong backend-facing adapter | Phase 09 accepted |
Phase 15/16 |
Retention safety is proven on the chosen path; later work is keeping it under explicit V2 control boundaries. |
weed/storage/blockvol/v2bridge/executor.go WAL scan |
Strong backend-facing adapter | Phase 09 accepted |
Phase 15/16 |
Real execution path is closed on the chosen path; later work is core-driven runtime integration. |
v2bridge TransferFullBase |
Strong on chosen path | Phase 09 P1 accepted |
Phase 16 |
Execution closure is accepted; do not reopen casually unless core-driven runtime closure exposes a real contradiction. |
v2bridge TransferSnapshot |
Strong on chosen path | Phase 09 P2 accepted |
Phase 16 |
Execution closure is accepted; later work is bounded runtime closure rather than first-implementation discovery. |
v2bridge TruncateWAL |
Strong on chosen path | Phase 09 P3 accepted |
Phase 16 |
Narrow contract is accepted; later work is preserving that contract under explicit runtime ownership. |
weed/server/volume_server_block.go V2 assignment intake |
Adapter-boundary reality with accepted chosen-path closure | Phase 10 P4 accepted, Phase 13 contradiction pressure |
Phase 15 |
This is where assignment/readiness/publication closure must become explicit adapter behavior rather than mixed service semantics. |
weed/server/block_recovery.go live runtime ownership |
V2-owned runtime truth on chosen path | Phase 09/10 accepted |
Phase 15/16 |
Serialized ownership is accepted; later work is making it cooperate with explicit V2 core and projection boundaries. |
weed/server/master_block_registry.go / failover / handlers |
Mixed projection/truth reality | Phase 10-12 accepted surfaces |
Phase 15 |
Should converge toward projection store + operator-visible truth surfaces rather than mixed business-logic/state storage. |
blockvol WAL/flusher/checkpoint runtime |
Reuse reality | Existing production code | Phase 16 |
Reuse implementation; do not let V1 replication semantics redefine V2 truth. |
blockvol rebuild transport/server reality |
Reuse with redesign boundary | Existing production code | Phase 16 |
Bounded chosen-path integration is accepted; later work is runtime closure under V2 authority. |
local server identity (localServerID) |
Strong chosen-path rule with narrowed semantics | Phase 10 P1 accepted, Phase 13 constraints |
Phase 15 |
Stable identity must remain distinct from transport address shape and explicit in later adapter/projection work. |
| Snapshot product path | Strong on chosen path | Phase 11 accepted |
Phase 16 |
Product-visible snapshot workflow is accepted on the chosen path; later work is preserving it under V2-native runtime closure. |
CSI integration |
Strong on chosen path | Phase 11 accepted |
Phase 16 |
Bounded controller/node lifecycle rebinding is accepted; later work is runtime preservation, not first rebinding. |
NVMe / iSCSI front-ends |
Strong on chosen path | Phase 11 accepted |
Phase 16 |
Publication/address truth rebinding is accepted; later work is proving the V2-driven runtime path beneath them. |
| Testrunner / infra / metrics | Strong support layer | existing | Phase 13-16 |
Reuse to validate contract closure, adapter contradictions, runtime closure, and later productization gates. |
Completion-State Targets
Use these rough targets to judge whether a phase is moving the product meaningfully.
| Phase | Expected completion move |
|---|---|
Phase 09 |
from validation-grade backend execution to accepted execution closure on the chosen path |
Phase 10 |
from bounded control-entry proof to stronger end-to-end control-plane closure |
Phase 11 |
from backend-ready path to selected product-surface readiness |
Phase 12 |
from candidate-safe to production-safe on one bounded chosen path |
Phase 13 |
from scattered WAL V1.5 evidence to one frozen contract/contradiction ledger |
Phase 14 |
from implicit core semantics to explicit V2 core package/engine structure |
Phase 15 |
from mixed runtime semantics to explicit adapter/projection closure |
Phase 16 |
from improved chosen-path runtime to one bounded V2-native runtime path |
| Productionization | from bounded runtime closure to bounded launch-envelope / pilot / rollout review |
Near-Term Execution Direction
If the goal is to maximize product completion efficiently, the recommended order is now:
- keep
Phase 09-12accepted closures closed and do not reopen them casually - keep
Phase 13closed as the boundedWAL V1.5contract package - move next to
Phase 14core extraction:- explicit
state / event / command / projection - minimal
ApplyEvent() -> Decide() -> EmitCommands()path
- explicit
- then
Phase 15adapter/projection rebinding:- assignment
- readiness
- publication
- diagnostics
- then
Phase 16boundedV2-native runtime closure - only then move to the productionization program:
- freeze launch envelope
- run limited internal pilot
- harden from incidents
- review controlled rollout
The most important near-term engineering weight should now go to:
- making
sw-block/engine/replicationthe explicit long-termV2 core - keeping
weed/changes bounded to adapter / projection / backend roles unless they are explicitly promoted intoV2-owned authority - using
CP13-1..9as acceptance input for newV2 corework rather than as a reason to keep extending constrained-V1validation
Short Summary
The V2 line now has accepted execution, control, product-surface, and hardening closure on one bounded chosen path.
The next development plan should not jump directly from Phase 12 to productionization.
It should move through four bounded engineering phases first:
Phase 13: freeze the currentWAL V1.5constrained-runtime contract packagePhase 14: extract the explicitV2 corePhase 15: rebindweed/as adapter/projection realityPhase 16: close one boundedV2-native runtime path
Only after that should the roadmap move into bounded launch-envelope freeze, internal pilot, incident-driven hardening, and controlled rollout review.