Skip to content

🐛 [fix] Repair macOS signatures and verify packaged startup - #218

Merged
Nick2bad4u merged 12 commits into
mainfrom
fix/packaged-startup-verification
Oct 8, 2026
Merged

Nick2bad4u merged 12 commits into
mainfrom
fix/packaged-startup-verification

Conversation

@Nick2bad4u

@Nick2bad4u Nick2bad4u commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

The published v30.0.2 ARM64 and Universal macOS packages contain an Electron framework signature invalidated by fuse changes. Final macOS apps now receive their ad hoc signature after fuse mutation and Universal merging, and strict signature verification checks every architecture. This repairs the confirmed package defect associated with #217. Ad hoc signatures do not provide trusted publisher identity or Apple notarization.

Packaged startup checks now require a visible initialized renderer, working preload IPC, real FIT decoding, a rendered route and map, a fresh nonce-bound completion report, and successful process exit. Crashes, signals, timeouts, and incomplete reports fail. Distribution checks exercise copied DMG apps through direct launch and LaunchServices, Windows ZIP/NSIS/portable packages, and Linux tarball/AppImage packages. Windows installer checks protect existing installations and verify cleanup.

Publication requires the identical Universal DMG to pass on native ARM64 and native Intel runners. The artifact handoff checks source commit, version, workflow run and attempt, successful ARM64 evidence, and SHA-256 before testing x64. Rehearsals also test the ARM64 DMG on GitHub's macOS 27 preview image. Optional Rosetta diagnostics retain their timeout and failure reporting; cold translation exceeded the budget with both our Universal package and unchanged upstream Electron, so those diagnostic runs are not reported as passes.

Additional repairs:

  • Update Electron, Electron Builder, MapLibre, DOMPurify, and affected build tooling dependencies.
  • Repair production file:// MapLibre worker loading and vendor factory handoff, covered with web security enabled.
  • Validate every updater metadata file and NSIS web payload, including hashes, sizes, and uploaded assets.
  • Preserve screenshots, startup reports, native diagnostics, and the exact release source revision through changelog generation.
  • Isolate the empty-folder UI fixture, preserve MapLibre initialization errors, retain failed Playwright traces, and provide an explicit software WebGL driver only for the offline render test on Linux CI.
  • Apply the approved temporary audit exceptions for root build-only braces@3.0.3 and sprintf-js@1.1.3, and braces@3.0.3 in the separate docs build graph. Exact advisories, lock-node identities, versions, integrity hashes, and assessed dependency paths are enforced. New causes, changed scope, malformed reports, process failures, and unexpected warnings still fail. Existing severity thresholds remain unchanged. The exposure assessment and removal conditions are documented in Dependency audits.

Fixes #217.

Validation:

  • Latest native rehearsal: all six package matrix jobs plus the same-DMG native Intel check and macOS 27 compatibility check passed. The full-gate UI-test findings from that run are repaired in the final commits.
  • Exact-head full release gate passed on e7fd53c: formatting/lint, TypeScript, all unit tests, docs, approved audits, all 14 Playwright tests, unsigned packaging, artifact verification, and real packaged startup.
  • Complete local and CI unit runs: 729 files and 6,245 tests passed; TypeScript, formatting/lint, production docs build, and root/docs audit gates passed. All 41 focused audit regression tests pass, including live audits under CI's pinned npm 12.0.2.
  • Electron Playwright: 14 passed, including production file:// worker creation and recreation. Focused signing, smoke, artifact provenance, updater metadata, workflow, and audit regressions pass.
  • Linux graphics control confirmed that the default hosted runner disables WebGL2, while explicit ANGLE/SwiftShader renders both real worker-backed maps. Only the Linux CI test launch uses those driver flags; production launch settings and web security are unchanged.
  • Native smoke evidence records 1,285 FIT records, one session, and 58 route elements. Diagnostics artifacts in the rehearsal include screenshots inspected on Windows, Linux, native Intel, and ARM64 macOS.
  • The ARM64 DMG passed on macOS 27.0 (26A428), GitHub image 20260928.0222.1. The reporter's exact macOS 27.0.1 environment is not available in that runner image.
  • Candidate Windows installer upgrades from v29.9.0 and v30.0.2 passed, leaving one valid installation.
  • Root production dependency audit reports zero vulnerabilities; the inspected packaged ASAR contains neither braces nor sprintf-js.

All PR checks passed, including SonarCloud, Codacy, DeepScan, CodeQL, coverage, secret scans, and StepSecurity. The intended release is v30.0.3, followed by verification of the published downloads and real Windows updater path.

🐛 [fix] Sign final macOS bundles after fuse mutation and Universal merging, and verify signature integrity even without publisher credentials.
🐛 [fix] Deliver the MapLibre factory across the renderer vendor boundary and load its self-contained worker with the production file origin and CSP.
🧪 [test] Require renderer initialization, preload IPC, FIT parsing, a visible route, and a fresh completion report from packaged smoke launches.
👷 [build] Exercise real distributables across Linux, Windows x64 and ia32, and macOS ARM64, Intel, and Universal; protect existing Windows installations and retain failure evidence.
👷 [build] Validate updater payload metadata, pin changelog and upgrade workflow revisions, and retain screenshots and logs for installer upgrades.
🧹 [chore] Update Electron, Electron Builder, MapLibre, DOMPurify, and affected build dependencies while retaining the existing audit thresholds.
📝 [docs] Describe release rehearsals, ad hoc signing, integrity verification, and explicit manual publication.
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Greetings, thanks for opening a pull request, I'll look when I can.

