diff --git a/tests/integration/test_task_service_misc.py b/tests/integration/test_task_service_misc.py index a7635bd1..addfc0c7 100644 --- a/tests/integration/test_task_service_misc.py +++ b/tests/integration/test_task_service_misc.py @@ -775,16 +775,22 @@ def test_record_completion_notes_with_existing_context(task_setup: dict) -> None svc = task_setup["svc"] task = MagicMock() task.quick_context = "existing" + task.orchestration_markers = None svc._record_completion_notes(task, "merged successfully") - assert "completion_notes:merged successfully" in task.quick_context + # quick_context (the ResumptionNote slot) is left untouched; the note goes + # to a structured marker, not packed in as `completion_notes:` soup. + assert task.quick_context == "existing" + assert markers.get_transition_note(task, "completion") == "merged successfully" def test_record_completion_notes_no_existing_context(task_setup: dict) -> None: svc = task_setup["svc"] task = MagicMock() task.quick_context = None + task.orchestration_markers = None svc._record_completion_notes(task, "merged") - assert task.quick_context.startswith("completion_notes:") + assert task.quick_context is None + assert markers.get_transition_note(task, "completion") == "merged" # --------------------------------------------------------------------------- diff --git a/tests/integration/test_task_service_transitions.py b/tests/integration/test_task_service_transitions.py index dc46801e..81151cc2 100644 --- a/tests/integration/test_task_service_transitions.py +++ b/tests/integration/test_task_service_transitions.py @@ -20,6 +20,7 @@ from roboco.db.tables import ( ProjectTable, ) from roboco.events import EventType +from roboco.foundation.policy.content import markers from roboco.models import AgentRole, AgentStatus, Team from roboco.models.base import ( BlockerResolverType, @@ -776,7 +777,11 @@ async def test_escalate_to_ceo_advances_status_with_notes( ) assert escalated is not None assert escalated.status == TaskStatus.AWAITING_CEO_APPROVAL - assert "escalation_notes" in (escalated.quick_context or "") + # The escalation note is a structured marker now, not quick_context soup. + assert ( + markers.get_transition_note(escalated, "escalate_to_ceo") + == "needs CEO review for breaking change" + ) # ---------------------------------------------------------------------------