feat(investigations): refine report authoring and replay flushing
This commit is contained in:
@@ -70,6 +70,17 @@ def test_pollution_instructions_offer_work_order_before_simulation_and_reuse_the
|
||||
assert "不能把浊度、余氯下降或感官描述直接换算成污染源浓度" in text
|
||||
|
||||
|
||||
def test_pollution_workflow_distinguishes_protection_flushing_and_clearance():
|
||||
skill = read_work_order_skill("water_pollution", include_content=True)
|
||||
text = skill["instructions"]
|
||||
assert skill["version"] == "1.2.0"
|
||||
assert text.index("## 4. 源头控制与用户隔离") < text.index("## 5. 污染物清除与分步冲洗")
|
||||
assert "opened_valves" in text and "closed_valves" in text
|
||||
assert "不继承上次模拟" in text and "排放去向" in text
|
||||
assert all(stage in text for stage in ("source_control", "flushing_plan", "clearance_verification"))
|
||||
assert "不能证明污染物已清除" in text and "结果未通过时保持 interim" in text
|
||||
|
||||
|
||||
@pytest.mark.parametrize("workflow", ["burst_report", "water_quality_complaint", "water_pollution"])
|
||||
def test_task_skill_uses_persisted_workflow_and_preserves_task_scope(monkeypatch, workflow):
|
||||
task_id, project_id = uuid4(), uuid4()
|
||||
@@ -102,6 +113,7 @@ def test_task_skill_uses_persisted_workflow_and_preserves_task_scope(monkeypatch
|
||||
assert capability["simulation_parameters"] == {"include_impact_coverage": True}
|
||||
assert capability["next_steps"].index("propose_task_action") < capability["next_steps"].index("run_contaminant_simulation")
|
||||
assert body.data["skill"]["instructions"] and not body.truncated
|
||||
assert len(json.dumps(body.model_dump(mode="json"), ensure_ascii=False).encode()) < 10000
|
||||
assert body.evidence_id is None and body.semantics == "task"
|
||||
reader.assert_awaited_with(scope.connection, project_id=project_id, task_id=task_id, report_revision=None)
|
||||
binding.permission_cap = []
|
||||
|
||||
Reference in New Issue
Block a user