Skip to content

feat(install): say why ARM64 Linux has no local runtime - #1509

Open
benceruleanlu wants to merge 1 commit into
bl/arm64-packaged-bootstrap-logfrom
bl/arm64-unsupported-arch-state
Open

benceruleanlu wants to merge 1 commit into
bl/arm64-packaged-bootstrap-logfrom
bl/arm64-unsupported-arch-state

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Sep 8, 2026

Copy link
Copy Markdown
Member

Part of a stack of review fixes for #1486. Based on #1508. Top of the stack.

Summary

#1486 correctly stops a Linux ARM64 app from selecting x64 bundles, but the resulting state is returned as a bare empty list. It reaches the user as "No options available" and telemetry as express.fallback with reason precondition_failed, which is also what an empty or mis-published catalog produces. The one state we know exactly was indistinguishable from the one we do not, so a user cannot tell "wait for an ARM64 bundle" from "retry later", and metrics cannot separate this deliberate gap from a real catalog regression.

Feature behavior

The reason now lives next to the filter that creates it, as unsupportedHostReason in envPaths.ts, and validateHardware reports it. Linux ARM64 therefore takes the explain-and-block path the wizard already gives an Intel Mac: a message naming the platform, and express install falling back with unsupported_hardware.

Cloud and remote workspaces are unaffected. The wizard blocks only the standalone source card, and the message says so. No new i18n key or renderer plumbing is introduced; this reuses the existing hardware-validation mechanism end to end.

Removing the carve-out when linux-*-arm64 bundles ship is a one-function deletion. The architecture filter already accepts suffixed ids with no further change.

Test coverage and validation

  • unsupportedHostReason is tested against the filter it must agree with: on linux/arm64 no catalog id survives variantMatchesHost and a reason is returned; on win32/x64, win32/arm64, darwin/arm64 and linux/x64 at least one id survives and the reason is null. That pairing is what keeps the two from drifting apart.
  • validateHardware blocks on linux/arm64 with a message naming the platform and the cloud alternative, and does not gate linux/x64 on architecture.
  • Full unit suite: 274 files, 4736 passed, 2 skipped. Repeated with the whole suite stubbed as linux/arm64: identical result.
  • Typecheck, lint and format pass.

Change breakdown

Total changed lines: 92 (90 added, 2 deleted).

Product code

  • 2 files; +30 / -2; 32 changed lines; 34.8% of total.
  • src/main/lib/gpu.ts
  • src/main/sources/standalone/envPaths.ts

Test code

  • 2 files; +60 / -0; 60 changed lines; 65.2% of total.
  • src/main/lib/gpu.test.ts
  • src/main/sources/standalone/envPaths.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

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 8271e339-0c54-4608-a1dc-ab5bb917be36

📥 Commits

Reviewing files that changed from the base of the PR and between 7f104b0 and 25cad3e.

📒 Files selected for processing (4)
  • src/main/lib/gpu.test.ts
  • src/main/lib/gpu.ts
  • src/main/sources/standalone/envPaths.test.ts
  • src/main/sources/standalone/envPaths.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Host architecture validation

Layer / File(s) Summary
Unsupported host explanation
src/main/sources/standalone/envPaths.ts, src/main/sources/standalone/envPaths.test.ts
unsupportedHostReason() reports that ARM64 Linux has no local runtime bundle. Tests cover unsupported ARM64 Linux and supported Windows, macOS, and Linux combinations.
Hardware validation gate
src/main/lib/gpu.ts, src/main/lib/gpu.test.ts
validateHardware returns the unsupported-host error before GPU probing. Tests verify ARM64 Linux is rejected and x64 Linux is not architecture-gated.

Suggested reviewers: kosinkadink

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 25cad

Linux ARM64 hosts without a local runtime now receive a clear blocking message and cloud or remote alternative, while supported hosts continue through hardware validation. The change is covered by focused architecture-gate tests and has no remaining concrete merge-blocking risk.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bl/arm64-unsupported-arch-state
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch bl/arm64-unsupported-arch-state

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

Filtering every bundle out left getFieldOptions returning [], which reaches
the user as "No options available" and reaches telemetry as
express.fallback{precondition_failed} — the same as an empty or unreachable
catalog. The one state we know exactly was indistinguishable from the one we
do not.

Give the reason a home next to the filter that creates it and let
validateHardware report it, so ARM64 Linux takes the explain-and-block path
the wizard already gives an Intel Mac: a message naming the platform, and
express falling back with unsupported_hardware. Cloud and remote workspaces
are untouched — the wizard only blocks the standalone source card.
@benceruleanlu
benceruleanlu force-pushed the bl/arm64-unsupported-arch-state branch from dd9ca39 to 25cad3e 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
@coderabbitai
coderabbitai Bot requested a review from Kosinkadink September 9, 2026 01:35

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