fix(pack-update): DRY/OCP/DIP 收敛 CF 源编排(审查 005fa99) - #61
Merged
Tanya7z merged 1 commit intoJul 24, 2026
Conversation
审查 main@005fa99 pack-update(CF 探测增强)后的可验证债: - 测试改从 dist 导入 version-policy,去掉 250+ 行内联复制 - 抽取 searchAndRankHits / tryInstallResourcePack / makeBindingFromHit - createPackSourceProvider + PackProviderId,编排层只依赖接口 - 删除未接线的 byUuidInArchive/byName;getPackMatchConfig 收敛 Demeter - formatDownloadSpeed 统一 BDS/CF 下载速度文案;移除无用 cli-progress 依赖 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
Tanya7z
marked this pull request as ready for review
July 24, 2026 10:38
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. |
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.
背景
mainpush0c2026f…005fa99(世界包 CF 源更新 + 探测增强)。ootb 已绿(run30085107489)。本 PR 收敛审查中可验证的 DRY / OCP / DIP / LSP / Demeter 债。审查(原则标注)
pack-update-policy.test.mjs内联复制 ~250 行version-policy.ts,测与生产易漂移probeSourceAfterInstall/searchRemote重复 search+rank;applyUpdate两处 RP 安装循环match.byUuidInArchive/byName写入 defaults+文档但从未读取new CurseForgeBedrockProvider+ 深挖cfg.providers.curseforge.match.*cli-progress已无 import 仍留依赖normalize/collectQuerySeeds共享预处理改动
dist/pack-update/version-policy.js导入权威实现;npm test先 buildsearchAndRankHits/tryInstallResourcePack/makeBindingFromHit/baseCheckFieldscreatePackSourceProvider+PackProviderId;getProvider返回PackSourceProvidergetPackMatchConfig;加载时剥离旧脏字段formatDownloadSpeed进@sfmc-bds/sdk/logs;移除 sfmc/bds-tools 无用cli-progress验证
npm run typecheck -w @sfmc-bds/cli/bds-toolsnpm test -w @sfmc-bds/cli(12 pass)npm test -w @sfmc-bds/bds-tools(20 pass)未改