Fix macOS FFmpeg download reliability (mirror, timeout, retry, errors) - #390
Merged
Conversation
added 2 commits
August 17, 2026 21:53
…led error Root cause of the setup wizard's "Checking FFmpeg" failures (#388): a single hardcoded source (evermeet.cx) with no fallback, no connect-timeout (curl fell back to the OS default, ~60-130s, before giving up), an unreadable raw curl error, and a shared error-message helper that hardcoded "runtime pack" regardless of what was actually being downloaded. download_file (#[cfg(unix)], compiler-verified via WSL): - label parameter replaces the hardcoded "runtime pack" text - --connect-timeout 20 added, so an unreachable host fails in ~20s - retry with backoff (3 attempts, 2s/5s) on connection-class curl exit codes only (6/7/28 - resolve/connect/timeout), never on a failure retrying can't fix, like a checksum mismatch - a clear, actionable message replaces the raw curl dump setup.js: the FFmpeg step now surfaces a hint pointing at the (previously undocumented-in-UI) STEMDECK_FFMPEG_URL override on failure. download_macos_ffmpeg (#[cfg(target_os = "macos")]): primary source is now shaka-project/static-ffmpeg-binaries - built from source via GitHub Actions, served from GitHub Releases (GitHub's global CDN), per-architecture raw static binaries. evermeet.cx becomes the fallback, tried only if the primary fails outright. An explicit STEMDECK_FFMPEG_URL override still bypasses both, unchanged from before. All four new pinned hashes were independently verified before pinning: downloaded fresh, sha256 computed locally, cross-checked against the release notes' own published MD5s, and confirmed as valid Mach-O 64-bit binaries via magic bytes. Verification note: the macOS-specific dispatch code could not be compiler-verified on this Linux dev machine (cfg-gated code is stripped before semantic analysis on a non-matching target, and cross-compiling to macOS fails without Apple's toolchain). Syntax-valid per cargo fmt and carefully hand-traced, but needs a real macOS compiler pass - see the companion macos-check.yml workflow. Closes #388, #389
ci.yml (PR-triggered) is 100% ubuntu-latest, so code behind #[cfg(target_os = "macos")] has never had a real compiler pass before merging - that cfg-gated code is stripped before semantic analysis even starts on a non-matching target, not just skipped at test time. macos-release.yml already has a real macOS runner, but only fires on release: published and does the full signed/packaged build. This is deliberately narrow: build/clippy/test only, workflow_dispatch only (not on every PR/push, so the runner's load and cost don't change from today), never touches signing, packaging, or uploads.
thcp
added a commit
that referenced
this pull request
Aug 17, 2026
## Summary Bootstrapping commit split out of #390 - GitHub only allows dispatching a `workflow_dispatch` workflow that already exists on the default branch, so this needs to land on `main` before it can be used to actually verify #390's macOS-specific changes. `ci.yml` (PR-triggered) is 100% `ubuntu-latest`, so code behind `#[cfg(target_os = "macos")]` has never had a real compiler pass before merging - that cfg-gated code is stripped before semantic analysis even starts on a non-matching target, not just skipped at test time. `macos-release.yml` already has a real macOS runner, but only fires on `release: published` and does the full signed/packaged build. This is deliberately narrow: build/clippy/test only, `workflow_dispatch` only (not on every PR/push, so the runner's load and cost don't change from today), never touches signing, packaging, or uploads. ## Test plan Purely additive CI config, inert until manually triggered. No app code touched.
added 4 commits
August 17, 2026 22:01
This workflow's first run found unused_variables/dead_code in ensure_torch_device, classify_cuda_install_error, and child_output_with_timeout -- none touched by this branch. Nothing has ever type-checked the macOS target before this workflow existed, so these predate it rather than being caused by it. Suppressed the same way as the 3 pre-existing Linux-side clippy lints, so a real regression isn't lost in known noise.
…:env mod tests's existing imports are explicit (no glob), so std::env was never in scope for a test written outside where it's actually used. Caught by the new macos-check.yml workflow's first real run against this branch - Linux never compiles this test at all (it's #[cfg(target_os = "macos")]), so WSL had nothing to catch it with. The import itself is gated the same way so it doesn't go unused on non-macOS builds, where nothing else in the test module references env:: directly.
Matches the pattern of the actual last version-bump commit (b2379ed): only templates/stemdeck.xml is hand-edited. 0.11.0 was never published (stayed a draft), so 0.11.1 will be the first release carrying everything since 0.9.0 - the template tracks that, not the skipped draft version.
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.
Summary
Two commits:
evermeet.cxwas macOS's single FFmpeg source, hardcoded with no fallback, no connect-timeout (curl fell back to the OS default, ~60-130s), and produced an unreadable, mislabeled raw curl error on failure ([Bug]: Checking FFmpeg #388 is a direct hit of this). Now: a faster/clearer/retrying download path shared with Linux, plus - macOS specifically - a real second source (shaka-project's GitHub-Releases-hosted static builds) withevermeet.cxdemoted to fallback. Closes [Bug]: Checking FFmpeg #388. Closes Setup wizard: FFmpeg download has no fallback, hangs ~75s, and gives an unreadable error on failure #389.macos-check.yml, an on-demand (workflow_dispatch) build/clippy/test job on the org's self-hosted macOS runner.ci.ymlis 100%ubuntu-latest, so#[cfg(target_os = "macos")]code has never had a real compiler pass before merging - this fills that gap without changing what runs on every PR.Test plan
cargo fmt --check/cargo clippy -- -D warningsclean for the#[cfg(unix)]shared code, verified via WSL (real compile - Linux counts as unix)macos-check.ymlagainst this branch before merging; will report results here.