fix(release): ship BinaryDelta in macOS bundles so delta updates actually run#43
Merged
Merged
Conversation
…ally run Root cause: src-tauri/resources/BinaryDelta is gitignored (by design — it is a build artifact fetched by scripts/vendor-binary-delta.sh), but release.yml never ran the vendor script. Every released .app therefore lacked the helper, resolve_binary_delta() returned None, and perform_macos_update() silently fell back to the full ~400MB package on every "delta" update — the UI promised ~40MB and the wire carried ~428MB. - release.yml: vendor the pinned Sparkle 2.9.1 BinaryDelta before `tauri build` on the macOS matrix (sha256-pinned tarball + binary, universal). - release.yml: post-build regression gate — fail the release if the bundle does not carry an executable universal BinaryDelta, because losing it is otherwise invisible (updates still succeed, just always full-size). - examples/mac_delta_e2e.rs: real-device delta E2E harness (CAM_MAC_DELTA_E2E=1 gated). Verified on a live install: build 3685 → 3722 via the 40,408,266 B delta (90.6% saved), EdDSA + codesign gates green, no full-package fallback. The signing side needed no change: sign-macos-app.sh already signs nested Mach-O helpers inside-out before the outer app.
Wangnov
added a commit
that referenced
this pull request
Jun 10, 2026
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.
问题
用户在 macOS 上更新 Codex 时,UI 显示「增量更新约 40MB」,实际却下载了 ~428MB 全量包。
根因:
src-tauri/resources/BinaryDelta被 .gitignore 排除(设计如此,应由scripts/vendor-binary-delta.sh在构建时获取),但release.yml从未调用该脚本。因此所有已发布的 .app 都缺这个 helper,resolve_binary_delta()返回None,perform_macos_update()静默走「delta 工具缺失,回退全量」分支——计划阶段承诺 40MB,执行阶段下了 428MB。修复
tauri build前运行scripts/vendor-binary-delta.sh(SHA-256 双重锁定的 Sparkle 2.9.1 universal 二进制)。CAM_MAC_DELTA_E2E=1门禁),走完整生产路径 plan → perform。签名链无需改动:
sign-macos-app.sh本就 inside-out 签所有嵌套 Mach-O(包括 BinaryDelta)。真机验证(本机 arm64)
cargo run --example mac_delta_e2e→ 下载恰好 40,408,266 B delta(省 90.6%),EdDSA + codesign 闸全绿,原子替换至 3722,无回退。tauri build产物含可执行 universal BinaryDelta(与新 CI 闸同款检查)。codex review --uncommitted无意见;cargo clippy --workspace --all-targets -- -D warnings与cargo test --workspace本地通过(与 CI 同款命令)。