fix: treat ready promotions as awaiting review#464
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 #463.
After #461 / #462, the runtime correctly emits ready promotion candidates as pending operator review:
status=ready_for_policy_reviewdecision_record=pending_operator_review_packetaccepted_record=nullgovernance_packet.review_packet_status=pending_operator_reviewDashboard/Mission Control still treated
accepted_record=nullas a promotion lifecycle blocker, producingBlocked: accepted_record. That is wrong for a pending-review candidate because no accepted record exists until the policy/operator accepts it.This change teaches the dashboard promotion replay classifier that
ready_for_policy_review/pending_operator_review_packetis an awaiting-review state, not a blocked state.Test plan
RED before fix:
PYTHONPATH=ops/dashboard/src:ops/dashboard python3 -m pytest ops/dashboard/tests/test_dashboard_truth_audit_gaps.py::test_api_system_does_not_block_ready_promotion_awaiting_policy_review -qreadiness['state'] == 'blocked'GREEN after fix:
PYTHONPATH=ops/dashboard/src:ops/dashboard python3 -m pytest ops/dashboard/tests/test_dashboard_truth_audit_gaps.py::test_api_system_does_not_block_ready_promotion_awaiting_policy_review ops/dashboard/tests/test_dashboard_truth_audit_gaps.py::test_api_system_promotes_stuck_promotion_lifecycle_to_autonomy_verdict ops/dashboard/tests/test_dashboard_truth_audit_gaps.py::test_api_system_does_not_block_explicitly_not_ready_promotion -q3 passedPYTHONPATH=ops/dashboard/src:ops/dashboard python3 -m pytest ops/dashboard/tests -q166 passedpython3 -m pytest tests -q699 passed, 5 skipped