ssw
|
4a3dd4b9d5
|
auto(14b5ea1b9bd9): session end @ 2026-07-23T13:56:28 (+4f)
|
2026-07-23 13:56:29 +08:00 |
|
ssw
|
ff259efdd5
|
auto(14b5ea1b9bd9): session end @ 2026-07-23T13:28:26 (+5f)
|
2026-07-23 13:28:27 +08:00 |
|
ssw
|
41cc72a309
|
auto(14b5ea1b9bd9): session end @ 2026-07-23T10:49:11 (+1f)
|
2026-07-23 10:49:11 +08:00 |
|
ssw
|
571737ccaa
|
auto(14b5ea1b9bd9): session end @ 2026-07-23T09:50:13 (+1f)
|
2026-07-23 09:50:15 +08:00 |
|
ssw
|
15d39451c3
|
auto(14b5ea1b9bd9): session end @ 2026-07-22T21:25:12 (+1f)
|
2026-07-22 21:25:12 +08:00 |
|
 sswandClaude
|
b69d94c133
|
merge: eventhub blocker fixes
Co-Authored-By: Claude <[email protected]>
|
2026-07-22 16:56:12 +08:00 |
|
 sswandClaude
|
fa605579f3
|
test: cover eventhub blocker fixes
Co-Authored-By: Claude <[email protected]>
|
2026-07-22 16:51:06 +08:00 |
|
ssw
|
a756b009a8
|
auto(14b5ea1b9bd9): session end @ 2026-07-22T16:46:31 (+7f)
|
2026-07-22 16:46:32 +08:00 |
|
 sswandClaude
|
88dff4715b
|
refactor(dacli): 修 6 错默认/标号 + 8 factory 落 L3 + 11 长注释短化
A. 6 处过期错:
- form/create.ts --notes 默认值错 (type=4 / webType=1 → 实际 1/2)
- form/create.ts --notes '默认 type=2' → 实际 1
- 删 P0-5 / B-15 / B-8 / v0.7.4 / BS-drift-1 历史标号 (用户看不到 batch name 含义)
- 删 codegen.ts P1-3 标号残留 (stdout + notes)
B. 8 factory 落 L3 (v2.4+):
_post_reminders.ts 新增:
- remindEnCodeStrip / remindFullNameSoften (preWrapFixes 收集, wrapCommand.fixes 接收)
- remindFormRepairSkipped / remindSmartPropsPostProcessFailed
- remindHeuristicRelFormSkipped / remindPhysicalTableMissing
- remindAiTokenRelogin / remindCodeGenMenuMountFail
create.ts:
- enCode/fullName strip 改 preWrapFixes (wrapCommand.fixes 接收)
- smartProps 后处理失败 / heuristicRelForm skipped / FormRepair skipped / 物理表缺失 / AI token 重登 → ctx.addSuggestion / ctx.addFix
codegen.ts:
- autoMountMenu 失败 (code!=200 + 异常) → ctx.addFix
C. 11 长注释短化:
- --ai-json 历史说明 5→1 行
- P1-7 AI Login fallback 5→1 行
- P1-5 AI enCode diverge 4→1 行
- relationForm wire up 5→1 行
- dos 26 P0 修复 4→2 行
- Round 12 smartProps fallback 3→1 行
- FormRepair in-process 5→1 行
- 业务分类 4→1 行
- lombok + annotationProcessorPaths 7→1 行
- 前端 web/uniapp 重定向 7→1 行
- @RequestMapping 路径改写 8→1 行
数字:
- form/create.ts: 1524 → 1516
- form/codegen.ts: 1055 → 1040
- _post_reminders.ts: 213 → 338 (+125)
校验: typecheck 0 新增 error (10 个 pre-existing 不动)
单测: 48/48 pass (output_filter 22 + auto_fix 26)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
|
2026-07-22 01:24:38 +08:00 |
|
 sswandClaude
|
05e5f6b5fe
|
refactor(dacli): 清 form/create form/codegen dead code + 7 inline ⚠ 落 L3
form/create.ts (1572→1524):
- 删硬编码 BUSINESS_TYPE_ID 兜底分支 (compatible old NCPF, 真 dead)
- 删 rawFields/converted/total 空壳 (rawFields 在空数组循环是真 dead)
- 删老 ternary `__aiBuildFormData ? ... : { 默认空 schema }` 老分支 (--fields 已 ctx.fail, 走不到)
- 删 type=webType 默认值 override (commander declaration 已经默认)
- 简化"删 dead code (aiModelList[0].fields 手动映射)" 4 行注释 → 1 行
form/codegen.ts:
- 删 autoFixNames option (已废弃, 全文 0 引用)
- 修错 TODO: --auto-menu + L17 + L1022 (已实现 autoMountMenu)
- 修"auto-fix-names 已废弃" 注释
_post_reminders.ts (+5 factory):
- remindCategoryGuess (category 兜底提示)
- remindSmartPropsAIFallback (启发式标必填兜底)
- remindRelationFormAutoSkip (注入失败提示)
- remindCodeGenMenuAttachFail (codegen 成功但 menu 未挂)
- remindCodeGenPomConflict (互斥 flag 提示)
L3 落点 (7 inline log.warn → ctx.addSuggestion):
- form/create: categoryGuess × 4 + smartProps × 2 + relationForm × 1
- form/codegen: menuAttachFail + pomConflict × 1
类型校验: 0 新增 error (10 个 pre-existing id/fullName/aiModelList 类型错不动)
单测: 48/48 pass (output_filter 22 + auto_fix 26)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 22:31:12 +08:00 |
|
ssw
|
e2b1381c50
|
auto(14b5ea1b9bd9): session end @ 2026-07-21T22:04:07 (+20f)
|
2026-07-21 22:04:07 +08:00 |
|
ssw
|
c584e9f4c1
|
auto(14b5ea1b9bd9): session end @ 2026-07-21T21:53:43 (+1f)
|
2026-07-21 21:53:43 +08:00 |
|
 sswandClaude
|
2bce9dd3e1
|
feat(dacli): form/codegen.ts wrapCommand 迁移 (P2 batch4, 8 exit 收口)
全 action 包 wrapCommand + try/catch. 3 action process.exit + ensureAlias helper 5 process.exit → throw/ctx.fail.
顶层提前 const c (原 c 在首个 exit 后声明), 删冗余 const c. 空 tree/json 早返 → ctx.success.
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:47:12 +08:00 |
|
 sswandClaude
|
32904b2efc
|
feat(dacli): workflow/create.ts wrapCommand 迁移 (P2 batch3, 9 exit 收口)
全 action 包 wrapCommand + try/catch. 8 action process.exit + runWorkflowStepMachine helper process.exit → throw/ctx.fail.
成功 printCommandEnd → ctx.success. stale-retry 3 分支 exit → ctx.fail (create_stale_retry 测试仍 PASS).
cmdFix 在 wrapCommand 前算 (静态 populated), fixes 正常透传.
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:44:34 +08:00 |
|
 sswandClaude
|
11082bff6e
|
feat(dacli): form/create.ts wrapCommand 迁移 (P2 batch2, 11 exit 收口)
1554 行核心命令: 全 action 包 wrapCommand + try/catch. 11 process.exit → ctx.fail/ctx.success.
precheck/guard throw 被 handler catch. 成功路径保留原 saveCommandLog (含 fixLog) 不双写.
副作用修复: 顶层提前 const c (原 --ai 路径 line 307 c 在 line 624 声明前引用, TS used-before-decl),
删冗余 606/624 两处 const c. TS baseline 57→49 (修复 8 个 pre-existing c 错误, 无新增).
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:41:52 +08:00 |
|
 sswandClaude
|
f0d0af518f
|
refactor(dacli): handlePreCheckResult/handleGuardResult 改 throw + dm/create + form/release wrapCommand 迁移 (P2 batch1)
_precheck.handlePreCheckResult + _blindspot_guards.handleGuardResult: process.exit(2) → throw Error
(wrapCommand handler catch → ctx.fail 落 L3). 沿用 DirtyCheckError 同款模式.
dm/create: 完整 wrapCommand 迁移 (runDmStepMachine process.exit → throw + await 修复未 await 逃逸,
precheck/guard throw 被 handler catch). form/release: wrapCommand 迁移 (承接 guard throw).
menu/create 已 wrapCommand (自动承接). form/create 下一 commit 承接 (P2 batch2).
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:34:46 +08:00 |
|
 sswandClaude
|
8839466f3c
|
feat(dacli): dm/drop.ts wrapCommand 迁移 (2 exit 收口)
TTY 确认 + DB201 错误 → ctx.fail (保留 ADR 0011 修复指引). dm/create 因纠缠 keep-list helper (handlePreCheckResult/handleGuardResult 内部 process.exit), 归入 P2 待专门 session.
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:28:02 +08:00 |
|
 sswandClaude
|
0d9151f343
|
feat(dacli): org/monitor/report/doc 小命令 wrapCommand 迁移 (8 exit 收口)
org/create (旧 printCommandEnd 升级) + org/tree, monitor/server, report/delete (保留 --cascade 级联清理), doc/search (无 appCode 本地文件搜索). process.exit → ctx.fail.
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:26:43 +08:00 |
|
 sswandClaude
|
1ee19dd23c
|
feat(dacli): bigscreen/* 模块 wrapCommand 迁移 (create/delete/info/release/update, 5 exit 收口)
create 从旧 printCommandEnd 升级 (保留 auto-fix). update 复用 DirtyCheckError catch.
delete/info/release process.exit → ctx.fail. bigscreen/ 模块 process.exit 归零 (construct 上次已迁移).
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:23:41 +08:00 |
|
 sswandClaude
|
0677370d9c
|
feat(dacli): workflow/* 小命令 wrapCommand 迁移 (approve/decision/delete/launch/syncForm, 9 exit 收口)
approve/launch/syncForm/delete/decision 全部 process.exit → ctx.fail.
delete --yes 检查移入 ctx.fail (保留 BS-E13 排查提示). decision --list 分支保留.
workflow/create.ts (9 exit, P2 高风险) 暂不动, 留专门 session 拆 sub-handler.
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:16:21 +08:00 |
|
 sswandClaude
|
e1eb1f07ab
|
feat(dacli): di/* 模块 wrapCommand 迁移 (delete/info/test/update, 8 exit 收口)
update 复用 DirtyCheckError catch + runDiStepMachine process.exit → throw. test JSON parse/API → ctx.fail.
delete/info process.exit → ctx.fail. di/ 模块 process.exit 归零 (create 已迁移).
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:13:30 +08:00 |
|
 sswandClaude
|
d8df559075
|
feat(dacli): portal/datasource/apis 残留 wrapCommand 迁移 (6 exit 收口)
portal/info+release, datasource/delete (--yes 检查移入 ctx.fail), apis/info.
portal/release 保留 BS-109 自动检测逻辑, 2 exit → ctx.fail. apis meta 模块 wrapCommand 化.
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:11:07 +08:00 |
|
 sswandClaude
|
980dbedbbd
|
feat(dacli): print/* 模块 wrapCommand 迁移 (create/delete/info/update, 10 exit 收口)
create 从旧 printCommandEnd 升级 (保留 auto-fix). delete/info/update process.exit → ctx.fail.
step machine 校验失败 → ctx.fail (聚合错误). print/ 模块 process.exit 归零.
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:07:48 +08:00 |
|
 sswandClaude
|
2795d7f2db
|
feat(dacli): storage/* 模块 wrapCommand 迁移 (info/test/use, 5 exit 收口)
info 从旧 finally+printCommandEnd 升级 (无 appCode 跳过 L3, DacliError throw 被 wrapCommand catch).
test 批量连通测试用 ctx.partial (fail>0). use 纯 yml 无 appCode, process.exit → ctx.fail/success.
storage/ 模块 process.exit 归零.
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:05:16 +08:00 |
|
 sswandClaude
|
2a1fd000a6
|
feat(dacli): schedule/* 模块 wrapCommand 迁移 (create/delete/info/trigger/update, 9 exit 收口)
create 从旧 printCommandEnd 升级 (保留 auto-fix). trigger 从旧 printCommandEnd 升级.
update 复用 DirtyCheckError catch + step machine → ctx.fail. delete/info process.exit → ctx.fail.
schedule/ 模块 process.exit 归零.
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:03:07 +08:00 |
|
 sswandClaude
|
183d07bcc6
|
feat(dacli): msg/* 模块 wrapCommand 迁移 (notice+template CRUD 7 文件, 14 exit 收口)
notice/templateCreate 从旧 printCommandEnd 升级到 wrapCommand (保留 auto-fix fixes).
noticeUpdate 复用 DirtyCheckError catch. noticeSend 非 site 通道 → ctx.success (note).
notice/template Delete/Update process.exit → ctx.fail. msg/ 模块 process.exit 归零.
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 21:00:25 +08:00 |
|
 sswandClaude
|
6d190a947c
|
feat(dacli): menu/* 残留 wrapCommand 迁移 (create/unrelease/purge, 4 exit 收口)
create.ts runStepMachine 内部 process.exit → throw (wrapCommand catch).
unrelease 完整 wrapCommand 迁移. purge 批量命令用 ctx.partial (fail>0).
menu/ 模块 process.exit 归零 (delete/list/update 已迁移).
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 20:50:02 +08:00 |
|
 sswandClaude
|
1a9f18285f
|
feat(dacli): dict/* 模块 wrapCommand 迁移 (datacreate/datadelete/dataupdate/typedelete/typeupdate + typecreate 收尾, 12 exit 收口)
datacreate 批量命令用 ctx.partial (fail>0) / ctx.success. typecreate 补齐 (runDictStepMachine process.exit → throw + 移除冗余 pre-wrap check).
data/typeupdate 复用 DirtyCheckError catch. data/typedelete process.exit → ctx.fail.
dict/ 模块 process.exit 归零.
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 20:47:51 +08:00 |
|
 sswandClaude
|
17c0f353ab
|
feat(dacli): role/* 模块 wrapCommand 迁移 (create/delete/info/update, 8 exit 收口)
create.ts 从旧 printCommandEnd 升级到 wrapCommand (runRoleStepMachine 内部 process.exit → throw).
update.ts 复用 DirtyCheckError catch → ctx.fail 模式.
delete/info process.exit → ctx.fail. assign.ts 已迁移 (无变更).
role/ 模块 process.exit 归零.
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 20:44:07 +08:00 |
|
 sswandClaude
|
c6763c4129
|
feat(dacli): user/* 剩余 11 文件 wrapCommand 迁移 (batch2+batch-delete, 全模块收口)
baseinfo/batch-set-position/batch-state/online-kick/delete/resetpwd/
socials-unbind/batch-delete/update/info/create — 全部 process.exit → ctx.fail.
create.ts 从旧 printCommandEnd 模式升级到 wrapCommand (保留 runCommandAutoFix fixes).
update.ts 复用 DirtyCheckError catch → ctx.fail 模式.
user/ 模块 20 文件 process.exit 归零 (100% 收口).
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 20:41:02 +08:00 |
|
 sswandClaude
|
2f7482c7c2
|
feat(dacli): user/* batch1 wrapCommand 迁移 (auth-groups/auth-list/changepwd/set-position/unlock, 5 exit 收口)
Co-Authored-By: Claude <[email protected]>
|
2026-07-21 20:35:35 +08:00 |
|
ssw
|
e091907db7
|
feat(dacli): bigscreen/construct.ts 完整 wrapCommand 迁移 (P6 6 exit 收口)
6 处 process.exit(1) → ctx.fail():
- main action catch (构造失败兜底)
- runConstruct --from-json 文件不存在 (改 throw DacliError → handler catch → ctx.fail)
- runConstruct --from-json JSON.parse 失败 (同上)
- runConstruct validateOnly 校验失败 (原 process.exit(1) 单一分支)
- runConstruct 校验失败 (原 else 分支)
- runConstruct addObj 后端未返 id (同上)
runConstruct 内部 5 处 process.exit(1) → throw new DacliError (P5 已就绪模式)
main action 兜底 catch → ctx.fail. wrapCommand handler 自动 catch 所有 throw.
修改方式: Write 整文件重写.
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
|
2026-07-21 20:25:04 +08:00 |
|
ssw
|
e05d87300f
|
feat(dacli): portal/create.ts 完整 wrapCommand 迁移 (P6 4 exit 收口)
4 处 process.exit(1) → ctx.fail():
- Bug 5 category 解析失败 (resolvePortalCategory throw DacliError catch)
- step machine 校验失败
- 后端 createPortal code !== 200 (含 enhanceFromBackend 错误增强)
- BS-新12 silent fail (后端返 code=200 但 r.id undefined, list 反查仍空)
删 4 处 printCommandEnd (L3 落盘) — wrapCommand 自动调用
保留 runCommandAutoFix pipeline (silent fix 透传)
保留 resolvePortalCategory 内部 DacliError (P5 已就绪)
修改方式: Write 整文件重写.
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
|
2026-07-21 20:23:13 +08:00 |
|
ssw
|
bb2d485d91
|
feat(dacli): app/create.ts 完整 wrapCommand 迁移 (P6 1 exit 收口)
1 处 process.exit(1) → ctx.fail() (catch 末尾):
- runCreate 抛 AppCreateError 或其他 Error → wrapCommand handler catch
- 显式 AppCreateError 分支: ctx.fail([step] msg, { stepName })
- 其他 Error: ctx.fail(app create 失败, { appCode, appName })
runCreate 内部 4 处 throw AppCreateError (v2.1+ P1-2b 已就绪) 不变, wrapCommand
handler 直接 catch 走 ctx.fail 收口.
console.log(JSON.stringify) → log.raw(JSON.stringify+\n) (走 quiet buffer).
修改方式: Edit (导入 + 整块 .action 替换).
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
|
2026-07-21 20:21:39 +08:00 |
|
ssw
|
ab7ed34154
|
feat(dacli): menu/update.ts 完整 wrapCommand 迁移 (P6 4 exit 收口)
4 处 process.exit → ctx.fail():
- 缺 menuId (位置参数 + --id 都缺)
- BS-49 expected-enCode 不匹配 (dirty check)
- --propertyJson JSON 解析失败
- 后端 PUT code !== 200 (含 enhanceFromBackend 错误增强)
修改方式: Write 整文件重写.
与 form/update.ts 同模式 (BS-49 防覆盖 + dirty check + propertyJson 合并).
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
|
2026-07-21 20:20:55 +08:00 |
|
ssw
|
418afb5180
|
feat(dacli): workflow/update.ts 完整 wrapCommand 迁移 (P6 6 exit 收口)
6 处 process.exit → ctx.fail():
- 拉原模板失败 (step 0)
- dirty check 失败 (DirtyCheckError catch, 同 form/update 模式)
- --enabledMark=0 无 API (step 2)
- saveFlow 缺 flowId (step 2)
- saveFlow 缺 flowXml (step 2)
- 后端 saveFlow code !== 200
- 后端 PUT code !== 200 (含 enhanceFromBackend 错误增强)
dirty check 集成: 与 form/update.ts 同模式 (try { dirtyCheckFailAndExit }
catch (e) { if (e instanceof DirtyCheckError) ctx.fail(e.message, ...) else throw })
修改方式: Write 整文件重写.
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
|
2026-07-21 20:20:07 +08:00 |
|
ssw
|
a7bae746b9
|
feat(dacli): doc/get.ts 完整 wrapCommand 迁移 (P6 4 exit 收口)
4 处 process.exit(1) → ctx.fail():
- section 不存在 (含可用 section 列表提示)
- 起始行超出文件长度
- ENOENT 文件不存在
- 其他 catch (log.error wrap)
console.log(sec.text/out.content) → log.raw(sec.text+\n) (走 quiet buffer,
verbose 模式即时输出, json 模式跳过 stdout 表格输出)
修改方式: Write 整文件重写.
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
|
2026-07-21 20:19:23 +08:00 |
|
ssw
|
901a479602
|
feat(dacli): report/save.ts 完整 wrapCommand 迁移 (P6 4 exit 收口)
4 处 process.exit(1) → ctx.fail():
- 拉原报表失败
- validateReportCreate 校验失败
- --cells 不是合法 JSON
- 后端 code !== 200
修改方式: Write 整文件重写.
与 report/release/publish/update 同 pattern.
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
|
2026-07-21 20:18:47 +08:00 |
|
ssw
|
8efb4a55e0
|
feat(dacli): form/update.ts 完整 wrapCommand 迁移 + _dirty_check 改 throw + test 更新
form/update.ts (5 处 process.exit → ctx.fail):
- releaseOnly 模式 后端 code !== 200
- BS-49 enCode 冲突
- --fields JSON 解析失败
- --fields 不是非空数组
- PUT 后端 code !== 200 (含 enhanceFromBackend 错误增强)
关联改动:
1. src/commands/_dirty_check.ts: dirtyCheckFailAndExit 改 throw DirtyCheckError
(替代原 process.exit(2), 让 wrapCommand handler catch → ctx.fail)
新增 DirtyCheckError 类 (entityType/entityId/errorCount 字段供 handler 区分)
2. tests/unit/report_wired.test.ts: 更新 report/create.ts 契约 (3 处断言)
- printCommandEnd 6+ → wrapCommand + ctx.fail 5+
- 成功路径 printCommandEnd success → ctx.success
- 删 printCommandEnd 直接 import 断言 (wrapCommand 内部已包)
form/update 整合 DirtyCheckError 实例化:
try { dirtyCheckFailAndExit(...) }
catch (e) {
if (e instanceof DirtyCheckError) return ctx.fail(e.message, { id, errorCount })
throw e
}
修改方式: Write 整文件重写.
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS (含 test 更新)
- workflow/update.ts 也用 dirtyCheckFailAndExit, 仍兼容 throw (下次迁 wrapCommand 时一并处理)
|
2026-07-21 20:16:59 +08:00 |
|
ssw
|
140c0dc691
|
feat(dacli): report/create.ts 完整 wrapCommand 迁移 (P6 5 exit 收口)
5 处 process.exit(1) → ctx.fail():
- validateReportCreate 校验失败
- --from-json-file 文件不存在
- --from-json-file JSON.parse 失败
- 后端 code !== 200
- BS-新12 silent fail (后端返 code=200 但 r 不可解析为 id)
删分散的 5 处 printCommandEnd (L3 落盘) — wrapCommand 自动调用
保留 runCommandAutoFix pipeline (silent fix 透传)
修改方式: Write 整文件重写.
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
|
2026-07-21 20:14:31 +08:00 |
|
ssw
|
39166d11c6
|
feat(dacli): report/publish.ts 完整 wrapCommand 迁移 (P6 5 exit 收口)
5 处 process.exit(1) → ctx.fail():
- 拉原报表失败
- validateReportCreate 校验失败 (basic info 缺)
- --cells 必传缺失 (publish 隐式 type=1)
- --cells 不是合法 JSON
- 后端 code !== 200 (含 enhanceFromBackend 错误增强)
修改方式: Write 整文件重写.
与 report/release/update 同 pattern (P2-2 cells JSON 预校验保留).
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
|
2026-07-21 20:13:44 +08:00 |
|
ssw
|
06224b8133
|
feat(dacli): report/update.ts 完整 wrapCommand 迁移 (P6 5 exit 收口)
5 处 process.exit(1) → ctx.fail():
- validateBasicInfo 失败 (P1-1)
- validateNumeric 失败
- report id 不存在
- --cells 不是合法 JSON (P2-2)
- 后端 code !== 200
修改方式: Write 整文件重写 (Edit 工具不匹配, step 重排风险).
与 report/release 同 pattern (P1-2 spread 后 delete systemId 保留).
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
|
2026-07-21 20:13:06 +08:00 |
|
ssw
|
4e2ee5f286
|
feat(dacli): portal/setDefault.ts 完整 wrapCommand 迁移 (P6 5 exit 收口)
5 处 process.exit(1) → ctx.fail(), 写 CommandLog (L3):
- 必传校验 (--portalId / --menuId 二选一)
- --portalId 数字校验失败 (P2-4 修复, 输 fullName 提前 fail)
- --menuId 数字校验失败
- BS-110 portalId 解析 menuId 失败
- 后端 code !== 200
迁移模式统一:
- import { setupOutputFilter, addOutputOptions, wrapCommand }
- 删本地 --json (改 addOutputOptions 注入)
- Opts interface 加 verbose?: boolean
- .action 开头 setupOutputFilter(opts)
- 整块业务逻辑 wrapCommand 包 + try/catch → ctx.success/fail
修改方式: Write 整文件重写 (Edit 工具不匹配, step 重排风险).
注: Write tool 转义反引号时产生 quote imbalance, 后续 Python 脚本清理.
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
P6 累计: 剩 workflow/create (9) + form/codegen (8) + workflow/update (6) + form/create (13)
+ bigscreen/construct (6) + app/create (6) + report/update (5) + report/publish (5)
+ report/create (5) + form/update (5) = ~62 exit 散布 10 文件.
|
2026-07-21 20:04:36 +08:00 |
|
ssw
|
b665b8b260
|
feat(dacli): di/create.ts 完整 wrapCommand 迁移 (P6 6 exit 收口, 含 step machine)
6 处 process.exit → wrapCommand handler ctx.fail():
- validation 缺 fullName/enCode/category (exit 2 → fail summary 含 3 个 bool)
- runDiStepMachineCreate 抛错 (替代原 process.exit(1), handler catch → fail)
- --from-json-file 文件不存在
- --from-json-file JSON.parse 失败
- 后端 code !== 200 (含 enhanceFromBackend + formatErrorLine 错误增强)
- (其他 try/catch 兜底)
重构关键:
- runDiStepMachineCreate 内部 process.exit(1) → throw new Error(...)
wrapCommand handler catch → ctx.fail(`step machine 校验失败: ...`)
原版内部 exit 会绕开 L3 CommandLog 落盘, 改抛错后 handler 收口
- 删分散的 4 处 printCommandEnd (L3 落盘) — wrapCommand 自动调用
- 删本地 --verbose/--json (改 addOutputOptions 注入)
- runCommandAutoFix 后 opts.assign 保留 (silent fix 透传)
迁移模式统一:
- import { setupOutputFilter, addOutputOptions, wrapCommand }
- Opts interface 加 verbose?: boolean (原 verbose 已存在)
- .action 开头 setupOutputFilter(opts)
- 整块业务逻辑 wrapCommand 包 + try/catch → ctx.success/fail
- log.error 输出保留 (用户感知) + ctx.fail 收口 (供 L3)
修改方式: Write 整文件重写 (Edit 工具不匹配, step machine 重排 + 6 exit 收口风险).
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
P6 累计: 剩 workflow/create (9) + form/codegen (8) + workflow/update (6) + form/create (13)
+ bigscreen/construct (6) + app/create (6) + report/update (5) + report/publish (5)
+ report/create (5) + portal/setDefault (5) + form/update (5) = ~67 exit 散布 11 文件.
form/audit.ts + log/last.ts 跳过 (semantic 退出码 / meta-recursive).
|
2026-07-21 20:02:32 +08:00 |
|
ssw
|
9a59adc9ac
|
feat(dacli): report/release.ts 完整 wrapCommand 迁移 (P6 6 exit 收口)
6 处 process.exit(1) → ctx.fail(), 写 CommandLog (L3):
- step 1: id 不存在
- step 1.5a: basic info 校验失败 (fullName/enCode/category)
- step 1.5b: numeric 校验失败 (sortCode/enabledMark)
- step 2: --type=1 必传 --cells 缺失
- step 2.5: --cells 不是合法 JSON
- step 4: 后端 code !== 200
每步 summary 含 id/type/code/msg/errors 详细 (供 dacli log last 复盘).
DEPRECATION 警告 (v0.16+) 保留在 wrapCommand 内, log.warn 进 buffer (quiet
模式下汇总输出, verbose 立即可见), 不影响 exit code.
迁移模式统一:
- import { setupOutputFilter, addOutputOptions, wrapCommand }
- 删本地 --json (改 addOutputOptions 注入)
- Opts interface 加 verbose?: boolean
- .action 开头 setupOutputFilter(opts)
- 整块 step machine (step 1-4) wrapCommand 包 + try/catch → ctx.success/fail
- validateBasicInfo/validateNumeric 错误保留 log.error 输出 (用户感知)
修改方式: Write 整文件重写 (Edit 工具不匹配, step machine 重排风险).
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
P6 累计: 剩 form/create (13) + workflow/create (9) + form/codegen (8) + workflow/update (6)
+ di/create (6) + bigscreen/construct (6) + app/create (6) + report/update (5) + report/publish (5)
+ report/create (5) + portal/setDefault (5) + form/update (5) = ~73 exit 散布 12 文件.
form/audit.ts + log/last.ts 跳过 (semantic 退出码 / meta-recursive).
|
2026-07-21 20:01:10 +08:00 |
|
ssw
|
8b8f9cf5b3
|
feat(dacli): di/copy + di/export 完整 wrapCommand 迁移 (P2 收口 P0-9)
2 文件 4 处 process.exit(1) → ctx.fail(), 写 CommandLog (L3):
- di/copy.ts: id 校验失败 / 后端 code!=200 / 后端未返新 id 三路径全 ctx.fail
- summary 含 sourceId/newId/code/msg (供 `dacli log last` 复盘)
- di/export.ts: id 校验失败 / 后端 code!=200 / 后端未返 url 三路径全 ctx.fail
- summary 含 id/name/url (下载 URL 是 OSS/MinIO 预签名短期有效, log 留痕很重要)
每文件统一模式:
- import { setupOutputFilter, addOutputOptions, wrapCommand }
- 删本地 --json (改 addOutputOptions 注入 --verbose --json)
- Opts interface 加 verbose?: boolean
- .action 开头 setupOutputFilter(opts)
- 整块业务逻辑 wrapCommand 包 + try/catch → ctx.success/fail
- log.error 输出保留 (用户感知) + ctx.fail 收口 (供 L3)
修改方式: Write 整文件重写 (Edit 工具不匹配, per handoff 规则 #6).
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
P0-9 (id 校验提示 '用 dacli di list 查 id') + P2 (wrapCommand 化) 一并收口.
剩: P2 form/create + workflow/create + form/codegen (大文件 sub-handler 拆分) + P6 大坑.
|
2026-07-21 18:51:33 +08:00 |
|
ssw
|
aa21fc57ef
|
docs(ADR 0015): P4 v3 全量收口固化 + §4.1 经验教训段
新增 §4.1 'P4 v3 全量收口 (2026-07-21)' 详细段:
- 范围修正: scan 估算 ~330 处, 实际 25 文件 33+ 处真表格. 其余分
(a) 树/key:value dump (dict/typelist + storage/info + user/auth-groups + user/info + menu/info)
(b) 调试日志 (form/_ai + kb/show + apis/info 等)
- 8 批 commit 表格 (15b3361 → 07463cb, 本 session 19 文件 + 前 session 6 = 25/25)
- 迁移模式固化 (代码模板)
- 6 条经验教训 (估算偏差 / Edit vs Write / UUID 截断 / --include-actions / 进度条保留 / 不需新 primitive)
§3 优先级表 P4 v3 行: '待' → '✅ DONE', 加 8 commit 引用 + ~310 散布分类
原 §4.1-4.4 顺延 → §4.2-4.5 (P0 ROI / P1 紧跟 / P3 不放 P1 前 / P5-P6 风险).
验证:
- TS compile baseline 57 不变
- 73/73 vitest PASS
- P4 v3 全量收口闭环: 25/25 REAL_TABLE 文件
|
2026-07-21 18:48:56 +08:00 |
|
ssw
|
07463cb8c9
|
feat(dacli): P4 v3 batch 8 — menu/list.ts (复杂 2 表) wrapCommand + printRawTable
menu/list.ts: 命令路径 P4 v3 全量最复杂文件 (1 文件 2 表 + 多 flag):
- 表 1: system/Menu 树 (4 列 ID/FULL_NAME/ENCODE/URL), maxColWidth=80
- 表 2: form Actions/Module (4 列 FORM_ID/FORM_ENC/TYPE/MENU_PATH), PC+APP 两路平铺
Options 处理:
- --include-actions 默认 ON (--no-include-actions 关), P2-8 修复
- --flat 保留 (但当前版本未实现树形打印, 后续 task)
- --keyword 模糊搜索
改造要点:
- printCommandEnd + try/catch/finally → wrapCommand + ctx.success/fail
- 删本地 --verbose/--json (改 addOutputOptions 注入)
- Opts interface 加 verbose?: boolean
- log.raw('\n') 分隔两个表 (代替原 console.log(''))
- Actions/Module 合并 flatMap: PC/APP 两路展平成多行
- 进度条 process.stderr.write("\r 扫描 form: ...") 保留 (不走 quiet 缓冲, 真实进度可见)
- summary 对象含 systemMenus/formActionsMenus/formActionsScanned/formActionsFailed
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
P4 v3 全量收口: 25 REAL_TABLE 文件全部迁移完毕.
- 已 done (prior session): datasource/list, dm/{list,fields}, dict/datalist, di/list, apis/list (6)
- 本 session (8 batches): report/list, storage/list, workflow/list, apis/{search,tags},
app/list, bigscreen/list, portal/list, doc/{list,toc}, form/selector, kb/list,
msg/{noticeList,templateList}, monitor/online, org/list, print/list, role/{list,selector},
schedule/log, user/{get-position,list}, workflow/{selector,tasks}, menu/list (19)
总计 25/25 = 100%.
|
2026-07-21 18:47:50 +08:00 |
|
ssw
|
4c417cc686
|
feat(dacli): P4 v3 batch 7 — workflow/{selector,tasks} 完整 wrapCommand + printRawTable
2 文件:
- workflow/selector.ts: 4 列 ID/FULL_NAME/ENCODE/CATEGORY (AI 创建菜单挂工作流 type=4 时必跑)
- workflow/tasks.ts: 5 列 TASK_ID/FLOW_NAME/CREATOR/TIME/STATE (我的流程任务 待签/待办/已办/抄送)
每文件统一模式:
- 改 import setupOutputFilter → setupOutputFilter, addOutputOptions, wrapCommand
- 删本地 --verbose/--json (改 addOutputOptions 注入)
- Opts interface 加 verbose?: boolean
- .action 开头 setupOutputFilter(opts)
- 整块业务逻辑 wrapCommand 包 + try/catch → ctx.success/fail
- 原 code!==200 检查 → ctx.fail()
- console.log table → log.printRawTable
workflow/tasks 特殊:
- 5 列最长, default maxColWidth=36 自动截断足够
- 多种 fallback 字段名 (id||taskId, flowName||fullName, creatorUser||userName, ...)
- CATEGORY_NAMES 中文映射 (待签/待办/已办/抄送)
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
剩 1 REAL_TABLE 文件. 下批: menu/list.ts (复杂 2 表 + --include-actions + --flat 选项, 用 Write 全文件重写).
|
2026-07-21 18:46:57 +08:00 |
|
ssw
|
73784f6d73
|
feat(dacli): P4 v3 batch 6 — schedule + user 3 文件 wrapCommand + printRawTable
3 文件:
- schedule/log.ts: 4 列 ID/RUN_TIME/RESULT/DESCRIPTION (定时任务执行日志, 中文 成功/失败)
- user/get-position.ts: 4 列 POSITION_ID/ORGANIZE/POSITION_NAME/IS_MAIN (admin 查用户岗位)
- user/list.ts: 6 列 ID/ACCOUNT/REAL_NAME/ORG/POSITION/ENABLED (P1 权限三角 2 号, 中文 是/否)
每文件统一模式:
- import { setupOutputFilter, addOutputOptions, wrapCommand }
- 删本地 --json (改 addOutputOptions 注入)
- .action 开头 setupOutputFilter(opts)
- 整块业务逻辑 wrapCommand 包 + try/catch → ctx.success/fail
- 原 code!==200 检查 → ctx.fail()
- console.log table → log.printRawTable
schedule/log 特殊:
- maxColWidth=80 (描述字段可能较长)
- '成功'/'失败'/'-' 三态 runResult
user/list 特殊:
- 6 列最长, default maxColWidth=36 自动截断足够
- 中文 启用标记 (是/否)
验证:
- TS compile 0 新错误 (baseline 57 不变)
- 73/73 单元测试 PASS
剩 3 REAL_TABLE 文件. 下批: workflow/selector + workflow/tasks (2 文件) + menu/list.ts (复杂 2 表).
|
2026-07-21 18:46:04 +08:00 |
|