* docs(protocol): track epoch/fencing gaps G1-G5
Opens a TODO for five fencing gaps found while reviewing the epoch
protocol at b1ff581. G1-G3 are confirmed by reading the code (replica
floor in memory only, new primary does not fence its own listener,
production promotion runs without a required ACK frontier). G4 is a
design decision (no primary lease). G5 needs a test first (caught-up
check has no epoch). Each item has the failure scenario, the proposed
fix, and the red test to write first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(protocol): record the G4 decision (option A, non-claim for alpha/beta)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
3.5 KiB
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.fencing-gaps-todo.mdtracks open epoch / fencing gaps G1-G5 with the failure scenario, proposed fix, and red test for each.
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.