runner: fault injectors and attrition regimes are silently dropped when chaos_duration is unset
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
Research direction
Start with SimulationBuilder::run, then read collect_fault_injectors in crates/moonpool-sim/src/runner/builder.rs:1216 and start_fault_injectors in crates/moonpool-sim/src/runner/orchestrator.rs:915. Done means runs with attritions or fault_factories but no chaos_duration return an error, and the fault_factory doc comment states the requirement.
Written by the indexing model from the issue text.
Description
Found during the pre-release source audit of 8d9e779 (read-only, nothing compiled or run). Severity: high. Status: confirmed.
Where
crates/moonpool-sim/src/runner/orchestrator.rs:915(start_fault_injectors)crates/moonpool-sim/src/runner/builder.rs:1216(collect_fault_injectors)
What
collect_fault_injectors builds one injector per fault_factory and one AttritionInjector per Chaos::Attrition entry. start_fault_injectors then returns an empty handle list when chaos_duration is None, dropping every injector unrun. No warning, no assertion. Network and storage chaos still apply because they are configuration on SimWorld, so the run visibly injects faults while attrition and every custom injector do nothing. fault_factory's doc comment never mentions the requirement.
Failure scenario
.enable_chaos([Chaos::Network(ChaosMode::Swarm), Chaos::Attrition { .. }]) without .chaos_duration(..): network faults fire, zero reboots happen, the campaign reports 100% success.
Decision (taken)
Fail run() with an error. The no-backward-compatibility policy covers callers relying on the silent drop.
Proposed fix
In SimulationBuilder::run, return an error when attritions or fault_factories is non-empty and chaos_duration is None. Mention the requirement in the fault_factory doc.
- Dominant language
- Rust
- Stars
- 49
- Forks
- 3
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 41
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PierreZ/moonpool
-
bug simulation
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
bug github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
bug simulation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug simulation
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
documentation release-blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
All issues in PierreZ/moonpool
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100