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:
@@ -28,7 +28,7 @@ def test_waiting_and_unknown_node_states_survive_progress_and_final_report():
|
||||
stage="final", outcome="concluded", data_gaps=[], diagram=diagram,
|
||||
)
|
||||
assert report.diagram == progress.diagram
|
||||
assert [node.status for node in report.diagram.node_refs] == ["completed", "waiting", None, None]
|
||||
assert [node.status for node in report.diagram.node_refs] == ["recorded", "needs_input", None, None]
|
||||
assert "status" not in report.diagram.node_refs[-1].model_fields_set
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ def test_class_attached_nodes_are_valid_declarations_without_accepting_partial_i
|
||||
"node_refs": [{"node_id": "QUERY", "label": "核查", "status": "running"},
|
||||
{"node_id": "REVIEW", "label": "复核", "status": "pending"}]},
|
||||
}}
|
||||
assert AgentArtifactsCommand.model_validate(payload).progress.diagram.node_refs[0].status == "running"
|
||||
assert AgentArtifactsCommand.model_validate(payload).progress.diagram.node_refs[0].status == "reference"
|
||||
payload["progress"]["diagram"]["node_refs"][0]["node_id"] = "QUER"
|
||||
with pytest.raises(ValidationError, match="QUER"):
|
||||
AgentArtifactsCommand.model_validate(payload)
|
||||
|
||||
Reference in New Issue
Block a user