Skip to content

Shell tests pass on the Linux host; --offload sends Home's tests there - #376

Merged
ymote merged 1 commit into
mainfrom
fix/linux-shell-tests
Oct 8, 2026
Merged

ymote merged 1 commit into
mainfrom
fix/linux-shell-tests

Conversation

@ymote

@ymote ymote commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Why

#373's --offload kept Home's test suite on the Mac, because three shell tests failed on the Linux host (EC2 c5d.18xlarge, 72 vCPUs on two sockets). This PR fixes them and moves the suite to the host.

The three failures

backend_data_aliases_cannot_reuse_a_stale_peer_with_the_current_handle depended on test order.

  • auth.* is a macOS and Android host API (oauth-service/src/host_catalog.rs).
  • Once any test in the process has registered the auth catalog, a Linux host refuses auth.backend.* as api_unavailable, before the account check the test asserts. Alone, the test passed.
  • It now accepts api_unavailable only where the catalog says this platform lacks the method. On macOS it still requires the account-scope refusal ("account changed"). On every platform it still checks that the stale peer reached no backend service.

The two photos_preview_* tests ran out of makepad's 64 ms Splash budget. Each entry into a Splash isolate gets 64 ms of wall-clock time. Measured on the host with instrumentation:

Case Photos preview entry
Alone 6 ms
~1,000 shell tests in one process, 18–72 threads 65–1,100 ms
  • Where the time goes: waits on makepad's process-wide LiveId interner mutex. The tokenizer takes it ~12,700 times per entry, giving 90–230 ms of waits, mostly futex time. Page faults also stall in lock_mm_and_find_vma behind other threads' memory-map changes.
  • Other tests: a few other Splash tests fail the same way now and then.
  • Not new: Fix Android app layout, Glance styling, and Camera failure handling #357 trimmed a test for the same reason ("under concurrent CI load").
  • The fix: makepad#109 adds MAKEPAD_SPLASH_BUDGET_MS, read once. Unset, the budget stays 64 ms. Only phone.yml's test step sets it (10 s). The change rides as stacked runtime patch 19 (makepad-splash-budget.patch, the same lines as Repin the runtime to makepad 75e3e24d (WebReader close, terminal gestures) #109) until the next makepad sweep, so makepad main does not move for it.

The offload

tools/ci_local.py now keeps only the Apple icons, asset catalogs and the macOS compile of Home on the Mac. Building and running Home's and App Hub's tests goes to the host. docs/local-ci.md is updated to match.

Checks

  • Home's test command on the Linux host, with the stacked patch, at the default 72 threads: 5 of 5 runs green, 1,449 tests, ~42 s each.
    • A control run without the override failed both Photos tests, as before.
    • Run times match with and without the override, so no test was depending on the budget running out.
  • python3 tools/setup.py --check --cargo: green.
  • python3 -m unittest tools/test_ci_local.py: 33 pass.
  • tools/ci_local.py --check-drift: clean.
  • makepad#109: cargo check -p makepad-widgets gives no warnings in makepad-widgets. Its existing lib tests show the same 6 Linux failures as makepad main without the change (desktop_style, grid, menu_bar, widget_tree).
  • Local CI (--only apps,desktop,phone --linux-host --offload): running. The result will be posted as a comment.

🤖 Generated with Claude Code

Three shell tests failed when Home's tests ran on the Linux host:

- backend_data_aliases_cannot_reuse_a_stale_peer_with_the_current_handle
  depended on test order. auth.* is a macOS and Android host API. Once
  any test in the process has registered the auth catalog, a Linux host
  refuses auth.backend.* as api_unavailable before the account check the
  test expected; alone, the test passed. It now accepts that refusal
  only where the catalog says the platform lacks the method. On macOS
  it still asserts the account-scope refusal.
- The two photos_preview tests (and, now and then, a few other Splash
  tests) ran out of makepad's 64 ms wall-clock budget per Splash entry.
  The Photos entry takes 6 ms alone on the host. With ~1,000 tests in one
  process at 18-72 threads it took 65-1,100 ms, waiting on makepad's
  process-wide LiveId interner lock and on page faults. makepad#109 lets
  MAKEPAD_SPLASH_BUDGET_MS raise the budget; it is stacked onto the
  runtime patches until the next sweep. Only the test step sets it.

