Align live validation refresh, recovery context, and primary target contract seeding#291
Merged
mmprotest merged 1 commit intoApr 11, 2026
Conversation
90be270
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
(target, cwd)contract that is seeded by evidence and replaceable only by strictly stronger evidence.Description
augment_validation_config_with_live_commands(...)invillani_code/project_memory.pyto persist compact live-observed validation/run commands into.villani/validation.json.villani_code/state_runtime.pywith_suggest_live_validation_commands(...), acceptobserved_commandsinrefresh_live_validation_candidates(...), and call the refresh/augment path from bothrun_verification(...)(successful verification artifacts) and the Bash direct-run branch so observed direct runs seed live validation augmentation.villani_code/state_tooling.pyso write/patch handling only seeds_current_verification_targetswith validation-capable candidate file types and callrefresh_live_validation_candidates(...)with those candidates instead of every touched file.(target, cwd)primary execution contract and evidence ordering (write_only < indirect_validation < direct_validation < direct_run) in_seed_primary_execution_target(...)while allowing strictly stronger evidence to replace earlier seeds.villani_code/context_projection.pyonly when recovery is active, includingprimary_execution_target,primary_execution_cwd,primary_execution_evidence,recovery_mode,failing_target_summary,primary_target_minimally_valid, andswitch_blocked, and render it as a compact single-line contract for model prompts.targetandcwd, and an integration flow for scaffold write → direct run → stronger evidence replacement → recovery context → validation augmentation.Testing
pytest -q tests/test_state_runtime.py::test_model_context_packet_omits_recovery_block_when_not_recovering tests/test_state_runtime.py::test_model_context_packet_includes_compact_live_recovery_contract tests/test_state_runtime.py::test_live_validation_candidates_refresh_after_material_changes tests/test_state_runtime.py::test_single_file_write_seed_is_replaceable_by_stronger_direct_signal tests/test_state_runtime.py::test_primary_target_contract_distinguishes_same_file_different_cwd tests/test_state_runtime.py::test_hard_failure_activation_requires_same_primary_contract tests/test_state_tooling_mutation_policy.py::test_integration_scaffold_then_direct_run_reseeds_primary_and_live_validationand all passed (7 passed).tests/test_state_runtime.py,tests/test_state_tooling_mutation_policy.py, andtests/test_mission_state_runtime.pyand observed83 passedfor the invoked scope; all automated tests in the exercised suites passed.tests/test_state_runtime.pyandtests/test_state_tooling_mutation_policy.py, and no unrelated pre-existing failures were introduced.Codex Task