fix: scope recovery cycles and gate stage completion#485
Merged
Conversation
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.
Summary
Root cause
PR #483 evaluated recovery only inside the finalize-complete branch, so ordinary
state stage-completecould advance an unrecovered contaminated run. Its recoveryprojection also exposed the absolute latest owner revision before selecting the
latest contamination cycle, allowing an older cycle's stale baselines to leak
into
awaiting_recoveryandrepair_in_progressstates.Authority boundary
recovery_state.pyremains the sole recovery-cycle interpreter.stage_completion.pyconsumes that state as a transaction veto; it does notinfer recovery from raw events or artifacts.
awaiting_recovery,repair_in_progress, and invalid recovery states rejectordinary stage completion before any control-file write.
not_applicableand a validdownstream_rerun_pendingstate remain eligiblefor the existing stage target and artifact checks.
MU-3 isolation
This hotfix is based directly on
mainafter #483. It does not modifyartifact_registry.py,tests/test_runtime_state.py, intake contracts, qualitygates, or materiality selection, so it stays separate from draft #484 / MU-3.
Validation
63 passed2848 passedscripts/check_release_consistency.py --no-tagscripts/check_product_baseline.pyscripts/check_capabilities.pyscripts/check_version_consistency.pygit diff --check