From eedd4acaf1a1a6b40c57758ea7542d0bdcb5f8a1 Mon Sep 17 00:00:00 2001 From: "duanjialing.777" Date: Mon, 21 Sep 2026 00:38:21 +0800 Subject: [PATCH 1/2] test(steward): align team plan priority conflict Signed-off-by: duanjialing.777 --- tests/test_steward_team_plan_apply.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/test_steward_team_plan_apply.py b/tests/test_steward_team_plan_apply.py index 9c8a3b01d5..18a0a370f6 100644 --- a/tests/test_steward_team_plan_apply.py +++ b/tests/test_steward_team_plan_apply.py @@ -401,22 +401,20 @@ def test_a_confirmed_lane_keeps_the_priority_the_owner_confirmed( assert "[P0] Advance the intake contract" in _todos(project) -def test_a_lane_that_already_declares_a_priority_is_not_relabelled( +def test_a_lane_with_conflicting_priority_declarations_is_refused( tmp_path: Path, ) -> None: - """The plan's own label wins, and re-reading it cannot stack a second one.""" + """A plan cannot silently choose between two conflicting priorities.""" - from loopx.todos import list_goal_todos - - _project, registry_path = _fixture(tmp_path) + project, registry_path = _fixture(tmp_path) proposal = _proposal() proposal["lanes"][0]["first_todo"]["text"] = "[P2] Advance the intake contract" proposal["lanes"][0]["first_todo"]["priority"] = "P0" - _settle(registry_path, proposal) + with pytest.raises(ValueError, match="priority conflicts"): + _settle(registry_path, proposal) - items = list_goal_todos(registry_path=registry_path, goal_id=GOAL_ID)["todos"] - assert items[0]["text"] == "[P2] Advance the intake contract" + assert "loopx:todo " not in _todos(project) def test_the_receipt_retains_each_lanes_acceptance_beside_its_todo( From f5c8e9433fa087700cd936ba643127689847d67f Mon Sep 17 00:00:00 2001 From: huangruiteng <14976749+huangruiteng@users.noreply.github.com> Date: Mon, 21 Sep 2026 00:21:51 +0800 Subject: [PATCH 2/2] test(coordination): align canonical todo priority display Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com> (cherry picked from commit 40770d1b0c09a9bff40bdaba1eab62e5ecce899f) --- .../test_local_coordination_authority.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/control_plane/test_local_coordination_authority.py b/tests/control_plane/test_local_coordination_authority.py index a5a6962a03..1b12abd3d7 100644 --- a/tests/control_plane/test_local_coordination_authority.py +++ b/tests/control_plane/test_local_coordination_authority.py @@ -2010,8 +2010,9 @@ def test_real_canonical_provider_preserves_complete_complex_todo_semantics( assert by_id["todo_successor"]["completion_continuation"] == "no_followup" assert result["authority_read"]["todo_read_model"]["todo_count"] == 3 - # The public compatibility CLI must retain claim-neutral text correction - # after promotion; it must not reconstruct or write the Markdown source. + # The public compatibility CLI must retain a claim-neutral text correction + # and the existing structured priority after promotion; it must not + # reconstruct or write the Markdown source. correction_command = [ sys.executable, "-m", @@ -2039,7 +2040,7 @@ def test_real_canonical_provider_preserves_complete_complex_todo_semantics( corrected_item = next( item for item in corrected["todos"] if item["todo_id"] == "todo_claimable" ) - assert corrected_item["text"] == "Corrected before claiming" + assert corrected_item["text"] == "[P0] Corrected before claiming" assert not corrected_item.get("claimed_by") assert corrected_item["last_actor_agent_id"] == "agent-b" assert not state_file.exists() @@ -2056,7 +2057,7 @@ def test_real_canonical_provider_preserves_complete_complex_todo_semantics( item for item in noted["todos"] if item["todo_id"] == "todo_claimable" ) assert noted_item["note"] == "Correction context" - assert noted_item["text"] == "Corrected before claiming" + assert noted_item["text"] == "[P0] Corrected before claiming" assert not noted_item.get("claimed_by") assert not state_file.exists() @@ -2261,7 +2262,8 @@ def test_real_canonical_provider_preserves_complete_complex_todo_semantics( edited_by_id = {item["todo_id"]: item for item in after_edit["todos"]} assert edited_by_id["todo_claimable"] == { **claimed_item, - "text": "Edit provider-owned work", + "text": "[P0] Edit provider-owned work", + "title": "Edit provider-owned work", "note": "compatibility edit", "last_actor_agent_id": "agent-a", "updated_at": edited_by_id["todo_claimable"]["updated_at"],