ssw
|
259580b240
|
fix(dacli): R14 BS-新44/52/41/43b/45 drift fixes + 25 vitest
- BS-新44 (P0): di/_lookup.ts 用 getDataInterfaceSelector 优先 + category iterate fallback (collectDiCategories)
- BS-新52 (P1): fullName autoStrip helper 加 _encode_validator.ts, 4 caller 集成 (form/dict/workflow/menu)
- BS-新41 (P1): menu type=9 moduleId 注入 (isFormMenuType = [3,4,9,11])
- BS-新43b (P2): workflow stale pre-validate cleanup + retry ONCE
- BS-新45 (R14): form/create.ts 调 ssw FormRepair /api/ssw/form/repair-fields post-create
- 25 vitest in tests/integration/drift/round13-fix-batch3.spec.ts
|
2026-07-15 12:12:44 +08:00 |
|
 sswandClaude
|
f840f2961a
|
fix: Round 12 drift batch 1 (enCode autoStrip + DI uniqueness + report cells)
Round 12 drift loop on ts2 (5 random baseline per module) surfaced:
- BS-新38: 5/8 modules fail BS-56 when --enCode='round12-foo' contains '-'.
Add autoStripEnCode() helper + apply at 7 create.ts action entries.
workflow/_validate.ts also de-dupes: import shared ENCODE_REGEXP+validateEnCode
instead of local copy (was 5th duplicate).
- BS-新39: 4/5 DI hit 'name cannot be repeated' (BS-47 EXIST002) at backend.
Root cause: di/create.ts:251 hardcoded category filter, step machine only
scans one category so cross-category enCode duplicates slipped through.
Fix: remove hardcoded filter, scan all DIs platform-wide. Better error msg.
- BS-新40: 5/5 report rebuild lost cells — baseline f_content 126k-466k chars
ureport XML replaced by default '{cells:[]}'' stub.
Fix: add --from-json-file option (mirrors di/create.ts pattern), reads full
baseline body and overrides required fields.
Tests: 28/28 PASS
- tests/integration/drift/round12-cross-module.spec.ts (Round 12 sweep)
- tests/integration/drift/round12-fix-batch1.spec.ts (batch 1 regression)
Docs: docs/drift/2026-07-15-round12-summary.md + ...-fix-batch1.md
Co-Authored-By: Claude <[email protected]>
|
2026-07-15 10:11:12 +08:00 |
|
 ClaudeandClaude
|
216a02f7f1
|
fix(dacli): BS-56/BS-42/enableFlow/JNPF 4 步法修复 (v0.11h+, 2026-06-28)
按 CLAUDE.md §2.7.1 4 步法修 4 个 dacli 盲点:
1. BS-56 增强: enCode 禁下划线 — 错误信息明确 + 自动建议别名
- 新增 src/commands/_encode_validator.ts (统一 ENCODE_REGEXP/FULLNAME_REGEXP + validateEnCode + suggestEnCode)
- form/dict/menu/role 4 个 _validate.ts 切换到共享 helper
- 错误从'只能输入英文、数字和小数点且小数点不能放在首尾'升级为
'BS-56: enCode 只能含英文/数字/小数点, 不能含下划线/连字符/中文. 当前 enCode=X 非法. 建议改成: --enCode=Y (自动去下划线/连字符)'
2. BS-42 升级: dm 系统列冲突清晰提示
- 加 groupMap 给每个系统列别称 (f_description=描述, f_create_user=创建人 ID 等)
- 消息包含改名建议 (f_desc/f_remark/f_brief/f_summary) 和 code='BS-42'
3. enableFlow 兜底: BS-EFLOW-NOWF guard
- 在 _blindspot_guards.ts 加新 guard (WARN 级)
- enableFlow=1 但 workflow list=0 时给明确警告
- AppContext 加 workflowList 字段, loadAppContext 调 /workflow/Engine/list 收集
- types.ts/client.ts/context.ts 全链路补 workflowList
4. JNPF 自检: 新增 core/_health_check.ts
- app init/status 前置 HEAD baseUrl/ 健康检查 (3s timeout)
- 不通时给 nohup 重启指引
- JSON 输出 health: {ok, status, error, durationMs}, 不通时退出码 1
验证 (workSystem/jxcj1 PASS):
- BS-56 form/dict/menu 3 命令输出新格式错误 + 别名建议
- BS-42 dm create f_description 输出 BS-42 清晰信息
- JNPF 自检输出 '✓ JNPF 可达: http://nginx/api/ (status=200, 27ms)'
文件 (16 改 + 2 新增):
- src/commands/_encode_validator.ts (新增)
- src/core/_health_check.ts (新增)
- src/core/types.ts (workflowList)
- src/core/client.ts (resolveDbLinkId 兜底)
- src/commands/_blindspot_guards.ts (BS-EFLOW-NOWF)
- src/commands/app/context.ts (tryFetchWorkflows)
- src/commands/app/init.ts (前置健康检查)
- src/commands/app/status.ts (前置健康检查 + JSON 输出)
- src/commands/form/_validate.ts (共享 ENCODE_REGEXP)
- src/commands/dm/_validate.ts (BS-42 升级)
- src/commands/dict/_validate.ts (共享 + BS-56 增强)
- src/commands/menu/_validate.ts (共享 + BS-56 增强)
- src/commands/role/_validate.ts (共享 + BS-56 增强)
- src/commands/form/codegen.ts (workflowList 兜底)
- tests/unit/{blindspot_guards,bs54_guard,dbLinkId,verify_option}.test.ts (workflowList 兜底)
不违反红线:
- ❌ 不动 web/uniapp/jnpf 源码 (CLAUDE.md §15)
- ❌ 不绕过 dacli
- ✅ 一轮一提交 (CLAUDE.md §14)
- ✅ npx tsc --noEmit 在改动文件无新错
Co-Authored-By: Claude <[email protected]>
|
2026-06-28 23:50:58 +08:00 |
|