fix(scada): align location capability and investigation guidance
This commit is contained in:
@@ -49,6 +49,16 @@ def test_work_order_handling_and_legacy_scada_replay_receive_separate_skills():
|
||||
assert "run_burst_location" in replay["instructions"]
|
||||
|
||||
|
||||
def test_scada_instructions_advance_candidate_analysis_independently_of_source_labels():
|
||||
skill = read_work_order_skill("scada_anomaly", include_content=True)
|
||||
text = skill["instructions"]
|
||||
assert "location_capability" in text
|
||||
assert "证据来源字段用于记录数据取得方式,不构成停止分析的条件" in text
|
||||
assert "隔离边界、节点覆盖与影响分析,完成报告后再收尾" in text
|
||||
assert "现场工单与设备操作遵守服务端动作权限" in text
|
||||
assert not any(word in text for word in ("演示", "mock", "location_demo", "只发布回放成果"))
|
||||
|
||||
|
||||
def test_task_skill_uses_persisted_workflow_and_preserves_task_scope(monkeypatch):
|
||||
task_id, project_id = uuid4(), uuid4()
|
||||
reader = AsyncMock(return_value={"task": {"workflow": "burst_report"}})
|
||||
@@ -103,7 +113,8 @@ def test_replay_context_advertises_demo_location_without_revealing_truth(monkeyp
|
||||
for section in ("summary", "skill"):
|
||||
result = asyncio.run(query_service.execute_query(scope, binding, TOOLS["get_task_context"],
|
||||
TaskContextInput(context_handle=binding.context_handle, section=section)))
|
||||
capability = result.data["location_demo"]
|
||||
capability = result.data["location_capability"]
|
||||
assert "location_demo" not in result.data
|
||||
assert capability["available"] is True
|
||||
assert capability["tool"] == "run_burst_location"
|
||||
assert capability["burst_leakage_required"] is False
|
||||
@@ -113,4 +124,4 @@ def test_replay_context_advertises_demo_location_without_revealing_truth(monkeyp
|
||||
binding.replay_context["knowledge_cutoff"] = "2026-07-15T23:45:00Z"
|
||||
result = asyncio.run(query_service.execute_query(scope, binding, TOOLS["get_task_context"],
|
||||
TaskContextInput(context_handle=binding.context_handle)))
|
||||
assert result.data["location_demo"]["available"] is False
|
||||
assert result.data["location_capability"]["available"] is False
|
||||
|
||||
Reference in New Issue
Block a user