Files
elizaos--eliza/packages/docs/apps/electrobun-darwin-macos-webgpu-version.md
wehub-resource-sync 426e9eeabd
Voice Workbench / headless workbench (mocked backends) (push) Has been cancelled
Voice Workbench / real acoustic lane (nightly, provisioned only) (push) Has been cancelled
ci / test (push) Has been cancelled
ci / lint-and-format (push) Has been cancelled
ci / build (push) Has been cancelled
ci / dev-startup (push) Has been cancelled
gitleaks / gitleaks (push) Has been cancelled
Markdown Links / Relative Markdown Links (push) Has been cancelled
Quality (Extended) / Homepage Build (PR smoke) (push) Has been cancelled
Quality (Extended) / Comment-only diff guard (push) Has been cancelled
Quality (Extended) / Format + Type Safety Ratchet (push) Has been cancelled
Quality (Extended) / Develop Gate (secret scan + UI determinism) (push) Has been cancelled
Quality (Extended) / Develop Gate (lint) (push) Has been cancelled
Chat shell gestures / Chat shell gesture + parity e2e (push) Has been cancelled
Cloud Gateway Discord / Test (push) Has been cancelled
Benchmark Bridge Tests / benchmark (bunx @biomejs/biome check packages/lifeops-bench/src, benchmark-lint) (push) Has been cancelled
Benchmark Bridge Tests / benchmark (bunx vitest run --config packages/lifeops-bench/vitest.config.ts --root packages/lifeops-bench --passWithNoTests, benchmark-tests) (push) Has been cancelled
Build Agent Image / build-and-push (push) Has been cancelled
Dev Smoke / bun run dev onboarding chat (push) Has been cancelled
Dev Smoke / Vite HMR dependency-level smoke (push) Has been cancelled
Electrobun Submodule Guard / electrobun gitlink is fetchable (push) Has been cancelled
Publish @elizaos/example-code / check_npm (push) Has been cancelled
Publish @elizaos/example-code / publish_npm (push) Has been cancelled
Publish @elizaos/plugin-elizacloud / verify_version (push) Has been cancelled
Publish @elizaos/plugin-elizacloud / publish_npm (push) Has been cancelled
Sandbox Live Smoke / Sandbox live smoke (push) Has been cancelled
Snap Build & Test / Build Snap (amd64) (push) Has been cancelled
Snap Build & Test / Build Snap (arm64) (push) Has been cancelled
Test Packaging / elizaos CLI global-install smoke (node + bun) (push) Has been cancelled
Cloud Gateway Webhook / Test (push) Has been cancelled
Cloud Tests / lint-and-types (push) Has been cancelled
Cloud Tests / unit-tests (push) Has been cancelled
Cloud Tests / integration-tests (push) Has been cancelled
Cloud Tests / e2e-tests (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Apps Worker (Product 2) / Determine environment (push) Has been cancelled
Deploy Apps Worker (Product 2) / Deploy apps worker to apps-control host (${{ needs.determine-env.outputs.environment }}) (push) Has been cancelled
Deploy Eliza Provisioning Worker / Determine environment (push) Has been cancelled
Deploy Eliza Provisioning Worker / Deploy worker to Hetzner host (${{ needs.determine-env.outputs.environment }} @ ${{ needs.determine-env.outputs.deployment_sha }}) (push) Has been cancelled
Dev Smoke / Classify changed paths (push) Has been cancelled
supply-chain / sbom (push) Has been cancelled
supply-chain / vulnerability-scan (push) Has been cancelled
Build, Push & Deploy to Phala Cloud / build-and-push (push) Has been cancelled
Test Packaging / Validate Packaging Configs (push) Has been cancelled
Test Packaging / Build & Test PyPI Package (push) Has been cancelled
Test Packaging / PyPI on Python ${{ matrix.python }} (push) Has been cancelled
Test Packaging / Pack & Test JS Tarballs (push) Has been cancelled
UI Fixture E2E / ui-fixture-e2e (push) Has been cancelled
UI Fixture E2E / fixture-e2e (push) Has been cancelled
UI Story Gate / story-gate (push) Has been cancelled
vault-ci / test (macos-latest) (push) Has been cancelled
vault-ci / test (ubuntu-latest) (push) Has been cancelled
vault-ci / test (windows-latest) (push) Has been cancelled
vault-ci / app-core wiring tests (push) Has been cancelled
verify-patches / verify patches/CHECKSUMS.sha256 (push) Has been cancelled
Voice Benchmark Smoke / voice-emotion fixture smoke (push) Has been cancelled
Voice Benchmark Smoke / voiceagentbench fixture smoke (push) Has been cancelled
Voice Benchmark Smoke / voicebench-quality unit smoke (push) Has been cancelled
Voice Benchmark Smoke / voicebench TypeScript unit (no audio) (push) Has been cancelled
Voice Benchmark Smoke / voice bench smoke summary (push) Has been cancelled
Windows CI / windows ([bun run --cwd packages/app-core test bun run --cwd packages/elizaos test bun run --cwd packages/cloud/shared test], app-and-cli) (push) Has been cancelled
Windows CI / windows ([bun run --cwd packages/scenario-runner test bun run --cwd packages/vault test bun run --cwd packages/security test bun run --cwd plugins/plugin-coding-tools test], framework-packages) (push) Has been cancelled
Windows CI / windows ([bun run --cwd plugins/plugin-elizacloud test bun run --cwd plugins/plugin-discord test bun run --cwd plugins/plugin-anthropic test bun run --cwd plugins/plugin-openai test bun run --cwd plugins/plugin-app-control test bun run --cwd plugins/pl… (push) Has been cancelled
Windows CI / windows ([node packages/scripts/run-turbo.mjs run build --filter=@elizaos/core --filter=@elizaos/shared --filter=@elizaos/agent --concurrency=4 node packages/scripts/run-bash-linux-only.mjs scripts/verify-riscv64-buildpaths.sh node packages/scripts/run… (push) Has been cancelled
Windows CI / windows ([node packages/scripts/run-turbo.mjs run typecheck --filter=@elizaos/core --filter=@elizaos/shared --filter=@elizaos/cloud-shared --concurrency=4 bun run --cwd packages/core test bun run --cwd packages/shared test], core-runtime, 75) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:43:05 +08:00

3.9 KiB
Raw Permalink Blame History

title, sidebarTitle, description
title sidebarTitle description
Darwin vs macOS version (Electrobun WebGPU) Darwin / macOS WebGPU Why Nodes os.release() reports Darwin, not macOS marketing major, and how Eliza maps the two so WKWebView WebGPU gating stays correct after macOS 26 (Tahoe).

Darwin vs macOS marketing version (Electrobun WebGPU gate)

Electrobuns main process uses os.release() (same family as uname -r) to decide whether WKWebView is expected to expose navigator.gpu on macOS. That string is a Darwin kernel major, not the macOS marketing major shown in About This Mac (e.g. “macOS Tahoe 26.2”).

This page explains why a naive formula misclassified Tahoe users, what mapping we use instead, and where the code and tests live.

Problem we were solving

Symptom

Logs showed a misleading macOS major in the WebGPU status line (e.g. treating Darwin 25 as “macOS 16”) so the message looked like the OS was too old, even on macOS 26.x with uname -r in the 25.x range. Current builds use corrected Darwin→marketing mapping and clarify that Eliza still runs on WebGL when WKWebView has no WebGPU; the line is not “the app is unsupported.”

Root cause

For years, macOS 1115 paired with Darwin 2024 such that:

macOS marketing major ≈ Darwin major 9
(e.g. Darwin 24 → macOS 15 Sequoia).

Starting with macOS 26 (Tahoe), Apple kept Darwin at 25 for that release: build numbers and the kernel version string still start with 25, while the product major is 26. Why Apple did this: Darwins major is tied to its own release train and build numbering; Tahoe aligned platform marketing versions (macOS / iOS 26, etc.) without bumping Darwin to 26 for that cycle. See Rich Trouton — why macOS 26 build numbers begin with 25.

So the old single rule Darwin 9 on Darwin 25 produced 16, which is wrong for both the user-visible OS name and our “≥ 26 for native WKWebView WebGPU” gate.

Why that gate exists: we only want to claim native WebGPU in WKWebView when the OS/WebKit stack is known to support it; otherwise we point people at Chrome Beta and accurate messaging. Wrong mapping broke trust and feature detection.

Decision / mapping

We use a two-segment mapping, matching Apples published Darwin release table (e.g. Wikipedia — Darwin (operating system), § Darwin 20 onwards):

Darwin major macOS marketing major
20 11
21 12
22 13
23 14
24 15
25 26 (Tahoe)

Rules in code:

  • Darwin 2024: macOS_major = Darwin_major 9
  • Darwin ≥ 25: macOS_major = Darwin_major + 1
    (so Darwin 2526; Darwin 2627 when that ships, unless Apple changes scheme again)

Darwin majors below 20 (macOS 10.x era): we return null. Why: those releases are still “macOS 10” with a minor version; a single integer “marketing major” in the 11+ sense does not apply the same way, and WebGPU in this path is irrelevant.

Where in the repo

Piece Location
Mapping + checkWebGpuSupport packages/app-core/platforms/electrobun/src/native/webgpu-browser-support.ts
Vitest packages/app-core/platforms/electrobun/src/native/__tests__/webgpu-browser-support.test.ts
Startup log / browser surface packages/app-core/platforms/electrobun/src/index.ts (search WebGPU Browser)

Maintenance note

If Apple ever changes the Darwin ↔ macOS relationship again, update getMacOSMajorVersion(), this doc, and the Vitest table together. Why: silent drift here shows up as wrong user-facing strings and wrong capability gates, not as type errors.