mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
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:
@@ -775,16 +775,22 @@ def test_record_completion_notes_with_existing_context(task_setup: dict) -> None
|
|||||||
svc = task_setup["svc"]
|
svc = task_setup["svc"]
|
||||||
task = MagicMock()
|
task = MagicMock()
|
||||||
task.quick_context = "existing"
|
task.quick_context = "existing"
|
||||||
|
task.orchestration_markers = None
|
||||||
svc._record_completion_notes(task, "merged successfully")
|
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:
|
def test_record_completion_notes_no_existing_context(task_setup: dict) -> None:
|
||||||
svc = task_setup["svc"]
|
svc = task_setup["svc"]
|
||||||
task = MagicMock()
|
task = MagicMock()
|
||||||
task.quick_context = None
|
task.quick_context = None
|
||||||
|
task.orchestration_markers = None
|
||||||
svc._record_completion_notes(task, "merged")
|
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,
|
ProjectTable,
|
||||||
)
|
)
|
||||||
from roboco.events import EventType
|
from roboco.events import EventType
|
||||||
|
from roboco.foundation.policy.content import markers
|
||||||
from roboco.models import AgentRole, AgentStatus, Team
|
from roboco.models import AgentRole, AgentStatus, Team
|
||||||
from roboco.models.base import (
|
from roboco.models.base import (
|
||||||
BlockerResolverType,
|
BlockerResolverType,
|
||||||
@@ -776,7 +777,11 @@ async def test_escalate_to_ceo_advances_status_with_notes(
|
|||||||
)
|
)
|
||||||
assert escalated is not None
|
assert escalated is not None
|
||||||
assert escalated.status == TaskStatus.AWAITING_CEO_APPROVAL
|
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"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user