Skip to content

ci: use ARM unit runners, overlap web builds, and reuse verifier fixtures - #23376

Merged
OrcaWin merged 6 commits into
mainfrom
ci/arm-unit-runners
Sep 27, 2026
Merged

OrcaWin merged 6 commits into
mainfrom
ci/arm-unit-runners

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

PR tests use a faster hosted CPU architecture, while package and mobile checks avoid waiting for independent work or rebuilding identical fixtures.

What Changed

  • Run the same eight Node 24 unit shards and their native-cache primer on Ubuntu ARM. Add a matching main-branch cache warmer. Relay integration and platform/package gates keep x86 runners.

  • Preserve full x86 Node 24 and Node 26 coverage on the daily workflow, including relay integration for both versions. This changes the PR unit architecture; it does not remove tests, assertions, isolation, or timeouts.

  • Overlap Linux web-client projection with the independent mobile bundle build; packaging waits for both.

  • Give mobile verifier tests isolated copies of their existing starting-bundle snapshot. The verifier still creates two fresh builds, and source-edit/build-determinism tests still rebuild independently.

  • Observe the WebRTC packet interval from Electron main so hidden renderer timers cannot delay the probe. Run the Windows installer CIM probe before the concurrent native suite. Keep all packet, policy, and deadline assertions.

Why

The unit timing baseline was already balanced; runner speed varied more than assigned work. ARM pilots improved complete job time as well as test time. Explicit waits and fixture copies remove redundant waiting/work without increasing shard or worker counts.

Linked Issue

None.

Visual Proof

N/A — CI and test fixtures only.

Testing

  • ARM/x86 pilot: identical source and shard assignments. Shard 1 test time 417s → 360s, full job 449s → 404s; shard 8 test time 429s → 341s, full job 461s → 384s. All pass/skip counts matched across architectures: 11,189/150 and 12,164/125 tests respectively.
  • Full ARM suite: all eight shards passed in 329–373 test seconds (365–412 complete job seconds). Artifact audit proves 9,876 files exactly once, identical full assignment to the x86 pilot, no missing files or unhandled errors.
  • Web/mobile build comparison: four samples per mode across both orders, 17.2–17.3s serial versus 11.7–12.1s overlapped. All 1,248 emitted files match byte-for-byte, including all mobile manifests/assets.
  • Mobile fixture comparison: 25.47s → 20.04s and 25.35s → 19.92s; all 47 tests pass in all four runs.
  • 91 focused tests and changed-code quality gate; workflow tests cover joins, cache platform, both scheduled Node versions, and unchanged unit selection.
  • 49 Windows workflow/registration tests and changed-code quality.
  • WebRTC timer fault injection on ARM and x86: the revised probe passes with renderer timers unavailable; the original fails the negative control.
  • Final PR CI: 31 checks passed, seven conditional skips. Windows passed all six installer checks and 496 native-boundary tests.

Review

  • No upstream skill source used.

Notes

Hosted timing samples exclude queue time. Daily x86 unit coverage is retained, but PR unit coverage moves to ARM; x86 native, package, and relay checks continue on PRs. Additional daily Node 24 and hourly ARM cache jobs trade a bounded amount of scheduled work for shorter PR checks.

Earlier validation failed a hidden-renderer WebRTC timeout and a Windows CIM query timeout. The exact original WebRTC cause did not reproduce in isolated or four-concurrent probes. The final changes remove renderer-clock dependence and separate CIM startup from native test load; they do not increase deadlines or classify the original failures as harmless.

Checklist

  • Scope, mechanism, before/after, and alternatives explained.
  • Self-reviewed for correctness, test independence, and performance.
  • Cross-platform, native ABI, and SSH coverage considered.
  • Full CI verification.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: c8946684-588a-4711-a99d-402f8ae1a7a8

📥 Commits

Reviewing files that changed from the base of the PR and between 22ed24c and fa40d43.

📒 Files selected for processing (4)
  • .github/workflows/pr.yml
  • config/scripts/client-hosted-browser-package-coverage.test.mjs
  • config/scripts/win32-test-lane-registration.test.mjs
  • docs/reference/ci-runner-efficiency.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/reference/ci-runner-efficiency.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

PR unit tests and native-cache preparation use ARM runners. Scheduled x86 workflows prepare caches and run unit tests on Node 24 and 26, and relay integration covers configured Node versions. The Linux package job runs the web-client build in the background and joins it before package unpacking. The Windows installer process probe runs in a separate step before Windows-specific boundary tests. Mobile bundle tests use shared fixtures for snapshots, copies, and mutation-isolation checks. The WebRTC probe test now performs its packet-observation delay and peer closure from the host process.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to fa40d

The CI scheduling and test changes have no established merge-blocking issue; normal CI checks remain appropriate.

Security Architecture Review

