fix(pack-update): DRY fileId 已应用 + OCP treatAsUpdate RP bump - #71
Merged
Tanya7z merged 1 commit intoJul 24, 2026
Merged
Conversation
525e69f 修复「同版本未 apply 也需同步」后,编排层仍复刻 versionPolicy 字段计算 shouldBumpRp,且 lastApplied 判定多处手写。抽 isFileIdApplied, 扩展 decideVersionPolicy({ treatAsUpdate }) 为唯一策略源,并补契约测。 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
Tanya7z
marked this pull request as ready for review
July 24, 2026 17:24
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.
Summary
525e69f资源包更新修复)后的 SOLID 残余:编排层复刻versionPolicy字段算shouldBumpRp,且lastAppliedFileId判定多处手写。isFileIdApplied统一 fileId 已应用判断(DRY)。decideVersionPolicy(..., { treatAsUpdate })成为强制同步场景下 RP bump 的唯一策略源(OCP/DRY);prepareCheck下载路径在 early-return 后恒为待 apply。treatAsUpdate契约测试。审查(本轮 push)
shouldBumpRp在 service 复刻 policylastAppliedFileId三处手写upToDate死分支(已删)ootb@d2cff75:success
30097696560(本轮无 wf 红)。Test plan
npm run build --workspaces --if-presentnode --test pack-update-policy.test.mjs pack-update-config.test.mjs terminal-progress.test.mjs(21 pass)