Protocol Design And Hardening
This directory is the working protocol-design entry point for Seaweed Block.
The goal is not to create a large abstract architecture library. The goal is to keep product behavior explainable and testable as the Kubernetes, CSI, host path, failover, repair, and dashboard surfaces grow.
Source Lineage
This directory distills the V3 design references under:
C:\work\seaweedfs\sw-block\design\v3-architecture.mdC:\work\seaweedfs\sw-block\design\v3-runtime-state-machines-overview.mdC:\work\seaweedfs\sw-block\design\v3-invariant-ledger.mdC:\work\seaweedfs\sw-block\design\protocol-anti-patterns.mdC:\work\seaweedfs\sw-block\design\v3-recovery-algorithm-consensus.md
Those documents remain the deeper historical source. The files here are the current-product operating copy for v0.3+ planning.
Design Thesis
Seaweed Block should use:
one product read model centered on ManagedVolume
+ many local projection controllers / small automata
+ invariant ledger
+ anti-pattern guardrails
+ cross-controller model tests
Do not build one giant state machine. Do not scatter unrelated local state machines. The product needs a shared volume-centered fact model and small engines that project from it.
Documents
control-model-principles.mddefines the truth-domain model and the rules for large context plus small automata.managed-volume-operations-model.mddefines the Phase 22 center of gravity: a PVC-backedManagedVolumeread model that composes K8s, CSI, authority, replica, host-path, workload, and evidence facts.engine-design-guidelines.mddefines the reusable engine/control-plane method: facts, context, multi-state projections, invariant checks, action contracts, executor boundaries, and evidence.invariant-ledger.mdstarts the current-project invariant ledger. Any new protocol claim should add or update a row here.protocol-anti-patterns.mdcopies the important anti-patterns into the current project vocabulary.phase22-control-context-plan.mdproposes the next hardening phase: ManagedVolume Operations Model.operations-state-dependency-review.mddefines the Phase 22 scope decision: operations v1 over a real product read model, not a pure dashboard pass or narrow protocol refactor.control-structure-effectiveness-review.mdreviews which parts of the control/model work have become real product capability, which remain too semantic, and what proof is required before approving more model work.
Review Rule
Any behavior change that affects authority, recovery, CSI attach, host path, Kubernetes node behavior, or support evidence should answer:
- Which truth domain owns the new fact?
- Which invariant proves the behavior?
- Which anti-pattern did we check against?
- Is this a projection, or does it create authority?
- Does a cross-controller model test cover the composed state?
- Does the behavior update the
ManagedVolumestory for PVC, replica, frontend, CSI, host path, recovery, or evidence?
If the answers are unclear, update the protocol docs before shipping the behavior.