Skip to content

fix(wf@67069bf): ootb module/mod HELP 断言失败 + printVersion / 误提交 tgz - #32

Merged
Tanya7z merged 1 commit into
mainfrom
cursor/bc-1aa8ab0b-2dd0-4996-b9b8-2429c855a295-9973
Jul 22, 2026
Merged

fix(wf@67069bf): ootb module/mod HELP 断言失败 + printVersion / 误提交 tgz#32
Tanya7z merged 1 commit into
mainfrom
cursor/bc-1aa8ab0b-2dd0-4996-b9b8-2429c855a295-9973

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

main@8fc0989 / 67069bf 的 ootb 工作流失败(runs 2994009771429940147800):sfmc --help 将别名写成 module/mod list 后,tools/check-ootb.mjs 仍用 /module\s+(list|install)/,断言失败(10 PASS / 1 FAIL)。

本 PR 直接修 CI,并顺带修同批 push 中可验证的 SOLID / 卫生问题。

审查(DRY · OCP · DIP · LSP · Demeter)

级别 原则 问题 处理
BLOCKER DRY HELP 文案与 ootb 断言对「module 命令」各写一套;别名改成 module/mod 后断言漂移 放宽/兼容 module(/…)? list|install,并让 HELP 标签来自 MODULE_CMD_NAMES
BLOCKER sfmc --version 模板字符串未 console.log,无输出 修复 printVersion
MAJOR 67069bf 误提交仓根 sfmc-bds-sfmc-0.1.0.tgz git rm + .gitignore *.tgz
MAJOR OCP / DRY main/repl 硬编码 case "module": case "mod",与 MODULE_CMD_NAMES 双源 统一走 isModuleCommand();新增别名只改一处
MINOR DRY spawnService / spawnServiceSync 重复拼子进程 env serviceChildEnv

未在本 PR 展开(仍见 #31 / 设计债):

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

验证

npm install --no-audit --no-fund
npm run build --workspaces --if-present
SFMC_ROOT=$PWD npm run check-ootb   # 11/11 PASS
node sfmc/dist/main.js --help       # 含 module/mod list|install
node sfmc/dist/main.js --version    # 有版本输出

Test plan

  • CI ootb 在本分支绿
  • sfmc module list / sfmc mod list 行为不变
  • 确认仓根无 *.tgz
Open in Web View Automation 

ootb 因 HELP 改为 `module/mod list` 后仍用 `/module\s+(list|install)/` 失败。
同步收紧 DRY/OCP:MODULE_CMD_NAMES 驱动 HELP/分发;修复 --version 空输出;
删除仓根误提交的 npm pack 产物并 ignore *.tgz。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
@Tanya7z
Tanya7z marked this pull request as ready for review July 22, 2026 17:01
@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.

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