ssw
715fcb9a59
feat(dacli): P3 全量 18 _validate.ts → ValidationError 一源
每个 per-module _validate.ts 之前都自己 declare `export interface
ValidationError { field?, message, code? }` (跟 _error_codes.ts 完全一致),
导致跟 _error_codes.ts 定义漂移 (有的加 step/stepName, 有的加 docstring,
字段含义略不同但定义都一样).
这次统一 18 文件 import { ValidationError } from '../_error_codes.ts',
让所有 step machine 输出格式 + aggregate 跨模块一致.
机械改造:
- 18 文件: 删本地 export interface ValidationError block
- 加 `import { ValidationError } from '../_error_codes.ts'`
- 5 个文件 (dict/form/menu/role/workflow) import 因 docstring 在前, 落
在 interface 之后, 第二次 fix-up 移到 import 块首
- 总变更: 18 insertions, 131 deletions (净减 113 行, 重复 definition 没了)
验证:
- TS compile: 56 errors baseline 不变, 0 新错误
- 65/65 单元测试 (output_filter/auto_fix/report_wired 3 文件)
- blindspot_guards 12 个测试失败 (跑 `git stash` 验证: 是 pre-existing
baseline 问题, 不是本次引入)
- dacli datasource create 端到端 validation 错误格式不变
附带: docs/cmd-review/scan-2026-07-21.md 8 维度扫描报告 (含 ADR 0015
没列的 4 项新发现: workflow shim / console.log 范围扩大 / form/create 13
process.exit / DacliError 实际无重复).
2026-07-21 17:20:55 +08:00
..
2026-06-25 14:58:32 +08:00
2026-07-01 18:36:23 +08:00
2026-07-01 17:27:48 +08:00
2026-07-01 17:27:48 +08:00
2026-06-25 14:58:32 +08:00
2026-06-25 14:58:32 +08:00
2026-06-25 14:58:32 +08:00
2026-07-20 18:02:38 +08:00
2026-06-29 13:28:52 +08:00
2026-07-20 18:02:38 +08:00
2026-06-25 14:58:32 +08:00
2026-07-17 12:20:48 +08:00
2026-06-25 14:58:32 +08:00
2026-07-20 18:02:38 +08:00
2026-06-25 14:58:32 +08:00
2026-06-25 14:58:32 +08:00
2026-06-25 14:58:32 +08:00
2026-06-25 14:58:32 +08:00
2026-06-25 14:58:32 +08:00
2026-06-29 18:08:45 +08:00
2026-06-25 14:58:32 +08:00
2026-07-21 17:20:55 +08:00
2026-06-25 14:58:32 +08:00
2026-06-25 14:58:32 +08:00
2026-06-25 14:58:32 +08:00
2026-06-25 14:58:32 +08:00