diff --git a/seaweed-block/docs/roadmap.md b/seaweed-block/docs/roadmap.md index 1c1ca7a77a..281b884b4a 100644 --- a/seaweed-block/docs/roadmap.md +++ b/seaweed-block/docs/roadmap.md @@ -109,8 +109,10 @@ Recommended order from here: status/events-only visibility, not lifecycle mutation. 2. Operation Layer v0.5 beta candidate: code and QA complete through Phase 44; release images still need publish/pinned-image smoke before marking it - shipped. It claims a bounded `SwBlockVolume` protection-finalizer lifecycle, - not automatic cleanup or broad operator automation. + shipped. The team is intentionally skipping that release step for the next + development slice, so v0.5 must not be marked released from roadmap wording. + It claims a bounded `SwBlockVolume` protection-finalizer lifecycle, not + automatic cleanup or broad operator automation. - Phase 41: lifecycle-owner foundation. **Closed 2026-06-14, QA PASS** (`internal/docs/finished-plans/phase41_finishedplan_lifecycle_owner_foundation.md`). Observer/lifecycle-owner/executor roles defined; delete-safety preconditions @@ -126,11 +128,13 @@ Recommended order from here: (`internal/docs/finished-plans/phase44_finishedplan_delete_lifecycle_close_gate.md`). The integrated PVC -> protected CR -> hold/release -> zero-residue path is validated end-to-end. -3. Productize returned-replica rebuild/reintegration/failback after the - operation layer can safely authorize, block, and audit lifecycle actions. - The engine/transport already has rebuild and returned-replica safety pieces; - the missing work is the Kubernetes/product control loop: facts, judgment, - action ownership, status, Events, fencing, and multi-volume QA gates. +3. Phase 46: productize returned-replica rebuild/reintegration status and + decisioning. **Active.** The engine/transport already has rebuild and + returned-replica safety pieces; the missing work is the Kubernetes/product + control loop: facts, judgment, action ownership, status, Events, fencing, + and multi-volume QA gates. Initial scope is status/decision productization; + automatic failback or broad rebuild execution remains a later executor + phase. 4. Add backup/restore and NVMe ANA parity after they can reuse the same action owner, evidence, and status model rather than creating another isolated control plane. @@ -138,8 +142,9 @@ Recommended order from here: The internal release-train contract is `internal/docs/ref/operation-layer-v0.5-release-train.md`. Phases 41-44 close the operation-layer loop for a bounded `SwBlockVolume` protection finalizer. -Next storage features should reuse this same fact -> judgment -> action -> -evidence pattern. +Phase 46 intentionally reuses this same fact -> judgment -> action -> evidence +pattern for returned-replica reintegration before any larger storage feature is +enabled. The practical rule is: diff --git a/seaweed-block/internal/docs/current-plan.md b/seaweed-block/internal/docs/current-plan.md index cee3b4e045..4d236f7590 100644 --- a/seaweed-block/internal/docs/current-plan.md +++ b/seaweed-block/internal/docs/current-plan.md @@ -1,143 +1,169 @@ -# Current Plan: v0.5 Operation Layer Release Close +# Current Plan: Phase 46 Returned-Replica Rebuild / Reintegration Productization Status: active. -Working branch: `phase45-engineering-wiki` +Working branch: `phase46-returned-replica-reintegration` -Scope note: the recent engineering wiki work is a documentation maintenance -slice, not a product phase. Do not count it as "Phase 45" in the product -roadmap. The next formal product phase should start after the v0.5 operation -layer release is closed. +Decision note: the v0.5 Operation Layer release smoke is intentionally skipped +for now. Phase 44 code and QA proved the bounded `SwBlockVolume` lifecycle, but +v0.5 is **not** marked released until matching public images are published and +the pinned-image smoke is run. Do not use this branch to claim a v0.5 release. Previous product phase: Phase 44 is closed in `internal/docs/finished-plans/phase44_finishedplan_delete_lifecycle_close_gate.md`. ## Product Goal -Close the v0.5 beta-candidate release for the Operation Layer: +Turn returned-replica recovery from lower-level engine behavior into a +Kubernetes-visible lifecycle: ```text -install --> PVC create --> CSI-created SwBlockVolume CR --> lifecycle-owner protection finalizer --> operator-status status/Events --> delete request --> hold on unsafe cleanup evidence --> release on clean cleanup evidence --> uninstall zero residue +replica returns after authority moved +-> replica is observed as returned/stale/behind +-> frontend and ACK eligibility remain fenced +-> catch-up versus rebuild is decided from frontier evidence +-> progress and blockers are visible in CRD/report/dashboard/explain +-> replica becomes eligible only after terminal evidence +-> multi-volume isolation and cleanup hygiene hold ``` -The release claim is narrow: bounded `SwBlockVolume` lifecycle ownership and -evidence-driven delete hold/release. It is not automatic cleanup, rebuild, -failback, backup/restore, upgrade execution, or a broad production operator. +The near-term claim is **status and decision productization first**. Automatic +rebuild execution, automatic failback, backup/restore, NVMe ANA parity, and +production HA/SLO claims are out of scope unless a later deliverable explicitly +adds an executor and QA gate. -## Why This Is The Current Plan +## Why This Is Next -Phases 41-44 already delivered the product capability: +The Operation Layer created the pattern Seaweed Block should now reuse: -- lifecycle-owner role separation, -- real Kubernetes admission/RBAC boundary, -- finalizer add/release, -- delete-safety status, -- CSI-created CR identity, -- integrated hold/release close gate, -- multi-volume delete isolation, -- report/dashboard/explain surface agreement. +```text +live facts -> judgment -> action decision -> bounded owner -> evidence -> QA +``` -The remaining work is release closure, not a new feature phase. +Returned replicas are the next high-value storage lifecycle risk because a +returned process can be reachable and durable-ready while still unsafe for +frontend/ACK use. The existing low-level gates already prove parts of this, but +the product still needs a user-visible loop that prevents false `Ready=True` and +explains what is required before reintegration. + +## Existing Evidence To Reuse + +- `testops/scenarios/returned-replica-component-gate.yaml` +- `testops/scenarios/iscsi-returned-replica-chain.yaml` +- `core/ops/volume_status_report_collector_test.go` +- `core/host/master/promotion_probe.go` +- `core/host/volume/projection_bridge.go` +- `docs/wiki/deep-dives/returned-replica-rebuild.md` +- `docs/wiki/deep-dives/wal-frontier-recovery.md` + +These prove safety seams exist. Phase 46 must make those seams visible and +auditable at the product layer. ## Scope Contract | In | Out | |---|---| -| release docs / README / quickstart boundary review | new storage features | -| publish or identify matching immutable images | automatic cleanup | -| pinned-image release smoke | returned-replica rebuild | -| verify status/events/finalizer/delete path on shipped artifacts | failback | -| admin merge / PR summary | NVMe ANA parity | -| keep wiki/docs as maintenance commits | GPUDirect/cuFile implementation | +| returned-replica state projection | automatic failback | +| frontend/ACK fencing status | broad automatic rebuild executor unless explicitly gated | +| catch-up versus rebuild decision model | backup/snapshot/restore | +| CRD/report/dashboard/operator-snapshot agreement | NVMe ANA parity | +| action-model entries for reintegrate/rebuild as dry-run/rejected where executor is absent | production HA/SLO | +| TestOps live gate using existing returned-replica scenarios | release-image publication | +| multi-volume isolation and cleanup verifier | unrelated operator cleanup automation | -## D1: Documentation Boundary Check +## D1: Contract And Inventory -Goal: ensure public docs and release notes say exactly what v0.5 can do. +Goal: freeze the product contract before code changes. Acceptance: ```text -[x] README feature table matches v0.5 bounded lifecycle claim -[x] quickstart does not over-claim lifecycle-owner as production operator -[x] docs/releases/v0.5-beta-candidate.md is current -[x] docs/roadmap.md says next product work is rebuild/reintegration after v0.5 -[x] wiki links remain internal/developer documentation, not release claims +[ ] returned-replica lifecycle states are named +[ ] required facts are listed: authority, frontend readiness, replication role, + durable frontier, retained/head LSN, peer readiness, fencing reason +[ ] catch-up versus rebuild decision inputs are documented +[ ] non-claims are explicit: no automatic failback, no broad rebuild execution +[ ] existing component/live scenarios are mapped to the new product gates ``` -## D2: Artifact / Image Check +## D2: Returned-Replica Status Projection -Goal: confirm release images match the code that passed Phase 44. +Goal: expose returned-replica safety state without changing data-plane behavior. Acceptance: ```text -[ ] matching seaweed-block and seaweed-block-csi images are published or named -[ ] release note records the immutable tags/digests -[ ] README/quickstart use the same public tags if this is a public release -[ ] chart defaults do not point at an incompatible older image +[ ] non-primary returned replica can be durable-ready but frontend-fenced +[ ] frontend-fenced returned replica never makes the volume Ready by itself +[ ] unsafe non-primary frontend readiness is classified as a blocker +[ ] CRD/operator-snapshot/report/dashboard share the same state/reason +[ ] unit tests cover returned, fenced, recovering, blocked, and ready shapes ``` -Current status: blocked on publish/identification of matching v0.5 images for -code commit `041b084` or a later release commit. The existing public quickstart -tag `sha-dc2972d0059b` is a v0.4/status-foundation image and must not be used -as v0.5 lifecycle-owner evidence. +## D3: Action Decision Model -## D3: Release Smoke +Goal: add product actions without pretending an executor exists. -Goal: prove the shipped artifacts, not only local builds, run the user path. +Acceptance: + +```text +[ ] authority.reintegrate_returned_replica has preconditions and evidence refs +[ ] authority.rebuild_returned_replica has preconditions and evidence refs +[ ] missing executor or missing frontier evidence rejects/fails closed +[ ] safe/dry-run suggestions are visible but mutation_allowed=false unless a + later executor gate explicitly enables them +[ ] report/explain/dashboard render the decision consistently +``` + +## D4: Bundle / Replay Integration + +Goal: make existing returned-replica evidence cold-readable. + +Acceptance: + +```text +[ ] existing returned-replica scenario bundles replay into returned/fenced state +[ ] stale/behind evidence does not produce false Ready=True +[ ] durable frontier facts are preserved in summary and operator-snapshot +[ ] missing or stale evidence becomes Unknown/EvidenceStale, not Ready +[ ] support bundle relocation preserves the interpretation +``` + +## D5: Live Returned-Replica Gate + +Goal: run the real returned-replica scenario through the product surfaces. Minimum gate: ```text -[ ] Helm install with pinned images -[ ] first PVC writer/reader passes -[ ] SwBlockVolume CR is created -[ ] lifecycle-owner adds protection finalizer -[ ] operator-status writes Ready/first_volume_verified and Events -[ ] delete request holds when cleanup evidence is missing/unsafe -[ ] clean cleanup evidence releases the protection finalizer -[ ] uninstall cleanup verifier reports zero residue +[ ] run returned-replica component gate +[ ] run iscsi-returned-replica chain +[ ] after r1 returns and r2 remains primary, r1 is non-primary and + frontend_primary_ready=false +[ ] r2 remains the only primary/frontend-ready replica +[ ] CRD/report/dashboard/explain show returned/fenced/recovering facts +[ ] no false Ready=True for stale or insufficient returned-replica evidence +[ ] cleanup verifier reports zero residue ``` -## D4: Merge / Release Close +## D6: Multi-Volume / Close Gate -Goal: merge the release docs and publish the release note. +Goal: prove the returned-replica lifecycle is per-volume and release-shaped. Acceptance: ```text -[ ] PR/admin-merge summary uses product language, not phase-internal language -[ ] QA evidence is linked -[ ] non-claims are preserved -[ ] docs/wiki maintenance commits are described as documentation support -[ ] next product phase is explicitly named +[ ] returned replica on volume A does not affect volume B/C status +[ ] action decisions and reason codes remain volume-scoped +[ ] Events are bounded and stable +[ ] cleanup hygiene remains clean +[ ] finished plan records what is now claimed and what remains future work ``` -## Next Formal Product Phase +## Release Position -Recommended next formal phase after v0.5 release close: +If Phase 46 passes, the product can claim that returned replicas are +Kubernetes-visible and safely fenced until reintegration evidence is sufficient. +It still must not claim automatic failback or production rebuild automation +unless an executor phase lands and is separately QA-validated. -```text -Returned-replica rebuild / reintegration productization -``` - -That phase should reuse the v0.5 fact -> judgment -> action -> evidence model: - -- observe returned replica, -- keep it frontend/ACK fenced, -- decide catch-up versus rebuild from frontier facts, -- show progress/status/Events, -- admit it back only after terminal evidence, -- prove multi-volume isolation and no false Ready. - -NVMe ANA parity, failback, backup/restore, Docker adapter, and GPUDirect/cuFile -remain future trains until this lifecycle model is reused successfully for a -real storage recovery action. diff --git a/seaweed-block/internal/docs/product-roadmap.md b/seaweed-block/internal/docs/product-roadmap.md index a3aa4def38..3518905247 100644 --- a/seaweed-block/internal/docs/product-roadmap.md +++ b/seaweed-block/internal/docs/product-roadmap.md @@ -540,21 +540,22 @@ product risk. The recommended order is: Before any finalizer add/remove, prove main-object patch confinement against a real Kubernetes API with admission/RBAC. Only then consider a first bounded mutation. -7. **Phase 43: first real lifecycle mutation.** Active. - Ship only the first bounded mutation: `SwBlockVolume` protection finalizer - add/remove with delete-safety preconditions. Do not include cleanup, rebuild, - failback, backup, or NVMe in the same phase. -8. **Phase 44 candidate: delete lifecycle close gate and Operation Layer v0.5 - release.** - Validate the full user path: install -> PVC -> status -> delete requested -> - blocked/releasable -> finalizer behavior -> cleanup evidence -> support - bundle -> uninstall zero residue. This is the release boundary for the - operation layer. -9. **Productized returned-replica rebuild/reintegration/failback.** +7. **Phase 43: first real lifecycle mutation.** Closed. + Shipped the first bounded mutation: `SwBlockVolume` protection finalizer + add/remove with delete-safety preconditions. It does not include cleanup, + rebuild, failback, backup, or NVMe. +8. **Phase 44: delete lifecycle close gate and Operation Layer v0.5 + candidate.** Closed for code/QA; release skipped for now. + Validated the full user path: install -> PVC -> status -> delete requested + -> blocked/releasable -> finalizer behavior -> cleanup evidence -> support + bundle -> uninstall zero residue. Matching release images and pinned-image + smoke remain required before marking v0.5 released. +9. **Phase 46: returned-replica rebuild/reintegration productization.** Active. High product value. The engine/transport has rebuild and returned-replica safety pieces; the remaining work is productization through the lifecycle action model: live facts, judgment, action owner, fencing, status, Events, - and multi-volume QA gates. + and multi-volume QA gates. Initial scope is status/decision productization, + not automatic failback or broad rebuild execution. 10. **Backup/snapshot/restore and NVMe ANA parity.** Important, but they should reuse the status/action model rather than create another isolated control plane. @@ -575,7 +576,9 @@ Approximate engineering effort if scope remains tight: - Productized returned-replica rebuild/reintegration/failback: high. The low-level rebuild/recovery pieces exist, but shipping it as a product feature requires lifecycle ownership, authority/fencing status, returned-replica state - projection, and long-running multi-volume failure gates. + projection, and long-running multi-volume failure gates. Phase 46 starts with + status/decision productization; executor-enabled rebuild/failback remains a + later decision. - Backup/snapshot/restore: high. Requires durable data semantics and user-facing restore guarantees. - NVMe ANA parity: medium/high. Protocol-specific work, but cheaper if it uses @@ -610,18 +613,24 @@ Approximate engineering effort if scope remains tight: - Phase 42 Lifecycle Owner API / Admission Gate is closed. It proved the lifecycle-owner main-object patch boundary against a real Kubernetes API/admission surface and preserved the delete-safety decision model. -- Active work is Phase 43 First Bounded Finalizer Mutation. It may add/remove - only the Seaweed Block `SwBlockVolume` protection finalizer, gated by - delete-safety. It must not execute cleanup or mutate PVC/PV/workloads/storage. +- Phase 43 First Bounded Finalizer Mutation is closed. +- Phase 44 Delete Lifecycle Close Gate is closed for code/QA. The team is + intentionally skipping the v0.5 release smoke for now, so v0.5 is not marked + released until matching images and pinned-image validation are completed. +- Active work is Phase 46 Returned-Replica Rebuild / Reintegration + Productization. It should reuse the Operation Layer model to make returned + replicas visible, fenced, action-gated, and QA-verifiable before any automatic + rebuild/failback executor is enabled. - Phase 41-44 are the Operation Layer v0.5 release train: lifecycle-owner foundation, real API/admission proof, first bounded finalizer mutation, and - delete lifecycle close gate/release. + delete lifecycle close gate. - The release-train contract is `internal/docs/ref/operation-layer-v0.5-release-train.md`; the Phase 42 gate draft is `internal/docs/ref/phase42-lifecycle-owner-api-admission-gate.md`. -- Do not start NVMe ANA parity, rebuild/failback, backup/restore, or mutating - recovery workflows by extending Phase 41. Pick those as separate gated phases - after the Operation Layer v0.5 train closes. +- Do not start NVMe ANA parity, backup/restore, or broad mutating recovery + workflows by extending the Operation Layer. Phase 46 is the separate gated + rebuild/reintegration productization phase; keep its first slice focused on + returned-replica facts, fencing, decisions, status, and QA evidence. - When the current plan closes, move it to `internal/docs/finished-plans/` with a phase/topic filename such as `phase1_finishedplan_frontend_protocol_readiness.md`.