Skip to content

fix(wf@3d15949): TS6133 MODULE_HELP_LABEL + enable 热同步 token/enabledSet - #36

Merged
Tanya7z merged 5 commits into
mainfrom
cursor/bc-f100f85f-47fa-44ad-892e-63ad9ba02ce5-c172
Jul 22, 2026
Merged

fix(wf@3d15949): TS6133 MODULE_HELP_LABEL + enable 热同步 token/enabledSet#36
Tanya7z merged 5 commits into
mainfrom
cursor/bc-f100f85f-47fa-44ad-892e-63ad9ba02ce5-c172

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

合入 #33ootbBuild 阶段失败:sfmc/src/repl.ts 遗留未使用的 MODULE_HELP_LABELTS6133noUnusedLocals)。

同时补上审查发现的可验证 SOLID 债:

级别 原则 修复
BLOCKER DRY HELP 用 paintModuleCmdAlias 一次染色为 MODULE_HELP_LABEL;删除未使用的 MODULE_CMD_ALIAS_LABEL
MAJOR DIP setModuleEnabled 后同步 enabledSet / enabledManifests / moduleAuth.tokens / builtin handlers(抽 module-runtime-sync.ts
MAJOR LSP configs/all.banned_items 改为 string[](与 ConfigManager 契约对齐)
MAJOR LSP resolveModuleByKey 省略 canDisable 视为可禁用(与 list 同源)

Test plan

  • npm run build --workspaces --if-present
  • cd db-server && npm test(含 syncModuleRuntimeState 新用例,10/10)
  • SFMC_ROOT=$PWD node tools/check-ootb.mjs11/11 PASS

Out of scope

  • db.tx 两阶段交互读回(设计债,非本轮)
  • 平台 legacy {success} 方言全量迁移
Open in Web View Automation 

cursoragent and others added 4 commits July 22, 2026 17:12
#32/#33 合并后 HELP 改用 paintModuleCmdAlias,遗留 MODULE_HELP_LABEL
触发 noUnusedLocals,ootb 在 Build 阶段红。改为一次染色常量复用,
并删除未使用的 MODULE_CMD_ALIAS_LABEL(DRY)。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
MAJOR DIP: setModuleEnabled 后同步 enabledSet、enabledManifests、
moduleAuth.tokens 与 builtin handlers,使「只重启 BDS」可用新 token。
MAJOR LSP: configs/all.banned_items 改为 string[](与 ConfigManager 契约对齐);
resolveModuleByKey 省略 canDisable 视为可禁用(与 list 同源)。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
Record<string,string> 允许动态增删 feature-b token,避免 tsc 窄化报错。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
…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.

Stale comment

审查结论(本 PR)

合入 #33 后 ootb Build 因 MODULE_HELP_LABEL 死代码 → TS6133 失败。本 PR 修复该 BLOCKER,并交付并行 #34/#35 未覆盖的 MAJOR DIP(enable 热同步 token/enabledSet)。

级别 原则
BLOCKER DRY MODULE_HELP_LABEL = paintModuleCmdAlias(c.green) 一次复用
MAJOR DIP syncModuleRuntimeState 热更 enabledSet/manifests/tokens/builtins
MAJOR LSP banned_items string[] + moduleCanDisable 同源
MINOR LSP ConfigManager 兼容 {item_id}service.get 保留 code;ootb 锁形状

本地:build PASS · db-server tests 10/10 · check-ootb 11/11

建议合 #36,关闭重复 #34/#35 剩余设计债:db.tx 两阶段读回、legacy {success} 方言。

View PR

Open in Web View Automation 

Sent by Cursor Automation: SFMC-Review

@cursor

cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Prefer syncModuleRuntimeState (DIP) over inline syncRuntimeEnabled; DRY onto
module-auth/builtin-handlers helpers. Keep both sides' runtime tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Tanya7z
Tanya7z merged commit 85815c2 into main Jul 22, 2026
1 check passed
@Tanya7z
Tanya7z deleted the cursor/bc-f100f85f-47fa-44ad-892e-63ad9ba02ce5-c172 branch July 22, 2026 17:55

@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.

审查(push main@85815c2 = merge #36)· DRY/OCP/DIP/LSP/Demeter

CI

  • ootb run 29944458105success(Build / check-ootb / smoke-modules 全绿)
  • 此前 #37ec7986b 的 TS6133 Build 失败已被本 PR 合入修掉

本 PR 已覆盖(无需再改)

级别 原则
BLOCKER DRY MODULE_HELP_LABEL TS6133
MAJOR DIP syncModuleRuntimeState 热同步 token/enabledSet/builtins
MAJOR LSP banned_itemsstring[]moduleCanDisable list/disable 同源

合入后仍可验证、已另开补丁

级别 原则 补丁
MAJOR DRY/OCP builtin-handlers.serviceNamesregisterEconomyHandlers 双写;热卸装应跟 registry.moduleId #41
MINOR OCP/DRY db/tx 四份 session try/catch 复制 #41
MINOR Demeter cleanupModule 无差别 clear*ModuleContext() 误清其他模块 config 桶 #41

建议

  • 优先合 #41
  • 关闭冲突草稿 #39(差额已由 #41 承接)

未发现新的 BLOCKER。

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