Skip to content

macOS 阶段 11:完整包校验、自替换与恢复 - #98

Merged
qiyinxi merged 41 commits into
ModAVD:mainfrom
DeathofBrain:codex/macos-11-update
Nov 10, 2026
Merged

qiyinxi merged 41 commits into
ModAVD:mainfrom
DeathofBrain:codex/macos-11-update

Conversation

@DeathofBrain

@DeathofBrain DeathofBrain commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

为原生 Apple Silicon macOS 接入独立的完整包更新事务:支持 update prepare/install --package ZIP --sha256 HEX,私有复制后验证摘要、严格清单、ARM64 Mach-O、可执行权限、受限符号链接及签名完整性;安装时持有实例启动锁并检查占用进程。允许当前 updater 替换自身路径,按单元记录交换进度,离线恢复时完成已验证的候选包或还原旧文件与本事务的版本元数据。

协议为 modavd-macos-update-v1、平台 macos-arm64,细节见 internal/update/MACOS.md。不复用 Windows/AUTO-MAS 的交换格式。远端没有兼容资产时明确返回 update_unavailable;正式发布包、分发签名、公证及打包配置对齐留到阶段 13。当前签名检查包括 ad hoc,验证完整性,不证明发布者身份;本地 SHA256 需从可信独立渠道取得。macOS 进程扫描和 flock 提供协作式排他。

本阶段最初独立提交:17ea66d。前置 PR #72、#92、#94 已合并,当前分支已同步 main;本 PR 已准备 review,不包含发布工作流。

验证:Apple M4 / macOS 26.6.2 (25G83) / Go 1.26.5。现有全量 build/test/vet、Windows/Linux 交叉构建和相关 vet、Darwin 无 cgo 相关测试通过。仓外实际 ad hoc 签名 ARM64 fixture 覆盖离线安装、运行中的 updater 自替换、签名内容篡改、错误架构、链接图、严格 ZIP/JSON、真实进程与启动锁占用、取消、缺失远端资产。17 个交换边界分别验证完成与回退,共 34 个中断场景;版本元数据恢复与成功后重复 recover 均验证幂等。独立复核确认丢失原件时保留现场、拒绝重定向的备份父目录。

未使用正式模拟器发布包,未进行断电或真实 Android 验收。详细结果记录在 ModAVD/ModAVD#68。

不改 CI、脚本、构建配置或依赖;无新增仓内测试文件/函数、结果、日志、签名夹具或二进制。仅为原有 unsupported 测试同步原生平台适用范围,原断言保持。

本批统一验证记录:ModAVD/ModAVD#68 (comment)

本次冲突同步(2026-11-10):合并 main(9c30c5f),保留调用方更新源/CDK 覆盖、结构化进度日志和 macOS 本地包参数;离线安装/恢复继续避免读取已保存凭据,并补齐原生安装的 installing 进度事件。

本次验证:原生 macOS 全量 go test ./...、go vet ./...、go build ./...;Darwin 无 cgo 全量 test/vet;Windows amd64 与 Linux amd64 无 cgo 全量 vet/build;现有 UI 27 项测试、privacy 和作者检查均通过。

Preserve upstream disk budgets and rotating logcat capture while routing new common native calls through the existing host facade. Keep Windows implementations, CI, and upstream test fixtures unchanged.
…cos-6-review

# Conflicts:
#	internal/components/fetch.go
@DeathofBrain DeathofBrain mentioned this pull request Nov 6, 2026
8 tasks
# Conflicts:
#	README.en.md
#	README.md
#	internal/cli/commands.go
#	internal/ui/API.md
@qiyinxi
qiyinxi enabled auto-merge November 10, 2026 13:42
@qiyinxi
qiyinxi disabled auto-merge November 10, 2026 13:42
Comment thread internal/update/MACOS.md Outdated
@@ -0,0 +1,41 @@
# macOS update package contract

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文重写

@qiyinxi
qiyinxi added this pull request to the merge queue Nov 10, 2026
Merged via the queue into ModAVD:main with commit 8deb5ea Nov 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants