fix: 修复重复能力审计中Base64解码同时保留与隐藏的冲突
This commit is contained in:
parent
7a067173a5
commit
9ec301b081
@ -3,9 +3,9 @@
|
||||
"generatedAt": "2026-11-02T04:56:17.341Z",
|
||||
"policy": "同名能力按目标域、协议和最新版本保留主能力;重复旧版本仅隐藏,不删除执行器",
|
||||
"editableBefore": 894,
|
||||
"keep": 654,
|
||||
"hide": 240,
|
||||
"editableAfter": 654,
|
||||
"keep": 653,
|
||||
"hide": 241,
|
||||
"editableAfter": 653,
|
||||
"decisions": [
|
||||
{
|
||||
"id": "Trigger.Manual",
|
||||
@ -3338,12 +3338,6 @@
|
||||
"status": "keep",
|
||||
"reason": "唯一能力"
|
||||
},
|
||||
{
|
||||
"id": "Image_Base64Decode",
|
||||
"name": "图片base64编码转二进制",
|
||||
"status": "keep",
|
||||
"reason": "唯一能力"
|
||||
},
|
||||
{
|
||||
"id": "Image_Find_V1",
|
||||
"name": "查找图像",
|
||||
@ -5619,4 +5613,4 @@
|
||||
"reason": "与图片Base64编解码(Image_Base64Encode)互逆重复, 已统一为转换方向切换, 保留执行兼容"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@ -273,7 +273,7 @@
|
||||
"placeholder": "如 D:\\output"
|
||||
},
|
||||
"outImageName": {
|
||||
"placeholder": "输入内容或 ${变量}"
|
||||
"placeholder": "留空则自动生成,如 screenshot_1730000000.png"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -287,7 +287,7 @@
|
||||
"Image_Base64Encode": {
|
||||
"fields": {
|
||||
"path": {
|
||||
"description": "填写参数值,支持 ${变量} 引用上游输出"
|
||||
"description": "编码方向的源图片路径,支持 ${变量} 引用上游输出(如上游截图的保存路径)"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
"vendor": 997,
|
||||
"native": 16,
|
||||
"triggers": 3,
|
||||
"fields": 4294
|
||||
"fields": 4296
|
||||
},
|
||||
"groups": [
|
||||
{
|
||||
|
||||
@ -31,7 +31,7 @@ describe("catalog capability properties", () => {
|
||||
const excludedIds = new Set(excluded.ids);
|
||||
const hidden = new Set((duplicates.decisions as Array<{ id: string; status: string; canonical?: string }>).filter((item) => item.status === "hide").map((item) => item.id));
|
||||
const visible: CatalogComponent[] = catalog.components.filter((component) => !excludedIds.has(component.id) && !hidden.has(component.id));
|
||||
expect(visible).toHaveLength(654);
|
||||
expect(visible).toHaveLength(653);
|
||||
|
||||
const ids = visible.map((component) => component.id);
|
||||
expect(new Set(ids).size).toBe(ids.length);
|
||||
|
||||
@ -7,8 +7,8 @@ describe("duplicate capability policy", () => {
|
||||
const decisions = audit.decisions as Array<{ id: string; status: string; canonical?: string }>;
|
||||
const kept = decisions.filter((item) => item.status === "keep");
|
||||
const hidden = decisions.filter((item) => item.status === "hide");
|
||||
expect(kept.length).toBe(654);
|
||||
expect(hidden.length).toBe(240);
|
||||
expect(kept.length).toBe(653);
|
||||
expect(hidden.length).toBe(241);
|
||||
expect(audit.editableBefore).toBe(kept.length + hidden.length);
|
||||
expect(audit.editableAfter).toBe(kept.length);
|
||||
const keptIds = new Set(kept.map((item) => item.id));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user