Commit Graph
24 Commits
Author SHA1 Message Date
pingqiu 3eda912af8 fix: scope upload pacing and degraded cut admission honestly 2026-11-20 02:41:45 -08:00
pingqiu 586be4a6b4 test: model atomic pool initialization and interrupted publishers 2026-11-20 00:09:40 -08:00
pingqiu ce691a9e1b docs: bind host cut admission to lifecycle invariants and bounded model 2026-11-19 22:57:17 -08:00
pingqiu bc73b9920a storage: let local reads re-resolve across flushing without pinning WAL 2026-11-19 20:16:35 -08:00
pingqiu 2717e4ec69 storage: bind chunk capture and flush contracts to the local borrow lifetime 2026-11-19 20:16:35 -08:00
pingqiu 0c02f20eac storage: document adaptive staging contracts and exercise steady hot writes 2026-11-19 20:16:34 -08:00
pingqiu e94aac6faf storage: document streamed cut ownership and cover held remote saves 2026-11-19 20:16:34 -08:00
pingqiu 8e42479b77 docs: place payload resource contract in the invariant ledger 2026-11-19 20:16:34 -08:00
pingqiu 41b6783a95 docs: integrate local reclaim liveness model and mutant configs 2026-11-18 19:40:20 -08:00
pingqiu 761882ba82 Merge native WAL admission fixes into COW cut branch 2026-11-18 17:13:37 -08:00
pingqiu cd6dff4f67 storage: copy native chunk cut images outside the write barrier
Fix H and candidates under the short barrier; save pending chunks before mutation.
Drain owners and waiters before cleanup, recovery, reset and close. Preserve
intent/CAS and local durability contracts. Include native caller controls,
existing model correspondence and a real-mount rehearsal note.
2026-11-18 12:05:39 -08:00
pingqiuandClaude Opus 5.5 83eb3d3d93 storage: end-to-end v3 test of the wrap/forged-replay scenario; spec open items 1-2 resolved in v3
TestWALStoreV3StaleLapBytesAtTheWrapAreNotReplayed replays the forged
replay reproduction (docs/spec/README.md, open item 2) end to end on a
mapped v3 WALStore: a guest batch in lap 1 carries a well-formed record
bound to the volume's own nonce at its lap-1 cursor (LSN 999, LBA 7); the
WAL wraps so one newer record overwrites only the batch's start and the
lap-2 scan resumes exactly at the embedded record. The cursor binding
stops the scan there; after a crash and reopen the frontier is the newest
real LSN and LBA 7 is never the forged data. With the lap dropped from the
cursor check the scan admits the record and the test fails.

