fix(pack): SOLID — 过期 RP 清理 + assemble-rp --modules-json - #44
Merged
Tanya7z merged 1 commit intoJul 23, 2026
Merged
Conversation
审查 main@52eb1f7 pack-lifecycle 合入后的问题并直接补丁: - BLOCKER: deploy 时 disable 过期 BP/RP 清单项,并以 --clear-rp 删除世界内残留 RP 目录 - MAJOR OCP/DRY: assemble-rp 支持 --modules-json 显式 map,去掉 sfmc 侧整树临时镜像 - MAJOR DRY/DIP: level/manifest/has-pack 委托 pack-manager CLI(单一权威) - MAJOR LSP: enabledByDefault 与 db-server 对齐(!== false) - MINOR: 移除 writePermissionsJson 中死代码 void copyDirAsync - 回归测试: pack-manager-lifecycle.test.mjs (modules-json / clear-rp / has-pack) Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
Tanya7z
marked this pull request as ready for review
July 23, 2026 07:21
Member
|
thanks |
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. |
3 tasks
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@52eb1f7(module pack lifecycle + resource pack)合入后的 SOLID/正确性问题,直接提交补丁。ootb CI 绿,但功能与架构债需修:
BLOCKER
world_*_packs.json仍保留旧条目,世界内 RP 目录也不删 →--clear-rp+disable-pack清理MAJOR
buildPacks用临时目录镜像整树绕开assemble-rp只扫--modules-dir→ 新增--modules-json显式 mapresolveBdsContext/readManifestHeader/worldPackListHas重复 pack-manager 逻辑 → 委托read-level/read-manifest/has-packCLIenabledByDefault缺省false与 db-server!== false契约不一致 → 对齐MINOR
writePermissionsJson中void copyDirAsync死代码Tests
bds-tools/pack-manager-lifecycle.test.mjs— modules-json / clear-rp / has-pack / read-manifest(6/6 pass)Review principles
DRY · OCP · DIP · LSP · Law of Demeter
Test plan
npm run build -w @sfmc-bds/sdk -w @sfmc-bds/bds-tools -w @sfmc-bds/clinpm test -w @sfmc-bds/bds-toolssfmc pack deploy→ 确认world_resource_packs.json无旧 uuid 且resource_packs/sfmc-modules-rp已删