@socket-security

socket-security Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedelectron-builder@​26.16.0 ⏵ 26.17.0991006998 +3100
Updateddompurify@​3.4.14 ⏵ 3.4.16100 +1100 +21009270
Updatedmaplibre-gl@​5.24.0 ⏵ 6.13.099 +1100 +7510099 +170
Updatedelectron@​43.5.1 ⏵ 43.7.9100100100 +198100

View full report

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.09%. Comparing base (e09a1f8) to head (e7fd53c).
⚠️ Report is 3 commits behind head on main.

Flag Coverage Δ
electron-app 63.09% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@@           Coverage Diff           @@
##             main     #218   +/-   ##
=======================================
  Coverage   63.09%   63.09%           
=======================================
  Files           8        8           
  Lines        1084     1084           
  Branches      208      208           
=======================================
  Hits          684      684           
  Misses        299      299           
  Partials      101      101           

Impacted file tree graph

Components Coverage Δ
⚡ Core Electron Process ∅ <ø> (∅)
Renderer & UI ∅ <ø> (∅)
Utilities 63.70% <ø> (ø)
FIT Parsing ∅ <ø> (∅)
Window State Management ∅ <ø> (∅)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ebc066e...e7fd53c. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codacy-production

codacy-production Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 624 complexity · 33 duplication

Metric Results
Complexity 624
Duplication 33

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

🚜 [refactor] Separate smoke configuration, readiness checks, failure observation, renderer probes, and report capture into focused helpers while retaining every startup and map assertion.
🐛 [fix] Validate the report activity object explicitly before inspecting its fields, and remove the unused smoke test import reported by DeepScan.
🧪 [test] Cover invalid diagnostic configuration and a renderer failure during screenshot capture; split signature verification fixtures without dropping platform assertions.
📝 [docs] Explain the narrowly scoped filesystem operations used only by explicit local smoke mode.
}

function createActivityProbeScript(fixture: string): string {
return `(async () => {${createFixtureProbeScript(fixture)}${createMapProbeScript()}})()`;
🐛 [fix] Always exit unsuccessful smoke runs when diagnostic reporting fails, and select the native Windows archive extractor for drive-letter paths.
🧪 [test] Cover readiness deadlines, missing report directories, archive extraction, and child-process failures.
👷 [build] Run the complete release gate independently of platform artifacts while preserving its failure status.
🧪 [test] Probe Rosetta and sample stalled Universal smoke processes without changing the application timeout; retain failed packages for diagnosis.
🧪 [test] Validate rehearsal artifact provenance and hashes before checking direct startup and LaunchServices on the macOS 27 preview runner.
👷 [build] Expose compatibility checks through the existing rehearsal without skipping release gates, and register the official preview label for actionlint.
🚜 [refactor] Separate diagnostic option resolution from process monitoring and retain failure propagation.
📝 [docs] Document compatibility checks and distinguish ad hoc integrity signatures from trusted publisher signing.
🧪 [test] Verify the same ARM64-tested Universal DMG on a native Intel runner using its exact source, version, workflow run, attempt, and SHA-256. Require successful Intel verification before release publication.

🧪 [test] Default Universal smoke to the native host architecture and retain explicit Rosetta diagnostics. Preserve strict all-architecture signatures, fresh direct and LaunchServices readiness evidence, and the normal startup timeout.

📝 [docs] Document native release coverage and the observed hosted-runner Rosetta translation limitation.
🧪 [test] Separate architecture and Rosetta selection cases from platform installation tests, retain complete launch and evidence assertions, and split workflow provenance from required smoke-order checks to satisfy the existing complexity limits.
👷 [build] Keep explicit per-workflow job limits aligned with the required native Intel consumer and provide its compliant workflow title and source-specific run name.
🔒 [build] Match the approved braces and sprintf-js advisories to exact assessed lock nodes, versions, integrity values, and development scope while preserving the root moderate and docs high thresholds. Remove the obsolete image-size exceptions.

🔒 [build] Validate raw npm results, grounded advisory graphs, process failures, scalar identities, and dependency scope before accepting any finding. Keep accepted findings and npm exit statuses visible and reject unexpected stderr.

🧪 [test] Add 41 focused regression cases for approved graphs, scope changes, malformed results, cycles, process errors, and native npm invocation.

📝 [docs] Record the approved exposure assessment, constraints, and removal requirements in the development guides.
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@Nick2bad4u
Nick2bad4u marked this pull request as ready for review October 8, 2026 03:10
@Nick2bad4u
Nick2bad4u merged commit 3d5b8b0 into main Oct 8, 2026
35 checks passed
@Nick2bad4u
Nick2bad4u deleted the fix/packaged-startup-verification branch October 8, 2026 03:10
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.

macOS Release Builds just crash on opening or won't open at all.

2 participants