Skip to content

fix(solid@1c9c24d): orderBy LSP + publish workspaces 门禁 + HttpDB 按请求鉴权 - #29

Merged
Tanya7z merged 2 commits into
mainfrom
cursor/bc-517df327-46d6-4292-baf0-c61fe7723bd1-c107
Jul 22, 2026
Merged

fix(solid@1c9c24d): orderBy LSP + publish workspaces 门禁 + HttpDB 按请求鉴权#29
Tanya7z merged 2 commits into
mainfrom
cursor/bc-517df327-46d6-4292-baf0-c61fe7723bd1-c107

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

背景

Push main@1c9c24d(合入 #28)后 ootb 已绿。审查仍发现可验证 SOLID 问题;@sfmc-bds/tools@v0.1.0 tag 仍指向缺 workspaces 的 ba65eb9,同类失败需门禁防再发。

审查结论(DRY / OCP / DIP / LSP / Demeter)

级别 原则 处理
MAJOR LSP SDK OrderBy.field vs tx-runner col normalizeOrderBy 互通 + 数组
MAJOR DRY 发包清单未校验 root workspaces resolve-tag + check-ootb 共用断言
MAJOR LSP db.tx query/get 返回 []/null stub 录制期显式抛 tx_interactive_required
MINOR→修 DIP 模块客户端抢 HttpDB.authToken static 按请求传 authToken
未改 LSP 平台 legacy {success} 方言 客户端已双认
未改 完整两阶段 tx 读回协议 需另设计

修复

  1. db-server/src/lib/order-by.ts + tx-runner 使用
  2. assertPublishPackageInWorkspaces(tools lib)
  3. HttpDB typedRequest(..., { authToken });db/config/service 各自持有 token
  4. db.tx:query/get 禁止假读回;call 仍可入队

验证

  • db-server npm test:8/8
  • SFMC_ROOT=$PWD node tools/check-ootb.mjs:10/10(含新 workspaces 项)

合入后操作

  • @sfmc-bds/tools@v0.1.0:在含 workspaces 的 main 上 workflow_dispatch 指定该 tag(checkout 默认分支即可),或挪 tag / 发 0.1.1
Open in Web View Automation 

cursoragent and others added 2 commits July 22, 2026 14:18
SDK OrderBy 用 field,tx-runner 只认 col,带 orderBy 的 query 会炸。
抽取 normalizeOrderBy 兼收 field/col 与数组。

清单包必须落在 root workspaces,否则 npm -w 再现 ba65eb9 tools 失败;
resolve-npm-publish-tag 与 check-ootb 共用断言(DRY)。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
模块 db/config/service 不再写进程级 authToken,避免与 ConfigManager
互相覆盖(DIP)。db.tx 录制期 query/get 显式抛错,不再返回 []/null stub(LSP);
call 仍可入队但返回值不可用。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
@Tanya7z
Tanya7z marked this pull request as ready for review July 22, 2026 14:24
@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 894436a into main Jul 22, 2026
1 check passed
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