diff --git a/tests/control_plane/test_heartbeat_registry_route.py b/tests/control_plane/test_heartbeat_registry_route.py index 24b14a030f..a8333a105d 100644 --- a/tests/control_plane/test_heartbeat_registry_route.py +++ b/tests/control_plane/test_heartbeat_registry_route.py @@ -120,7 +120,12 @@ def test_cli_generated_guard_selection_and_settlement_ignore_conflicting_cwd_reg code, guard = _execute(shlex.split(selection.replace("{todo_id}", cli.TODO_ID))[1:], project) assert code == 0, guard assert guard["selected_todo"]["todo_id"] == cli.TODO_ID - assert any(read["kind"] == "agent_preferences" for read in guard["required_reads"]) + work_context = guard["interaction_contract"]["agent_channel"]["work_context"] + preference = next(source for source in work_context["sources"] + if source.get("kind") == "agent_preferences") + assert preference["content"]["current"]["items"][0]["statement"] == "Use the designated reviewer." + assert not any(read.get("kind") == "agent_preferences" + for read in guard["interaction_contract"]["agent_channel"]["required_reads"]) identity = guard["heartbeat_receipt"]["settlement_identity"] # A later no-argument reentry must retain the original choice and authority. code, guard = _execute(guard_argv, project) diff --git a/tests/test_quota_bound_wait_recovery.py b/tests/test_quota_bound_wait_recovery.py index af95dcbf5f..cffa2bc893 100644 --- a/tests/test_quota_bound_wait_recovery.py +++ b/tests/test_quota_bound_wait_recovery.py @@ -152,7 +152,7 @@ def cli(*args: str, cwd: Path = project) -> tuple[int, dict]: assert rc == 0 and guard["should_run"] is True, guard rc, original = cli("todo", "list", "--goal-id", GOAL_ID, "--todo-id", TODO_ID) assert rc == 0, original - digest = original["todos"][0]["completion_validation_sha256"] + digest = original["todo"]["completion_validation_sha256"] rc, wait = cli( "todo", "update", @@ -273,7 +273,7 @@ def cli(*args: str, cwd: Path = project) -> tuple[int, dict]: assert _spend_run_count(runtime) == 0 rc, after = cli("todo", "list", "--goal-id", GOAL_ID, "--todo-id", TODO_ID) assert rc == 0, after - todo = after["todos"][0] + todo = after["todo"] assert todo["status"] == "open" and todo["resume_ready"] is False assert todo["resume_when"] == f"{kind}:{MONITOR_ID}" assert todo["completion_validation_sha256"] == digest