Skip to content

fix(ci): sdk contracts 精简后补迁 Economy*Row — 修复 ootb 构建 - #47

Merged
Tanya7z merged 2 commits into
mainfrom
cursor/bc-cad331e8-5423-4bee-9248-d544b1acd695-80f6
Jul 23, 2026
Merged

fix(ci): sdk contracts 精简后补迁 Economy*Row — 修复 ootb 构建#47
Tanya7z merged 2 commits into
mainfrom
cursor/bc-cad331e8-5423-4bee-9248-d544b1acd695-80f6

Conversation

@cursor

@cursor cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

背景

main@0990780(sdk 共享契约精简)删除了 @sfmc-bds/sdk/contracts 中的 economy/land/chat/coop 等业务域类型,但 db-server/src/domain/economy.ts 仍从该入口导入 EconomyAccountRow / EconomyTransactionRow

ootb Build all workspacestsc --emitDeclarationOnly 阶段失败:

TS2305: Module '"@sfmc-bds/sdk/contracts"' has no exported member 'EconomyAccountRow'.
TS2305: Module '"@sfmc-bds/sdk/contracts"' has no exported member 'EconomyTransactionRow'.

失败 run:29991000606

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

级别 原则 问题
BLOCKER DIP 平台 SDK 已不再拥有经济行类型,但 db-server 仍依赖已删除的具体契约导出 → CI 红
MINOR DRY SDK README 仍宣称 contracts 含 land/chat/coop/economy
正向 DIP / OCP 0990780 将业务域类型交还模块内部维护是正确方向;本补丁把权威定义落在 domain/economy.ts
残留 MINOR LSP EconomyTransactionRow.idempotency_keysfmc_economy_transactions 表列不完全对齐(历史债,本 PR 不改行为)

变更

  • db-server/src/domain/economy.ts 本地定义并导出 EconomyAccountRow / EconomyTransactionRow(与删除前契约一致)
  • 去掉对 @sfmc-bds/sdk/contracts 的经济类型导入
  • 同步修正 @sfmc-bds/sdk README 对 contracts 范围的描述

验证

npm install --no-audit --no-fund
npm run build --workspaces --if-present   # 通过(含 db-server --dts)
SFMC_ROOT=$PWD node tools/check-ootb.mjs  # 11/11 PASS
Open in Web View Automation 

sdk@0990780 精简 contracts 后 db-server 仍从 @sfmc-bds/sdk/contracts
导入已删除的 EconomyAccountRow / EconomyTransactionRow,导致 ootb
Build all workspaces 的 tsc --emitDeclarationOnly 失败。

按契约精简意图,业务行类型由经济域自行维护;同步修正 SDK README。

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.

#46 重叠

本 PR 正确修复了 BLOCKER(economy 行类型内聚到 db-server),但 #46 已覆盖同一修复,并额外处理:

  • MAJOR qqutilcheck-update 环依赖(Demeter/DIP)
  • MAJOR SEA Windows Terminal commandline LSP/路径引号
  • docs/api 侧 contracts 描述

#46 PR CI 已绿(ootb 29991280475)。建议关闭本 PR,合入 #46

View PR

Open in Web View Automation 

Sent by Cursor Automation: SFMC-Review

@Tanya7z
Tanya7z marked this pull request as ready for review July 23, 2026 11:09
@cursor

cursor Bot commented Jul 23, 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.

@Tanya7z
Tanya7z merged commit eb58194 into main Jul 23, 2026
1 check failed
Tanya7z added a commit that referenced this pull request Jul 23, 2026
…b7f2-1adb835cb742-f52d

fix(ci): eslint-plugin configs 漏交 + 移除残缺 land(post-#47 main)
@Tanya7z
Tanya7z deleted the cursor/bc-cad331e8-5423-4bee-9248-d544b1acd695-80f6 branch July 25, 2026 12:47
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