Lock recovery to active solution file and harden validation commands#284
Merged
mmprotest merged 1 commit intoApr 11, 2026
Conversation
c56fe23
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
Description
._active_solution_fileand initialize/reset it inRunner(villani_code/state.py) to track the active solution path.._active_solution_filewhen a focused mutation/verification target is first registered inexecute_tool_with_policy(villani_code/state_tooling.py) and fromrun_verificationwhen appropriate.small_model_tool_guard(villani_code/state_runtime.py) to theactive_solution_file(falling back tofailing_file), blocking deletion/full-rewrite of the active solution path while allowing edits to helper modules and returning compact JSON feedback when blocked._command_has_masking_patterns, classify validation/launch intent with_is_validation_or_launch_command, and extract python entrypoint targets with_extract_command_python_targetinstate_runtime.py, blocking obvious masked validation/launch commands and preventing run/validate pivots to a different entrypoint during recovery.collect_validation_artifacts(villani_code/state_execution.py) so masked commands cannot advance verification.active_solution_filebut hard failures on the active file keep both fields aligned; events includeactive_solution_filewhere relevant.Testing
tests/test_state_tooling_mutation_policy.py,tests/test_state_runtime.py, and newtests/test_state_execution.pycovering active-solution locking, allowed helper edits, parallel-entrypoint blocking, and masked-command handling.pytest -q tests/test_state_tooling_mutation_policy.py tests/test_state_runtime.py tests/test_state_execution.pyproduced53 passed(all targeted tests passed).Codex Task