fix(pack-update): 补齐未知总量进度条 LSP + DRY bindOk/touchBinding - #67
Merged
Tanya7z merged 1 commit intoJul 24, 2026
Merged
Conversation
#66 让 httpDownload 在无 Content-Length 时用 finalBytes 补最终进度回调, 但 bindByteProgressToBar 仍以占位 1MB start,总量变已知后不重设刻度。 重 start 对齐契约;抽取 bindOkParams / touchBinding;needKey 文案源无关化。 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
Tanya7z
marked this pull request as ready for review
July 24, 2026 12:48
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. |
Contributor
Author
There was a problem hiding this comment.
审查(#67 合入后 · main@dab1ad6)
ootb:success 30094461300。#67 的未知总量重 start / bindOkParams / touchBinding / needKey 源无关化方向正确。发现合入后残余债,已出补丁 PR。
MAJOR — LSP(bindByteProgressToBar)
start / 未知→已知重 start 后省略 update:首帧卡在 0;非 TTY 若 finish 只有一次回调会丢最终刻度。违反与 httpDownload 渐进回调的可替换契约。
MAJOR — LSP(createTerminalProgress.start)
非 TTY logger 写死 进度 0% (0/${total}),忽略 startValue。ProgressHandle.start(total, startValue) 契约在重 start 修总量时被破坏。
MAJOR — DRY/LSP(测试)
原 pause/resume 嵌套契约测被换成无意义 Writable 烟测,注册表权威实现失覆盖。
跟进
补丁已开后续 PR:始终 update + logger 尊重 startValue + 恢复 pause 契约测。
未改(MINOR 债)
ServiceIdpack-manager 注册- ootb 扩测 eslint-plugin / pack-update
ProgressHandle.setTotal(可选 OCP 收敛)
Sent by Cursor Automation: SFMC-Review
Tanya7z
added a commit
that referenced
this pull request
Jul 24, 2026
…b2de-7a236848b621-9bcb fix(progress): 补齐 #67 后 binder 首帧/非TTY LSP + 恢复 pause 契约测
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.


背景
Push
main@56466b8(合并 #66)后 ootb success。审查 #64–#66 合入后的 pack-update / 进度条残余 SOLID 债并提交补丁。审查(原则标注)
#66的httpDownloadfinish 在total=0时用finalBytes作总量,但bindByteProgressToBar仍以占位 1MBstart,总量变已知后不重设刻度 → bar 的{value}/{total}失真probe/bind两处各自拼packUpdate.bindOk参数;prepareCheck/applyUpdate多出口散落setBindingneedKey文案写死 CurseForge,与「多源 resolveConfiguredPackProvider」入口契约不一致改动
bindByteProgressToBar:未知→已知总量时重start修正刻度(对齐 httpDownload LSP)bindOkParams/touchBindingneedKeyzh/en 改为源无关开场 + CF 作为当前实现提示terminal-progress.test.mjs覆盖未知总量收尾契约验证
npm test -w @sfmc-bds/cli(17 pass)npm test -w @sfmc-bds/bds-tools(21 pass)未改
ServiceIdpack-manager 注册(主路径已不 spawn,CLI 仍可用)