Files
seaweedfs/seaweed-block/internal/docs/protocol

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.md
  • C:\work\seaweedfs\sw-block\design\v3-runtime-state-machines-overview.md
  • C:\work\seaweedfs\sw-block\design\v3-invariant-ledger.md
  • C:\work\seaweedfs\sw-block\design\protocol-anti-patterns.md
  • C:\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

Review Rule

Any behavior change that affects authority, recovery, CSI attach, host path, Kubernetes node behavior, or support evidence should answer:

  1. Which truth domain owns the new fact?
  2. Which invariant proves the behavior?
  3. Which anti-pattern did we check against?
  4. Is this a projection, or does it create authority?
  5. Does a cross-controller model test cover the composed state?
  6. Does the behavior update the ManagedVolume story for PVC, replica, frontend, CSI, host path, recovery, or evidence?

If the answers are unclear, update the protocol docs before shipping the behavior.