Security architecture risk: 🔵 Low · up to fa40d

The review found no demonstrated expansion of production access or weakening of CI credentials. The main design tradeoff is that some x86 unit coverage moves from PR checks to a scheduled run.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The identified entrypoint signal is confined to a repository test: the flagged helpers have no identified runtime dependents, and source inspection shows that they read workflow configuration for assertions rather than expose a production API.

Trust Boundaries and Controls

  • observed — The inspected CI jobs retain read-only repository permissions and non-persistent checkout credentials while executing repository tests and dependency installation.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 8 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 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.
Title check ✅ Passed The title is concise and accurately summarizes the main changes: ARM unit runners, overlapping web builds, and reused verifier fixtures.
Description check ✅ Passed The description is complete and relevant. It includes the required sections, explains the changes and rationale, documents testing with platform coverage and results, addresses visual proof, and recor…
Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 8 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • ARM PR unit shards: pr.yml moves the Node 24 native-cache primer and the reusable sharded test job to ubuntu-24.04-arm; unit-tests.yml gains a runner input (default ubuntu-latest) so every other caller stays x86.
  • Daily x86 coverage retained: node-next-compat.yml (renamed) now primes and runs both Node 24 and 26 on x86, and relay_integration fans out over all inputs.node_versions instead of only the first entry.
  • ARM cache warmer: ci-cache-warmup.yml adds warm-linux-arm on ubuntu-24.04-arm to seed the arm64 native and pnpm cache keys from main.
  • Overlapped web projection: the package job runs build:web-from-renderer as a background step (web-client) and joins it with linux-package-tools before packaging.
  • Shared mobile verifier fixture: new mobile-web-app-bundle-test-fixture.mjs holds the scratch/snapshot helpers; verifier tests copy the cached, complete bundle tree instead of rebuilding.

I traced the load-bearing invariants and they hold: the native cache key carries runner.arch plus the /etc/os-release scope and the pnpm store key carries os.arch(), so arm64 and x86 cannot cross-restore (install-node-dependencies/action.yml:87, :179). copyWrittenBundle reproduces the full tree because buildMobileWebAppBundle writes the entry document plus every asset through writeMobileWebBundleTree, and files is exactly manifest.json + manifest.assets[].path — no other files exist on disk. out/web (web client) and out/mobile-web (mobile bundle) are independent, and the wait correctly precedes packaging while web-client starts after Build package inputs produced out/renderer. The barrier test change (4 pending in package, plus the new web-client join assertion) is consistent with the step order.

ℹ️ PR unit coverage is now arm64-only

The one semantic shift worth stating for the record: pull requests no longer run unit shards on x86, so an x86-only unit regression would not surface until the next daily run. This is a deliberate, measured placement tradeoff that the PR description already documents, and x86 native/package/relay gates still run per PR. No change requested.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Host-clocked WebRTC packet observation: the egress probe now keeps its RTCPeerConnection on globalThis and moves the three-second observation wait plus the peer close into Electron main, so hidden-renderer timer throttling can no longer stretch the probe past its 20s timeout. The packet assertions, drain window, and deadline are unchanged.

The change is sound: the injected script still awaits setLocalDescription before returning, the peer stays reachable through globalThis for the follow-up close, and the STUN packets were already counted in main, so the observation window is now driven by an unthrottled clock without weakening the baseline.packets > 0 / protectedGuest.packets === 0 assertions.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — one documentation nit inline.

Reviewed changes

  • Windows CIM probe split into its own step: package_windows now runs nsis-process-check.test.mjs in a dedicated Test Windows installer process probe step before the concurrent Test Windows-specific boundaries suite, keeping cold Get-CimInstance startup off a loaded runner.
  • Registration guard reads both lane steps: win32-test-lane-registration.test.mjs replaces the single WINDOWS_LANE_STEP constant with a WINDOWS_LANE_STEPS list and unions both steps' vitest argv into laneFiles.
  • Ordering assertion added: client-hosted-browser-package-coverage.test.mjs pins probe-before-boundaries and asserts the probe step is not backgrounded.
  • Docs updated: ci-runner-efficiency.md records the schedule change and the still-unproven root cause of the probe timeout.

I verified the guard still finds the probe file through the second step and that the boundaries step no longer lists it, so the test runs exactly once. Both changed config test files pass locally (35 tests).

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

`The "${WINDOWS_LANE_STEP}" step no longer invokes vitest; this guard is stale.`
)
}
const runs = WINDOWS_LANE_STEPS.map((name) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function now reads two lane steps, but the JSDoc directly above (/** The vitest argv of the one Windows job's one curated-file step. */) and the module header at lines 22–25 still describe a single curated-file step. Worth updating both to the two-step lane so the guard's stated contract matches its behavior.

@OrcaWin
OrcaWin merged commit 47cebbf into main Sep 27, 2026
38 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