Skip to content

feat(moonpool-sim): StorageFaultMask, the storage twin of NetworkFaultMask - #290

Closed
PierreZ wants to merge 1 commit into
mainfrom
claude/paros-next-3-issues-2uegt3
Closed

PierreZ wants to merge 1 commit into
mainfrom
claude/paros-next-3-issues-2uegt3

Conversation

@PierreZ

@PierreZ PierreZ commented Oct 3, 2026

Copy link
Copy Markdown
Owner

SimulationBuilder::storage_fault_mask(mask) suppresses chosen storage fault families once the Random/Swarm storage profile and the buggify knobs have been sampled. It consumes no randomness, so draw order, exploration recipes and replay don't change. The default mask keeps every family, so existing builders are unaffected.

The families are Corruption, Eio, Misdirect, PhantomWrite, SyncFailure, ShortTransfer, DirEntryLoss, CrashDamage, Degradation (stall and throttle episodes) and DiskFailure. As with the network mask, it can only suppress a family the sampled profile kept.

Why

paros now runs its journal stores under Chaos::Storage(Swarm) (PierreZ/paros#176). The disk-failure family leaves every later operation on one disk pending forever. That disk returns no error, and no process or workload can read a signal for it (only SimWorld::is_disk_failed knows). So a run whose convergence oracles cannot excuse that node goes red with no protocol bug behind it: 3 of 50 paros smoke seeds. With this mask, paros removes the one family it cannot observe and keeps every other.

Changes

  • StorageFault and StorageFaultMask in storage/config.rs, re-exported at the crate root.
  • SimulationBuilder::storage_fault_mask, applied next to the network mask in build_sim_for_iteration.
  • A unit test that the mask zeroes exactly the families it removes; a doctest.
  • book/src/appendix/03-configuration.md: the builder table row and a Storage fault mask section.

Validation

  • cargo fmt.
  • cargo clippy -p moonpool-sim --all-targets -D warnings, with default features and with --no-default-features.
  • cargo nextest run -p moonpool-sim: 668 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EszMT79EokUXr2obUBHJVo


Generated by Claude Code

…tMask

SimulationBuilder::storage_fault_mask(mask) suppresses chosen storage
fault families after the Random/Swarm storage profile and the buggify
knobs are sampled, consuming no randomness, so draw order, exploration
recipes and replay are unchanged. The default mask keeps every family.

Families: Corruption, Eio, Misdirect, PhantomWrite, SyncFailure,
ShortTransfer, DirEntryLoss, CrashDamage, Degradation (stall and
throttle episodes) and DiskFailure.

Downstream evidence: paros runs its journal stores under
Chaos::Storage(Swarm). The disk-failure family leaves every later
operation on one disk pending forever, with no error and no signal a
process or workload can read, so a run whose convergence oracles cannot
excuse that node goes red with no protocol bug behind it (3 of 50 smoke
seeds). With this mask paros removes the family it cannot observe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EszMT79EokUXr2obUBHJVo
@PierreZ PierreZ closed this Oct 3, 2026
PierreZ pushed a commit that referenced this pull request Oct 5, 2026
…e twin of network_fault_mask

`Chaos::Storage` was all or nothing. A system under test can be honestly
out of contract for a family: a replicated log on a local journal cannot
survive a phantom write dropping both writes of an acknowledged append (one
forgotten vote breaks quorum intersection), and a disk that fails for good
needs a watchdog it may not have yet.

`SimulationBuilder::storage_fault_mask(StorageFaultMask::all().without(
StorageFault::PhantomWrite))` works like `NetworkFaultMask`: one
`StorageFault` per family in `StorageConfiguration` (`Corruption`, `Eio`,
`Misdirect`, `PhantomWrite`, `SyncFailure`, `ShortTransfer`,
`DirEntryLoss`, `CrashDamage`, `Degradation`, `DiskFailure`), zeroing the
masked probabilities. It is applied after Random/Swarm sampling and after
`apply_buggify_knobs`, immediately before `set_storage_config`, exactly
where the network mask goes. It consumes no draws, so recipes and replay
are unchanged, and the default mask (`all()`) is inert. A mask only
suppresses: it never revives a family the swarm switched off.

Acceptance (`a_storage_fault_mask_keeps_its_family_out_and_draws_nothing`,
in the builder's tests, where the per-iteration world is built): over 24
seeds of `Chaos::Storage(Swarm)` + `BuggifyKnobs` with `PhantomWrite` (and
`DiskFailure`, which would hang the write load) masked, the rng call count
is identical with and without the mask, the installed world has both
probabilities at zero (while some unmasked seed drew phantom writes), and
a 400-write load records no `PhantomWrite` in
`take_storage_fault_records()`. Dropping the `PhantomWrite` arm from
`apply_to` fails it at seed 2. The book's storage-faults chapter and the
fault reference gain the mask and its field mapping.

Builds on the implementation first drafted in #290.

Closes #292

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Tq9joyAz9Y6ptfKQB1bnnh
PierreZ pushed a commit that referenced this pull request Oct 6, 2026
…e twin of network_fault_mask

`Chaos::Storage` was all or nothing. A system under test can be honestly
out of contract for a family: a replicated log on a local journal cannot
survive a phantom write dropping both writes of an acknowledged append (one
forgotten vote breaks quorum intersection), and a disk that fails for good
needs a watchdog it may not have yet.

`SimulationBuilder::storage_fault_mask(StorageFaultMask::all().without(
StorageFault::PhantomWrite))` works like `NetworkFaultMask`: one
`StorageFault` per family in `StorageConfiguration` (`Corruption`, `Eio`,
`Misdirect`, `PhantomWrite`, `SyncFailure`, `ShortTransfer`,
`DirEntryLoss`, `CrashDamage`, `Degradation`, `DiskFailure`), zeroing the
masked probabilities. It is applied after Random/Swarm sampling and after
`apply_buggify_knobs`, immediately before `set_storage_config`, exactly
where the network mask goes. It consumes no draws, so recipes and replay
are unchanged, and the default mask (`all()`) is inert. A mask only
suppresses: it never revives a family the swarm switched off.

Acceptance (`a_storage_fault_mask_keeps_its_family_out_and_draws_nothing`,
in the builder's tests, where the per-iteration world is built): over 24
seeds of `Chaos::Storage(Swarm)` + `BuggifyKnobs` with `PhantomWrite` (and
`DiskFailure`, which would hang the write load) masked, the rng call count
is identical with and without the mask, the installed world has both
probabilities at zero (while some unmasked seed drew phantom writes), and
a 400-write load records no `PhantomWrite` in
`take_storage_fault_records()`. Dropping the `PhantomWrite` arm from
`apply_to` fails it at seed 2. The book's storage-faults chapter and the
fault reference gain the mask and its field mapping.

Builds on the implementation first drafted in #290.

Closes #292

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Tq9joyAz9Y6ptfKQB1bnnh
PierreZ pushed a commit that referenced this pull request Oct 6, 2026
…e twin of network_fault_mask

`Chaos::Storage` was all or nothing. A system under test can be honestly
out of contract for a family: a replicated log on a local journal cannot
survive a phantom write dropping both writes of an acknowledged append (one
forgotten vote breaks quorum intersection), and a disk that fails for good
needs a watchdog it may not have yet.

`SimulationBuilder::storage_fault_mask(StorageFaultMask::all().without(
StorageFault::PhantomWrite))` works like `NetworkFaultMask`: one
`StorageFault` per family in `StorageConfiguration` (`Corruption`, `Eio`,
`Misdirect`, `PhantomWrite`, `SyncFailure`, `ShortTransfer`,
`DirEntryLoss`, `CrashDamage`, `Degradation`, `DiskFailure`), zeroing the
masked probabilities. It is applied after Random/Swarm sampling and after
`apply_buggify_knobs`, immediately before `set_storage_config`, exactly
where the network mask goes. It consumes no draws, so recipes and replay
are unchanged, and the default mask (`all()`) is inert. A mask only
suppresses: it never revives a family the swarm switched off.

Acceptance (`a_storage_fault_mask_keeps_its_family_out_and_draws_nothing`,
in the builder's tests, where the per-iteration world is built): over 24
seeds of `Chaos::Storage(Swarm)` + `BuggifyKnobs` with `PhantomWrite` (and
`DiskFailure`, which would hang the write load) masked, the rng call count
is identical with and without the mask, the installed world has both
probabilities at zero (while some unmasked seed drew phantom writes), and
a 400-write load records no `PhantomWrite` in
`take_storage_fault_records()`. Dropping the `PhantomWrite` arm from
`apply_to` fails it at seed 2. The book's storage-faults chapter and the
fault reference gain the mask and its field mapping.

Builds on the implementation first drafted in #290.

Closes #292

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Tq9joyAz9Y6ptfKQB1bnnh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants