Skip to content

fix(wf@3d15949): #33 合并 TS6133 + banned_items/canDisable LSP - #35

Closed
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/bc-27f451f2-84a0-41c1-b0fe-8c459758f571-f992
Closed

fix(wf@3d15949): #33 合并 TS6133 + banned_items/canDisable LSP#35
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/bc-27f451f2-84a0-41c1-b0fe-8c459758f571-f992

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

main@3d15949(合入 #33)ootb 再次失败(run 29940895451):#32/#33 合并残留未使用的 MODULE_HELP_LABEL,触发 TS6133sfmc workspace build 红。

同批审查(DRY · OCP · DIP · LSP · Demeter)发现并修复两处可验证 MAJOR LSP,以及相关 DRY/防御加固。

触发背景:此前 #31 合入后 ootb 失败(module/mod HELP)已由 #32/#33 修复;本 PR 修 #33 合并回归 + 残留 SOLID。

审查

级别 原则 问题 处理
BLOCKER DRY #32 MODULE_HELP_LABEL#33 paintModuleCmdAlias 合并后双源,前者未删 → TS6133 阻塞 ootb 删除死代码,HELP 只走 paintModuleCmdAlias
MAJOR LSP / DRY configs/all.banned_items{item_id},ConfigManager/AllConfigs/GET /banned_items 契约是 string[] → 缓存恒空 getAllConfigs 复用 helpers,返回 string[]
MAJOR LSP / DRY catalog 省略 canDisable 时 list 报 can_disable:trueresolveModuleByKey 裸返回 → disable 被 !undefined moduleCanDisable() 同源归一化
MINOR LSP service.get 失败一律 code:"internal"(db 客户端已保留 code) 对齐保留服务端 code
MINOR LSP ConfigManager 仅认 string 兼容历史 {item_id}
MINOR ootb 未锁 banned_items 形状 断言元素为 string

未展开(仍为设计债):

  • DIP:运行时 enable 热更新 token/enabledSet
  • LSP:db.tx 两阶段读回协议

验证

npm run build --workspaces --if-present
SFMC_ROOT=$PWD npm run check-ootb   # 11/11 PASS
# 隔离 SFMC_ROOT:configs/all.banned_items 为 string[];
# catalog 无 canDisable 时 POST disable → success

Test plan

  • CI ootb 在本分支绿
  • GET /api/sfmc/configs/allbanned_itemsstring[]
  • catalog 省略 canDisable 的模块可 POST .../disable
Open in Web View Automation 

cursoragent and others added 2 commits July 22, 2026 17:10
- 删除 #32/#33 合并后未使用的 MODULE_HELP_LABEL(阻塞 sfmc build/ootb)
- configs/all.banned_items 改为 string[] 并复用单资源 helpers(DRY/LSP)
- resolveModuleByKey 归一化 canDisable 默认值,与 list.can_disable 同源
- service.get 保留服务端 code;ConfigManager 兼容历史 {item_id}
- ootb 断言 configs/all.banned_items 元素为 string

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
#33 合入后 HELP 只走 paintModuleCmdAlias;死导出会再触发 noUnusedLocals。
与并行 #34 对齐,避免双 PR 漏删。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Jul 22, 2026
与并行 #35 对齐:service 客户端勿一律打成 internal(LSP);
ootb 回归守卫 configs/all.banned_items 必须为 string[]。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Jul 22, 2026
…e LSP

与并行 #34/#35 对齐并超集:
- moduleCanDisable 供 list/disable 同源
- getAllConfigs 委托单资源 helpers;banned_items 权威 string[]
- ConfigManager 兼容历史 {item_id};ootb 锁形状
- service.get 保留服务端 code(勿一律 internal)

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

并行 PR 说明

本 PR 与 #34/#36 同修 main@3d15949TS6133 + SOLID LSP。本 PR 中的 moduleCanDisable / getAllConfigs helpers / ConfigManager 兼容 / service.get code / ootb 断言已吸收进 #36

建议关闭本 PR,改合 #36:超集,另含 enable 热同步(本 PR Out of scope 的 MAJOR DIP)。

View PR

Open in Web View Automation 

Sent by Cursor Automation: SFMC-Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants