From 6083a7683e208979231b6512c2660c8a759fd055 Mon Sep 17 00:00:00 2001 From: huangruiteng <14976749+huangruiteng@users.noreply.github.com> Date: Thu, 17 Sep 2026 12:22:42 +0800 Subject: [PATCH] test(control-plane): let the blocked-priority smoke read the shipped notice `blocked_priority_fallback` now sets `notify_user: True` when a higher-priority Agent Todo is blocked, or waits on an unsatisfied resume condition, while an executable fallback continues: informing the owner and requiring owner action are different decisions, and only the first one changed. The public smoke still asserted the previous silent default, so `todo-first-open-summary-smoke` has been red on main since that change: assert fallback["notify_user"] is False AssertionError: {... 'notify_user': True, 'requires_user_action': False ...} The smoke now states the shipped contract on both sides of that distinction, which is what makes it worth keeping: `notify_user` is True, the heartbeat recommendation and the interactive user channel both say NOTIFY, the reason and the markdown readback both say no owner action is required, and `requires_user_action` / `action_required` stay False with the fallback still selected and `should_run` still True. A future change that turns the notice into a gate, or drops it back to silence, now fails here. The helper is renamed to `assert_blocked_priority_fallback_notice_visible` so the old default cannot be read back out of the test name. The scheduled future-monitor deferral branch stays a silent deferral and is already pinned by `tests/control_plane/test_blocked_priority_fallback_notice.py`. Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com> --- .../todo-first-open-summary-smoke.py | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/examples/control_plane/todo-first-open-summary-smoke.py b/examples/control_plane/todo-first-open-summary-smoke.py index c0e44b4510..d25700d19a 100644 --- a/examples/control_plane/todo-first-open-summary-smoke.py +++ b/examples/control_plane/todo-first-open-summary-smoke.py @@ -217,7 +217,15 @@ def build_blocked_priority_fallback_status_payload() -> dict: } -def assert_blocked_priority_fallback_visible() -> None: +def assert_blocked_priority_fallback_notice_visible() -> None: + """A blocked higher-priority todo is announced, but it never gates delivery. + + Informing the owner and requiring owner action are different decisions, and + only the first one changed: the fallback still runs, `requires_user_action` + and the interactive user channel's `action_required` stay false, and the + markdown readback says the notice instead of the old silent default. + """ + decision = build_quota_should_run( build_blocked_priority_fallback_status_payload(), goal_id=GOAL_ID, @@ -225,16 +233,18 @@ def assert_blocked_priority_fallback_visible() -> None: ) assert decision["should_run"] is True, decision fallback = decision["blocked_priority_fallback"] - assert fallback["notify_user"] is False, fallback + assert fallback["notify_user"] is True, fallback assert fallback["requires_user_action"] is False, fallback assert fallback["blocked_items"][0]["text"] == BLOCKED_CORE_TODO, fallback assert fallback["selected_executable"]["text"] == FALLBACK_TODO, fallback - assert decision["heartbeat_recommendation"]["notify"] == "DONT_NOTIFY", decision + assert decision["heartbeat_recommendation"]["notify"] == "NOTIFY", decision user_channel = decision["interaction_contract"]["user_channel"] assert user_channel["action_required"] is False, user_channel - assert user_channel["notify"] == "DONT_NOTIFY", user_channel + assert user_channel["notify"] == "NOTIFY", user_channel + assert "no owner action is required" in user_channel["reason"], user_channel markdown = render_quota_should_run_markdown(decision) - assert "blocked_priority_fallback: notify_user=False" in markdown, markdown + assert "blocked_priority_fallback: notify_user=True" in markdown, markdown + assert "no owner action is required" in markdown, markdown assert f"blocked_priority_item[1]: {BLOCKED_CORE_TODO}" in markdown, markdown assert f"blocked_priority_selected: {FALLBACK_TODO}" in markdown, markdown @@ -788,7 +798,7 @@ def main() -> int: ], packet assert f"Agent 待办:{APPENDED_P0_TODO}" in packet["project_agent_handoff"], packet assert f"Agent 待办候选 2:{OPEN_TODO}" in packet["project_agent_handoff"], packet - assert_blocked_priority_fallback_visible() + assert_blocked_priority_fallback_notice_visible() assert_claimed_frontstage_lanes_visible() assert_project_asset_claimed_counts_use_lane_fallback() assert_claimed_markdown_todos_survive_visibility_lanes()