Add recovery gate: require direct validation of primary target before new executable artifacts are used#287
Merged
mmprotest merged 1 commit intoApr 11, 2026
Conversation
a3bc6eb
into
mmprotest/implement-shell-normalization-for-command-execution
2 checks passed
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.
Motivation
primary_execution_targetand minimal-recovery state are actually reflected in the live mission snapshot used by execution/control, fixing the observed plumbing gap.Description
recovery_mode,primary_execution_target, andprimary_target_minimally_validtoMissionStateand wiring them intoRunner._update_mission_stateandstate_runtimesync APIs._seed_primary_execution_targetand a new_sync_recovery_state_to_missionhelper invillani_code/state_runtime.py._primary_target_minimally_valid = Falseso recovery is explicit.villani_code/state_tooling.py.small_model_tool_guardso, whilerunner._recovery_modeis active, any proposed validation/launch target that is confidently new (created during recovery or absent at failure snapshot) is blocked with structured feedback instead of permitting a switch to a newly introduced executable.primary_execution_targetsucceeds and mark_primary_target_minimally_valid = Truewhen that validation passes.villani_code/mission_state.py,villani_code/state.py,villani_code/state_runtime.py,villani_code/state_tooling.py, and teststests/test_state_runtime.py,tests/test_state_tooling_mutation_policy.py,tests/test_mission_state_runtime.py.Testing
pytest -q tests/test_state_runtime.py tests/test_state_tooling_mutation_policy.py tests/test_mission_state_runtime.py; the run completed successfully with all tests passing (74 passed).primary_execution_target, hard failure setsrecovery_modeand clears minimal-valid flag, recovery blocks creation/use of new validation artifacts, helper edits and bounded patches remain allowed, and mission snapshot reflects the live recovery/primary-target state.Codex Task