Skip to content

fix(release): verify bootstrap python on the path that actually ships - #1505

Open
benceruleanlu wants to merge 1 commit into
bl/arm64-todesktop-linux-fallbackfrom
bl/arm64-beforebuild-verifies-shipped-path
Open

benceruleanlu wants to merge 1 commit into
bl/arm64-todesktop-linux-fallbackfrom
bl/arm64-beforebuild-verifies-shipped-path

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Sep 8, 2026

Copy link
Copy Markdown
Member

Part of a stack of review fixes for #1486. Based on #1504.

Summary

scripts/todesktop-beforeBuild.cjs fetched and verified app-wrapper/extraResources/bootstrap-python/<platform>. That stopped being the packaged path when #1484 moved Windows to todesktop-targets/, and #1486 moved Linux there too. The hook kept reporting success over a tree nothing copies.

It was added after the 0.6.4 post-mortem, where a release shipped with no bootstrap Python. Because CI pre-uploads the directory, the fetch script verifies the uploaded copy rather than re-downloading, which made the hook a genuine post-upload integrity check. Pointed at a dead path it checks nothing, leaving the CI step that runs before the upload as the only guard on the shipped payload.

Feature behavior

The hook now resolves the destination from todesktop.json, using ToDesktop's own precedence: per-target, then per-platform, then the base list. Verification therefore cannot drift from packaging again.

A directory already staged by CI is verified in place, with no network access. A missing one is fetched into it, which restores the repair path. Architectures with no bootstrap Python, such as Linux ARM64, still skip. A target that declares no bootstrap resource now fails the build instead of being silently skipped.

Test coverage and validation

  • New tests drive the hook over a temporary build tree: it verifies the staged Linux x64 and Windows ARM64 targets at the paths todesktop.json declares, fails when the tree arrived without its Python or without uv, and skips Linux ARM64.
  • Full unit suite: 274 files, 4736 passed, 2 skipped. Typecheck, lint and format pass.
  • No remote ToDesktop build was submitted.

Change breakdown

Total changed lines: 211 (188 added, 23 deleted).

Product code

  • 1 files; +77 / -23; 100 changed lines; 47.4% of total.
  • scripts/todesktop-beforeBuild.cjs

Test code

  • 1 files; +111 / -0; 111 changed lines; 52.6% of total.
  • src/main/sources/standalone/todesktopBeforeBuild.test.ts

Documentation

  • 0 files; +0 / -0; 0 changed lines; 0%.

Configuration and CI

  • 0 files; +0 / -0; 0 changed lines; 0%.

Generated files

  • 0 files; +0 / -0; 0 changed lines; 0%.

Lockfiles

  • 0 files; +0 / -0; 0 changed lines; 0%.

Vendored code

  • 0 files; +0 / -0; 0 changed lines; 0%.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c7520af3-5a8d-49c7-8bda-2b9e98249430

📥 Commits

Reviewing files that changed from the base of the PR and between 47b4b43 and d94aa83.

📒 Files selected for processing (2)
  • scripts/todesktop-beforeBuild.cjs
  • src/main/sources/standalone/todesktopBeforeBuild.test.ts

Comment @coderabbitai help to get the list of available commands.

The hook fetched and verified app-wrapper/extraResources/bootstrap-python/<platform>,
which stopped being the packaged path when #1484 moved Windows to
todesktop-targets/ and this branch moved Linux there too. It kept reporting
success over a tree nothing copies, leaving the CI check that runs before the
upload as the only guard on the shipped payload.

Resolve the destination from todesktop.json — the same config packaging reads
— so verification cannot drift from packaging again. A staged directory is
verified in place; a missing one is fetched into it, restoring the repair path
the 0.6.4 post-mortem asked for. Covered by a test that drives the hook over a
temp build tree.
@benceruleanlu
benceruleanlu force-pushed the bl/arm64-beforebuild-verifies-shipped-path branch from 572debc to d94aa83 Compare September 9, 2026 01:33
@benceruleanlu
benceruleanlu removed this pull request from stack #1510 September 9, 2026 01:34
@benceruleanlu
benceruleanlu added this pull request to stack #1513 September 9, 2026 01:34

This branch has not been deployed

No deployments
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.

3 participants