fix: advance supplied promotion readiness state#462
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
Fixes #461.
The live eeepc runtime produced a contradictory promotion candidate: readiness inputs were supplied (
missing_inputs=[],provenance_complete=true,readiness_blocker.state=ready_for_policy_review) but the coordinator rewrote the durable promotion record back tonot_ready_for_policy_review/blocked_not_ready.This change makes the runtime writer preserve the supplied-readiness state consistently:
supply_missing_promotion_readiness_inputs()returnsready_for_policy_review, persist top-levelreview_statusanddecisionasready_for_policy_reviewdecision_record=pending_operator_review_packetandaccepted_record=nullgovernance_packet.review_packet_status=pending_operator_reviewready_for_policy_reviewas a pending review state rather thanblocked/not_acceptedRoot cause
nanobot/runtime/coordinator.pycalledsupply_missing_promotion_readiness_inputs(), but the surrounding not-ready branch then clobbered the ready result with hardcoded blocked values:decision_record=blocked_not_readyaccepted_record=not_created_not_readygovernance_packet.review_packet_status=blocked_not_readyreview_status/decisionTest plan
RED before fix:
python3 -m pytest tests/test_runtime_coordinator.py::test_cycle_promotes_supplied_readiness_inputs_to_ready_for_policy_review -qreport["review_status"]stayednot_ready_for_policy_reviewpython3 -m pytest tests/test_runtime_coordinator.py::test_load_runtime_state_classifies_ready_for_policy_review_as_pending_review -qblockedGREEN after fix:
python3 -m pytest tests/test_runtime_coordinator.py::test_cycle_promotes_supplied_readiness_inputs_to_ready_for_policy_review -qpython3 -m pytest tests/test_runtime_coordinator.py::test_load_runtime_state_classifies_ready_for_policy_review_as_pending_review tests/test_runtime_coordinator.py::test_cycle_promotes_supplied_readiness_inputs_to_ready_for_policy_review -qpython3 -m pytest tests/test_runtime_coordinator.py tests/test_promotion_workflow.py -qpython3 -m pytest tests -qPYTHONPATH=ops/dashboard/src:ops/dashboard python3 -m pytest ops/dashboard/tests -q