Skip to content

fix(package): verify ASAR payload integrity before shipping Windows builds - #69

Merged
man612 merged 1 commit into
mainfrom
fix/asar-integrity-release-gate-20261110
Nov 10, 2026
Merged

man612 merged 1 commit into
mainfrom
fix/asar-integrity-release-gate-20261110

Conversation

@man612

@man612 man612 commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Purpose

Extract the verified ASAR corruption guard from Draft startup-investigation PR #51 without merging its tracing/QA-startup experiments or changing Electron/ADB/Gnirehtet runtime behavior.

A documented local packaging race previously produced an electron-builder exit-0 package with inconsistent embedded app.asar payload offsets. This change makes a Windows build fail when an ASAR file's content does not match its SHA-256 metadata.

Changes

  • Carry over the proven scripts/qa/verify-packaged-asar.cjs and tamper regression verify-packaged-asar.nodecheck.cjs from PR fix(package): verify ASAR integrity and investigate Electron startup (#44) #51.
  • Verify every embedded SHA-256-protected entry, required Electron main/preload/renderer entrypoints and Wirebound manifest.
  • Exclude docs/** from the distributed ASAR (QA documents are not runtime assets, and this reduces the surface of concurrent-edit packaging races).
  • Add ASAR verification to build:win, build:unpack, package:check; run regression + actual package scanner in hosted Windows CI.
  • Release workflow already uses npm run build:win, so the release-path package is verified.
  • No dependency, lockfile, Electron version, application source, ADB/VPN, installer settings, signing or global computer changes.

Evidence

  • Local Windows syntax checks: PASS.
  • NODE_PATH resolving the same lockfile-installed @electron/asar; npm run qa:asar:test PASS, including deliberate byte corruption rejection.
  • Validator against exact current PR integration: ten UX fixes + Gnirehtet lifecycle/privacy (hardware QA) #67 Windows CI artifact resources/app.asar: 3,988/3,988 SHA-256 entries verified, 0 failures.
  • git diff --check: PASS.
  • Hosted Windows CI and Windows package smoke test of this exact head are required before merging.

Scope boundaries

This is a build-time payload integrity test, not the Electron runtime ASAR-integrity fuse, not Authenticode signing, and not a fix for intermittent renderer/BrowserWindow startup delays in issue #44. Keep startup PR #51 Draft for its separate investigation; this narrowly reusable packaging guard can be merged independently after CI passes. No real-device test required for this packaging-only change.

@man612
man612 merged commit 5081398 into main Nov 10, 2026
1 check passed
@man612
man612 deleted the fix/asar-integrity-release-gate-20261110 branch November 10, 2026 03:55
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.

1 participant