Merge remote-tracking branch 'gitea/main' into codex/delivery-workbench-release-20260626-ffsync

This commit is contained in:
ogt
2026-06-26 23:57:36 +08:00
6 changed files with 127 additions and 3 deletions

View File

@@ -61,6 +61,23 @@ from src.services.platform_operator_service import (
)
def test_repair_candidate_promotion_summary_marks_controlled_runtime() -> None:
summary = platform_operator_service._repair_candidate_promotion_summary({
"route_id": "ansible:188-ai-web",
"ready_count": 11,
"total_count": 11,
"blocked_count": 0,
"status": "controlled_apply_auto_authorized",
"runtime_execution_authorized": True,
"runtime_write_allowed": True,
})
assert summary == (
"route=ansible:188-ai-web; promotion=11/11; "
"blocked=0; status=controlled_apply_auto_authorized; runtime=controlled"
)
def test_outbound_timeline_title_labels_runbook_review() -> None:
title = _outbound_timeline_title(
"telegram",

View File

@@ -361,6 +361,7 @@ async def test_candidate_blocked_observe_only_prompts_repair_playbook_draft() ->
assert promotion_contract["runtime_write_allowed"] is False
assert result.metadata["repair_candidate_promotion_contract"] == promotion_contract
assert "promotion=6/11" in result.metadata["repair_candidate_promotion_summary"]
assert "runtime=false" in result.metadata["repair_candidate_promotion_summary"]
work_item = draft_package["awooop_work_item"]
assert work_item["status"] == "owner_review_ready"
assert work_item["next_action"] == "owner_review_repair_candidate_draft"
@@ -375,6 +376,25 @@ async def test_candidate_blocked_observe_only_prompts_repair_playbook_draft() ->
assert work_item["coverage_gap"]["next_owner_lane"] == "promote_diagnostic_to_repair_playbook"
def test_promotion_summary_marks_controlled_runtime_when_apply_gate_passes() -> None:
service = RepairCandidateService()
summary = service._promotion_summary_for_operator({
"route_id": "ansible:188-ai-web",
"ready_count": 11,
"total_count": 11,
"blocked_count": 0,
"status": "controlled_apply_auto_authorized",
"runtime_execution_authorized": True,
"runtime_write_allowed": True,
})
assert summary == (
"route=ansible:188-ai-web; promotion=11/11; "
"blocked=0; status=controlled_apply_auto_authorized; runtime=controlled"
)
@pytest.mark.asyncio
async def test_postgres_slow_query_gap_prefills_database_owner_review_not_restart() -> None:
incident = _incident()