With that, tools/ci_local.py keeps only Apple icons, asset catalogs and
the macOS compile of Home on the Mac.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ymote
ymote force-pushed the fix/linux-shell-tests branch from 550a2d4 to dfede2b Compare October 8, 2026 08:53
@ymote

ymote commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Local CI passed on dfede2b (tools/ci-local.sh --only apps,desktop,phone --linux-host --offload, 12m42s, Darwin arm64; the ubuntu jobs and the macOS jobs' portable steps (their macOS steps ran here) on the Linux build host, Linux x86_64).

GitHub would run for this PR: desktop.yml, phone.yml, apps.yml. Merged on this local pass (macOS runner queue); GitHub CI runs on the merge commit on main.

Job Step Result Time
ci-local / drift The local mapping fits the workflows PASS -
desktop.yml / desktop Prepare the pinned framework sources PASS 0s
desktop.yml / desktop Compile the desktop with the shared runtime PASS 1m41s
desktop.yml / desktop Desktop tools and scripts PASS 21s
desktop.yml / desktop (linux) Prepare the pinned framework sources PASS 0s
desktop.yml / desktop (linux) One copy of every shell source PASS -
desktop.yml / desktop (linux) One Makepad, App Hub, octos and Rinx in the locked graph PASS 1s
desktop.yml / desktop (linux) The native apps' generated places match native-apps.json PASS 0s
desktop.yml / native-host-api Prepare the pinned framework sources PASS 1s
desktop.yml / native-host-api Build the native acceptance host and pinned Hub CLI PASS 41s
desktop.yml / native-host-api Signed app tool calls a real OS permission API PASS 3s
phone.yml / home Prepare pinned sources and the reviewed runtime patch PASS 1s
phone.yml / home Validate launcher icons and Apple asset catalogs PASS 5s
phone.yml / home Compile Home and its bundled modules PASS 2m38s
phone.yml / home (linux) Prepare pinned sources and the reviewed runtime patch PASS 0s
phone.yml / home (linux) Verify the single runtime graph PASS 1s
phone.yml / home (linux) The native apps' generated places match native-apps.json PASS 0s
phone.yml / home (linux) The pinned octos revision PASS -
phone.yml / home (linux) Build octos (unless cached) PASS -
phone.yml / home (linux) Build Home, App Hub admission and runtime policy tests PASS 3m03s
phone.yml / home (linux) Test Home, App Hub admission and runtime policy PASS 9m00s
phone.yml / home (linux) Two-lane scenario (real kernel, scripted model) PASS 26s
apps.yml / services (linux) python3 tools/setup.py PASS 0s
apps.yml / services (linux) Shared system app interface PASS 0s
apps.yml / services (linux) Kernel service PASS 15s
apps.yml / services (linux) App peers PASS 27s
apps.yml / services (linux) AI providers config PASS 4s
apps.yml / services (linux) Connected provider protocols and Linux host adapter PASS 44s
apps.yml / services (linux) L0 in-card chat (sys.chat, host side) PASS 9s
apps.yml / services (linux) System toolbox (workflow templates) PASS 1m27s
apps.yml / kernel-security (linux) python3 tools/setup.py PASS 0s
apps.yml / kernel-security (linux) The pinned octos revision PASS -
apps.yml / kernel-security (linux) Build octos (unless cached) PASS -
apps.yml / kernel-security (linux) Real-kernel tests PASS 36s
apps.yml / apps (linux) python3 tools/setup.py PASS 0s
apps.yml / apps (linux) Host services (Mail, AI providers, News) PASS 1m56s
apps.yml / apps (linux) Connected accounts and Rinx editor PASS 1m27s
apps.yml / apps (linux) Shell AI services (crates/ai-host) PASS 2m17s
apps.yml / apps (linux) AppCard runtime setup safeguards PASS 0s
apps.yml / apps (linux) AppCard clippy (own crates; shared runtime compiles) PASS 26s
apps.yml / apps (linux) AppCard transport and store PASS 7s
apps.yml / apps (linux) One Makepad, App Hub, octos and Rinx in the locked graph PASS 2s
linux-host / sandbox (linux) python3 tools/setup.py PASS 0s
linux-host / sandbox (linux) Process sandbox on Linux (Landlock, seccomp) PASS 1m37s

Notes:

  • GitHub runs Python 3.12; this run used Python 3.9.6
  • GitHub runs Python 3.12; the Linux host used Python 3.14.4

@ymote
ymote merged commit 31a34f7 into main Oct 8, 2026
5 of 6 checks passed
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.

1 participant