fix(agent): continue authorized SCADA investigation analysis
Generic Container CI/CD / test-build-publish (push) Successful in 2m18s
Agent CI/CD / build-test-publish-and-deploy (push) Successful in 2m18s

This commit is contained in:
2026-11-07 20:14:24 +08:00
parent b8f7edb3ee
commit caa174ee73
3 changed files with 23 additions and 5 deletions
+16
View File
@@ -84,6 +84,22 @@ it("keeps burst event handling separate from SCADA candidate location", () => {
expect(allowedQueryTools({ ...context, taskId: undefined, purpose: "ordinary_chat" })).toContain(queryMcpToolId("run_burst_location"));
});
it("continues candidate analysis through the declared capability and records provenance without stopping", () => {
const config = serviceOpencodeConfig({});
for (const system of [config.agents.instruction.system, config.agents[TASK_AGENT].system]) {
expect(system).toContain("location_capability.available=true");
expect(system).toContain("burst_leakage_required=false 时可省略漏量");
expect(system).toContain("取得候选管段与相似度后,继续地图展示、隔离边界、覆盖与影响分析,并汇入报告。");
expect(system).toContain("直接返回结果时立即读取");
expect(system).not.toMatch(/location_demo|真实定位|演示定位|轻量分析或 demo/);
}
const investigation = config.agents[TASK_AGENT].system;
expect(investigation).toContain("synthetic、回放等来源标记本身不构成停止条件");
expect(investigation).toContain("仅暂停依赖该条件的分支");
expect(investigation).toContain("本轮分析完成与现场处置完成分别表述");
expect(investigation).toContain("不直接派发现场工单或操作设备");
});
it("keeps administrator denials for product MCP queries in both primary and reader permissions", () => {
const denied = serviceOpencodeConfig({ permissions: [{ action: "mcp_tjwater_*", resource: "*", effect: "deny" }] });