fix(solid): sql-helpers 权威入口 + tx requires 单点 + withModuleId DRY#20
Closed
cursor[bot] wants to merge 3 commits into
Closed
fix(solid): sql-helpers 权威入口 + tx requires 单点 + withModuleId DRY#20cursor[bot] wants to merge 3 commits into
cursor[bot] wants to merge 3 commits into
Conversation
#19 在 domain 内另造 sql(),与未使用且易误用的 raw() 并存(DRY)。 sql() 现为「标识符嵌入 + 值绑定」唯一入口;补充 raw() 插值脚枪测试, 并修正 npm test 指向 dist/*.test.js。 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
移除 doService 重复 requires 预检(DRY),避免未注册服务在 tx 路径 被误报为 not_in_requires(LSP)。DispatchError.domain_error 透传给 TxError。 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
config/db/service 各有一份 withModuleId(#13 又加了第三份)。 统一到 HttpDB.withModuleId(path, moduleId)(DRY/LSP)。 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
Contributor
Author
There was a problem hiding this comment.
审查跟进:本 PR 已被取代
main 上的 2dbb079(@sfmc → @sfmc-bds 发包)使本分支与 db-server/package.json / economy.ts 等产生冲突。
ootb 在该 push 上已绿;SOLID 修复已在当前 main 上重放并扩展(含 npm-publish DRY + Node 22.22 对齐),见后续 PR(本 automation 新开)。
建议关闭本草稿 #20,改审新 PR。
Sent by Cursor Automation: SFMC-Review
4 tasks
Member
|
Superseded by #21 (rebased onto main@2dbb079 with npm-publish DRY). Closing as outdated. |
Tanya7z
added a commit
that referenced
this pull request
Jul 22, 2026
…90b6-c4594f084a07-69fe fix(solid): sql-helpers + tx requires 单点 + npm-publish DRY(取代 #20)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
审查 main push(合并 #19 economy SQL rebind + #13 config/service 门)后的 DRY · OCP · DIP · LSP · LoD 跟进补丁。ootb CI 在 #19 合并后已绿;本 PR 修高置信契约/重复问题。
已修复
economy.ts另造本地sql(),与sql-helpers.raw并存;且${raw(table)}插值实测仍变FROM ?(脚枪)sql()为sql-helpers权威入口;文档/测试钉死 raw 只能.appendTxRunner.doService重复 requires 预检;未注册服务在 tx 路径误报not_in_requires,HTTP 为no_such_serviceServiceRegistry.dispatch;domain_error透传 TxErrorwithModuleId(#13 又加第三份)HttpDB.withModuleId(path, moduleId)npm test找不存在的src/*.test.jsbuild && node --test dist/*.test.js仍未修(已知债,非本轮)
HttpDB.authTokendb.tx录制器语义;响应信封okvssuccessindex.ts硬编码接线req.moduleAuth私有字段Test plan
cd db-server && npm test(6/6)SFMC_ROOT=$PWD node tools/check-ootb.mjs(10/10)