examples: maze and dungeon explore cannot detect an exploration regression, and slot-table overflow never fails a binary

Open
#263 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
ci-cd, testing

Research direction

Start with maze_explore.rs and dungeon_explore.rs, then compare their exit checks with frontier_explore.rs. Trace dropped_allocations from crates/moonpool-sim/src/chaos/assertions.rs:270 through runner/metrics.rs:54 and inspect the example binaries named in the issue. Done means exploration regressions and run-level assertion failures make the relevant binaries fail instead of exiting successfully.

Written by the indexing model from the issue text.

Description

bug simulation

Found during the pre-release source audit of 8d9e779 (read-only, nothing compiled or run). Severity: medium. Status: confirmed.

Part 1: explore binaries only assert that one timeline ran

crates/moonpool-sim-examples/src/bin/sim/maze_explore.rs:26 and dungeon_explore.rs:28 are planted-bug simulations, so they correctly do not gate on seeds_failing, but their only exit criterion is exploration.total_timelines != 0. An exploration that expands one level and stalls, or never reaches the planted bug, still exits 0 and the maze-explore / dungeon-explore CI jobs stay green. Contrast crates/moonpool-explorer/src/bin/sim/frontier_explore.rs:43, which checks a depth watermark, a worker bound, a run budget and recipe replay.

Fix: assert exploration.bugs_found > 0 (or a floor / lock-depth watermark from bucket_summaries) in both binaries.

Part 2: run-level violations never reach seeds_failing

dropped_allocations becomes an entry in report.assertion_violations (crates/moonpool-sim/src/chaos/assertions.rs:270) but never sets the per-iteration ALWAYS_VIOLATION_COUNT, so record_iteration (runner/metrics.rs:54) never sees it and seeds_failing stays empty. Every example binary gates process::exit(1) on seeds_failing alone (axum_web.rs, metrics_service.rs, tonic_grpc.rs, topology.rs). A simulation exceeding 512 assertion sites gets partial accounting and a green CI.

Fix: add SimulationReport::is_failure() covering seeds_failing, assertion_violations, dropped_assertion_allocations and (caller's choice) convergence_timeout, and make every example binary use it.

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PierreZ/moonpool

All issues in PierreZ/moonpool

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.