feat: add node coverage and improve investigation presentation
Generic Container CI/CD / test-build-publish (push) Failing after 1m50s
Server CI/CD v2 / build-test-publish-and-deploy (push) Failing after 1m51s

This commit is contained in:
2026-11-02 15:23:34 +08:00
parent 05183aff93
commit f2cfce8192
25 changed files with 588 additions and 21 deletions
@@ -37,6 +37,18 @@ def test_unknown_node_state_is_rejected():
InvestigationDiagramNodeRef(node_id="A", label="查询", status="blocked")
def test_class_attached_nodes_are_valid_declarations_without_accepting_partial_ids():
payload = {"request_id": uuid4(), "source_session_id": "session-1", "progress": {
"summary": "核查", "diagram": {"title": "路线", "mermaid": "flowchart TD\nQUERY:::running --> REVIEW:::pending",
"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"
payload["progress"]["diagram"]["node_refs"][0]["node_id"] = "QUER"
with pytest.raises(ValidationError, match="QUER"):
AgentArtifactsCommand.model_validate(payload)
@pytest.mark.parametrize("artifact", ["progress", "report"])
def test_artifact_write_rejects_node_refs_missing_from_mermaid(artifact):
diagram = {