Skip to content

fix: advance supplied promotion readiness state#462

Merged
ozand merged 1 commit into
mainfrom
fix/issue-461-ready-readiness-state
May 2, 2026
Merged

fix: advance supplied promotion readiness state#462
ozand merged 1 commit into
mainfrom
fix/issue-461-ready-readiness-state

Conversation

@ozand
Copy link
Copy Markdown
Owner

@ozand ozand commented May 2, 2026

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 to not_ready_for_policy_review / blocked_not_ready.

This change makes the runtime writer preserve the supplied-readiness state consistently:

  • if supply_missing_promotion_readiness_inputs() returns ready_for_policy_review, persist top-level review_status and decision as ready_for_policy_review
  • keep decision_record=pending_operator_review_packet and accepted_record=null
  • set governance_packet.review_packet_status=pending_operator_review
  • teach runtime-state replay to classify ready_for_policy_review as a pending review state rather than blocked/not_accepted

Root cause

nanobot/runtime/coordinator.py called supply_missing_promotion_readiness_inputs(), but the surrounding not-ready branch then clobbered the ready result with hardcoded blocked values:

  • decision_record=blocked_not_ready
  • accepted_record=not_created_not_ready
  • governance_packet.review_packet_status=blocked_not_ready
  • stale top-level report/outbox review_status / decision

Test plan

RED before fix:

  • python3 -m pytest tests/test_runtime_coordinator.py::test_cycle_promotes_supplied_readiness_inputs_to_ready_for_policy_review -q
    • failed because report["review_status"] stayed not_ready_for_policy_review
  • python3 -m pytest tests/test_runtime_coordinator.py::test_load_runtime_state_classifies_ready_for_policy_review_as_pending_review -q
    • failed because replay state was blocked

GREEN after fix:

  • python3 -m pytest tests/test_runtime_coordinator.py::test_cycle_promotes_supplied_readiness_inputs_to_ready_for_policy_review -q
    • 1 passed
  • python3 -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 -q
    • 2 passed
  • python3 -m pytest tests/test_runtime_coordinator.py tests/test_promotion_workflow.py -q
    • 70 passed
  • python3 -m pytest tests -q
    • 699 passed, 5 skipped
  • PYTHONPATH=ops/dashboard/src:ops/dashboard python3 -m pytest ops/dashboard/tests -q
    • 165 passed

@ozand ozand merged commit 2998ffa into main May 2, 2026
3 checks passed
@ozand ozand deleted the fix/issue-461-ready-readiness-state branch May 2, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Advance supplied promotion readiness inputs out of stale not-ready state

1 participant