fix(tla): report a reached Assert(FALSE) in simulation/swarm mode too - #195
Merged
Conversation
The reached-assertion side channel (a reached Assert(FALSE) in a Next action is a safety violation) was only drained by the exhaustive BFS worker. Simulation mode (`--simulate`) uses a separate path — `next_states_swarm` for swarm traces, `next_states` otherwise — and never drained the channel, so a reached Assert(FALSE) during simulation was silently missed. - `next_states_swarm` now enters committed next-state generation (matching `next_states`/`next_states_labeled`) so a reached Assert(FALSE) is recorded, and returns cleanly (no panic) when an assertion is pending. - The simulation loop drains the channel immediately after each next-state generation and records the assertion as a Safety violation, exactly as the BFS worker does. Gate: cargo test --release 1490 passed, 0 failed — adds simulation (plain + swarm) coverage to tests/reached_assertion_violation.rs. diff_tlc 23/23 unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The reached-assertion side channel from #194 (a reached
Assert(FALSE)in aNextaction is a safety violation) was only drained by the exhaustive BFS worker. Simulation mode (--simulate) uses a separate next-state path —next_states_swarmfor swarm traces,next_statesotherwise — and never drained the channel, so a reachedAssert(FALSE)during simulation was silently missed.Change
next_states_swarmnow enters committed next-state generation (matchingnext_states/next_states_labeled), so a reachedAssert(FALSE)is recorded, and returns cleanly (no panic) when an assertion is pending.Closes the item-3 follow-up gap (simulation/swarm did not report reached assertions).
Gate
cargo test --release1490 passed, 0 failed — adds simulation coverage totests/reached_assertion_violation.rs: both the plain path and the swarm path (next_states_swarm) report a reachedAssert(FALSE).scripts/diff_tlc.sh23/23 unchanged.