feat(investigation): preserve cumulative reference graphs
Accumulate investigation paths and preserve failed attempts across rounds. Keep graph annotations separate from execution state, synchronize the API contract, and consolidate documentation.
This commit is contained in:
@@ -314,12 +314,13 @@ async def test_progress_can_publish_without_conclusion_and_replaces_the_complete
|
||||
updated = await service.publish_artifacts(task["task_id"], replacement)
|
||||
assert updated.progress_revision == 2
|
||||
assert [node.node_id for node in updated.task.latest_progress.progress.diagram.node_refs] == ["other"]
|
||||
cleared = await service.publish_artifacts(task["task_id"], AgentArtifactsCommand(
|
||||
retained = await service.publish_artifacts(task["task_id"], AgentArtifactsCommand(
|
||||
request_id=uuid4(), source_session_id="session-1", run_id=repository.run["run_id"],
|
||||
progress={"summary": "当前不需要图示。", "diagram": None},
|
||||
progress={"summary": "补充本轮说明。", "diagram": None},
|
||||
))
|
||||
assert cleared.progress_revision == 3
|
||||
assert cleared.task.latest_progress.progress.diagram is None
|
||||
assert retained.progress_revision == 3
|
||||
assert retained.task.latest_progress.progress.diagram.mermaid == updated.task.latest_progress.progress.diagram.mermaid
|
||||
assert retained.task.latest_progress.progress.diagram.edges == []
|
||||
assert not repository.notifications
|
||||
|
||||
|
||||
@@ -1318,7 +1319,7 @@ async def test_final_report_archives_its_progress_diagram_across_new_rounds():
|
||||
)
|
||||
await service.publish_artifacts(task["task_id"], command)
|
||||
assert repository.reports[-1]["report"]["diagram"]["title"] == "调查过程"
|
||||
assert repository.reports[-1]["report"]["diagram"]["node_refs"][0]["status"] == "running"
|
||||
assert repository.reports[-1]["report"]["diagram"]["node_refs"][0]["status"] == "reference"
|
||||
assert command.report.diagram is None # Do not change the idempotency request.
|
||||
repository.task["execution_generation"] = 2
|
||||
detail = await service.detail(task["task_id"])
|
||||
|
||||
Reference in New Issue
Block a user