test(content): assert transition notes via markers, not quick_context

Three integration tests still asserted the old quick_context soup format for
completion_notes / escalation_notes — update them to read the new
orchestration_markers transition_note (the source moved in the prior commit).
This commit is contained in:
Renn F
2026-06-21 08:14:55 +02:00
parent 3a67fa4a0f
commit 2aa00ca124
2 changed files with 14 additions and 3 deletions
+8 -2
View File
@@ -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:<text>` 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"
# ---------------------------------------------------------------------------
@@ -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"
)
# ---------------------------------------------------------------------------