Repository navigation
Conversation
Merge origin/main while preserving saved orientation, translating new gaming controls and orientation messages, and isolating engine tests from running emulators.
RoutineMiku
added a commit
that referenced
this pull request
Nov 17, 2026
从 PR #92 拆出下载健壮性修复(不含其 i18n 部分),手工移植到当前出货分支: - 新增 validRange(),逐项比对 Content-Range 的起止位、总大小、Content-Length - 单流 206 范围不符直接拒绝;416 不再无条件当成功,丢弃坏残片重试/报错 - downloadParallel / downloadMulti 分块校验范围,并拒绝超出请求范围的字节 - 新增 test/range-validation-test.js(8 项),并加入 npm test Co-authored-by: Anchoder <352085178+Anchoder@users.noreply.github.com>
5 tasks done
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.
概述
此 PR 将英文界面与下载分块范围校验组合到当前 main,供维护者评估:
Content-Range;遇到错误范围或过长分块时拒绝数据。单流续传遇到 416 时不再直接认定成功,而是清除旧文件后重新请求。本地化主要来自 @josevictoremiliano 的 #43;提交历史保留了原作者记录。#43 已经提出这一工作,此 PR 是结合 #91 的另一份集成方案,维护者可以优先采用 #43 或拆分其中的下载修复,避免重复合并。此 PR 保留上游原有的程序更新行为。
验证
node test/run-tests.js:8 项通过(缺少真实 APK 时,相关可选测试跳过)。node test/engine-test.js:25 项通过。node test/auto-test.js:89 项通过。node test/range-validation-test.js:验证错误范围及 416 后重新下载。node test/i18n-test.js:3 种语言、652 条文案和占位符检查通过。尚未使用真实 Android 模拟器或 APK 进行端到端验证。当前仍不能仅凭多个下载源的文件长度判断内容一致;若要安全混用不同源,仍需要可信的完整性摘要。
Related: #91, #43