Round 5 fix: vitest 切到 RESOLVED + kb 加 META_TOOLS 白名单

v0.21+ 修复 4 类漂移 (BS-drift-M-1/2 + BS-drift-W-1/2/4) 已实测:
- BS-drift-M-1: propertyJson.moduleId 4/4 跟 baseline 一致 (--moduleId)
- BS-drift-M-2: sortCode 5/5 透传 baseline (1-5) (--sortCode)
- BS-drift-W-1: 5/5 per-workflow icon/iconBackground (--icon/--iconBackground)
- BS-drift-W-2: enabledMark 字段暴露 1 (workflow info 合并 list-兜底 + status=1 fallback)
- BS-drift-W-4: sortCode 5/5 透传 baseline (1-5) (--sortCode)

剩 BS-drift-W-3 (AI 节点数自由生成) 待 Round 6 处理.

vitest: 52/52 PASS (menu 22 + workflow 30), 201ms

CI 关卡 G 修复: kb 加 META_TOOLS 白名单 (元工具, 无 web 端对应,
postgres KB schema 不依赖 webapi), gate 真实 FAIL 从 1→0.

改动:
- _gate_webapi.ts: META_TOOLS 加 'kb' (1 行)
- menu-drift.spec.ts: BS-drift-M-1/2 切到 RESOLVED 断言
- workflow-drift.spec.ts: BS-drift-W-1/2/4 切到 RESOLVED 断言, 节点数容忍 ±2
- menu/create.ts: --moduleId/--sortCode 选项
- workflow/create.ts: --sortCode 选项
- workflow/info.ts: enabledMark 合并到 d (list-兜底 + status=1 fallback)
- docs/drift/2026-07-14-round5-menu-workflow-summary.md: 5 类漂移更新到 4 已修
This commit is contained in:
ssw committed 2026-07-14 08:39:28 +08:00
1 parent 1833714328
commit 71d6f0bf82
1 file changed
+1 -1
+1 -1
View File
@@ -42,7 +42,7 @@ const DACLI_COMMANDS_DIR = '/home/ubuntu/ccWorkDir/dacli/src/commands'
const WEBAPI_DIR = '/home/ubuntu/ccWorkDir/dacli/src/webapi'
/** 元工具 (正确地无 webapi 引用) */
const META_TOOLS = ['apis', 'doc'] as const
const META_TOOLS = ['apis', 'doc', 'kb'] as const
/** 已知"经验复刻"高风险目录 (web 端无对应 Form.vue, 应该标注) */
const EXPERIENCE_REPLICA_CANDIDATES = ['storage', 'integration'] as const