README: open items 1 (corrupted synced records) and 2 (forged replay) move
to "resolved in v3 (code)", citing the v3 tests. Still open: the mode C
newest-batch residual (silent truncation until an idle refresh or
SetWMode(A)) and the TLA model, which has no nonce/cursor/lap binding
(S3v1_root_lww_I1 and S3f_* rerun on cc5cf09a with TLC 2.19: unchanged).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 11:18:58 -08:00
Ping Qiu 56af794492 Merge pull request #197 from seaweedfs/feat/walstore-format-v3
storage: walstore format bump v3 (#51, #189)
2026-11-18 08:07:17 -08:00
Ping Qiu 4644a3400c Merge pull request #209 from seaweedfs/fix/workspace-lease-horizon
workspace: answer lease renewals from memory under a durable horizon (#205)
2026-11-18 07:46:41 -08:00
pingqiuandClaude Opus 5.5 6f5710a11b spec(workspace): record the WorkspaceTakeover rerun for the durable horizon (#205)
All 27 W4_*/RED_* configurations re-run against the model at 7dd83eb6
(TLC 2.19, BFS): existing passes still pass, the new horizon
configurations pass with failing extension writes and a restart,
RED_hz_noclamp violates HostWithinHorizon as expected, the existing REDs
and witnesses keep their verdicts, the two large and the two "both"
configurations reached their time limits with no violation, and the two
open findings (W4_drift, W4_forced_exact) are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 07:12:54 -08:00
pingqiuandClaude Opus 5.5 7dd83eb6c0 spec(workspace): model the durable lease horizon in WorkspaceTakeover (#205)
lease.exp is now the published horizon, dhz the horizon on disk and
deadline the latest grant. A renewal of a live lease writes nothing:
grant = min(now + TTL, horizon), refused while uncertain or without
validity, and it may trigger an extension. The extension (MasterExtend)
is an ordinary serialized writer that raises the horizon to
trigger + TTL + HSlack; with ExtFail its write may fail without landing or
after landing, and either way latches uncertain. Revocation, ACK and move
writes are refused while uncertain; a restart reloads the disk horizon and
clears uncertainty. The revoking drain reply is clamped to
min(horizon, deadline). Nondecreasing time is stated as a model assumption.

New invariants HostWithinHorizon and DiskCoversMemory; witnesses
W_NoExtension, W_NoExtLanded, W_NoUncertain. New cfgs W4_hz_* (failing
extensions, clean/forced/both, one restart) and RED_hz_noclamp (no clamp:
EXPECTED to violate HostWithinHorizon) with the control
RED_hz_noclamp_safety (no clamp, split-brain invariants: expected to pass,
the restart rule covers grants). Existing cfgs gain Clamp = TRUE and
ExtFail = FALSE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 05:28:45 -08:00
pingqiu a81bca4926 feat(storage): activate mapped v3 through the production storage callers 2026-11-18 03:49:47 -08:00
pingqiuandClaude Opus 5.5 4408dd8ee1 docs: propose copy-before-write for the cut window, with its TLA+ model
The cut copies every candidate chunk under the capture barrier, so writes
stall for the whole copy (1.50 s at 3 GiB dirty in a lab measurement).
agent-workspace-design.md section 5 now has a proposed (not implemented)
copy-before-write design: the barrier only fixes H and the candidate set;
the first write to an uncopied candidate saves its at-H content to a local
side store; a write to a chunk being copied waits; the copier reads the side
store or the live chunk; the side store is dropped at the CAS and on crash,
and recovery never reads it. Alternatives, the open BASE-install point, and
the tests to write with the code are listed. Section 14's cut-cost gap
points at it.

docs/spec/CutCOW.tla (S4c) models today's barrier cut and the design, with a
two-step chunk copy and one crash. Both pass exhaustively at MaxLSN 6 with 2
cuts (COW 34,342,214 states, barrier 5,070,320). Each of the six design rules
is necessary: dropping any one violates BufFrozen. 11 configs, run.sh and
the spec README updated; all 13 specs pass SANY with tla2tools 1.7.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 22:02:53 -08:00
pingqiu dc6e94e4cd docs: bound dark map publication claims before real lifecycle wiring 2026-11-17 02:58:28 -08:00
pingqiu 82263a5930 test: pin descriptor LSN floor and document the physical-order guard 2026-11-17 02:46:55 -08:00
pingqiu d2a778f849 storage: persist dark v3 chunk LSN maps as owned immutable COW generations 2026-11-17 02:22:32 -08:00
pingqiu f3cccff9cc docs: bind dark v3 writer scan guards and proof scope to invariant ledger 2026-11-17 02:04:15 -08:00
pingqiu 26f4cb77eb storage: add dark impl-3 record codec and byte contract tests 2026-11-17 01:33:31 -08:00
pingqiuandClaude Opus 5.5 cd16a2a90b docs/spec: add TLA+ models of the volume lifecycle, takeover, WAL recovery, cut pipeline and GC timing
docs/spec/ holds 12 TLA+ models of the block protocols with their TLC
configurations (cfg/, 199 files: designs, RED configs that remove one guard
and must produce a counterexample, and reachability witnesses), run.sh to
check one configuration, and a README: how to run TLC, one row per spec
(invariants, results, the code it maps to), limits, the findings that led
to #152, #156, #158 and #159, and the open model-level items.

Docs only; nothing runs in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 11:55:16 -08:00