Skip to content

fix(solid): sql-helpers + tx requires 单点 + npm-publish DRY(取代 #20)#21

Merged
Tanya7z merged 1 commit into
mainfrom
cursor/bc-a016fc90-1962-4023-90b6-c4594f084a07-69fe
Jul 22, 2026
Merged

fix(solid): sql-helpers + tx requires 单点 + npm-publish DRY(取代 #20)#21
Tanya7z merged 1 commit into
mainfrom
cursor/bc-a016fc90-1962-4023-90b6-c4594f084a07-69fe

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

审查 main push 2dbb079pubulish:sdk,db,qq,cil,bds-tools@sfmc@sfmc-bds 发包)后的 DRY · OCP · DIP · LSP · LoD 跟进补丁。

审查发现 → 已修

级别 原则 问题 修复
MAJOR DRY economy 本地 sql() 与未使用且易误用的 raw() 并存 sql() 提升为 sql-helpers 权威入口;测试钉死 raw 插值脚枪
MAJOR DRY / LSP TxRunner.doService 重复 requires 预检;未注册服务在 tx 误报 not_in_requires requires/自调用只走 ServiceRegistry.dispatchDispatchError 透传
MAJOR DRY config/db/service 三份 withModuleId HttpDB.withModuleId(path, moduleId)
MAJOR DRY npm-publish.yml 里 bash case + JS map 双份包清单;文档还声称 module tag 也会走 CI 权威入口 tools/lib/npm-publish-packages.mjs + resolve-npm-publish-tag.mjs;文档对齐
MAJOR npm-publish 钉 Node 22.13,与 ootb(22.22 / npm-run-all2)漂移,tag 发布易踩 EBADENGINE 对齐 22.22;SDK engines ≥22.13
MINOR npm test 找不存在的 src/*.test.js build && node --test dist/*.test.js

仍未修(已知债)

  • DIP: host token 注入 / 进程级共享 HttpDB.authToken
  • LSP: db.tx 录制器语义;响应信封 ok vs success
  • OCP: economy handler 仍在 index.ts 硬编码接线
  • LoD: req.moduleAuth 私有字段

Test plan

  • cd db-server && npm test(6/6)
  • SFMC_ROOT=$PWD node tools/check-ootb.mjs(10/10)
  • GITHUB_REF_NAME='@sfmc-bds/sdk@v0.1.0' node tools/resolve-npm-publish-tag.mjs
  • CI ootb on this PR
Open in Web View Automation 

审查 main@2dbb079(@sfmc-bds 发包)后的跟进补丁,覆盖并取代 #20:

- DRY: economy 本地 sql() → sql-helpers;HttpDB.withModuleId 统一三抽屉
- DRY/LSP: tx.doService 去掉重复 requires 预检,错误码走 DispatchError
- DRY: npm-publish 包清单抽到 tools/lib/npm-publish-packages.mjs
- CI: npm-publish Node 对齐 ootb 的 22.22;SDK engines ≥22.13

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

@Tanya7z
Tanya7z merged commit 6e08f50 into main Jul 22, 2026
1 check passed
@Tanya7z
Tanya7z deleted the cursor/bc-a016fc90-1962-4023-90b6-c4594f084a07-69fe branch July 22, 2026 12:22

@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 审查 — merge #21 → main@6e08f50

ootb:绿(run 29919341042)。#21 的 sql-helpers / tx requires 单点 / withModuleId / npm-publish DRY 落地正确,无回退 BLOCKER。

本轮仍发现的高置信度项 → 已开跟进 PR

级别 原则
MAJOR LSP HttpDB.typedRequest 对 HTTP 200+{success:false} 误判成功
MAJOR LSP service 路由成功 ok / 失败 success 方言分裂
MINOR LoD/DRY req.moduleAuth 私有字段 + 三处重复读取
MINOR AGENTS.md 过时 FROM ? 说法

跟进补丁:后续 automation PR(标题含「HTTP 信封 LSP + moduleAuth 经 ctx」)。

刻意未动(需 Stage-F / 协议设计)

  • DIP: host token 注入
  • LSP: db.tx 录制器
  • OCP: economy handler 硬编码接线
Open in Web View Automation 

Sent by Cursor Automation: SFMC-Review

Tanya7z added a commit that referenced this pull request Jul 22, 2026
…b43a-fefb699df606-1b11

fix(solid): HTTP 信封 LSP + moduleAuth 经 ctx(#21 跟进)
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