Skip to content

perf(ci): run static analysis on the free ARM runner - #23576

Merged
nwparker merged 1 commit into
mainfrom
nwparker/ci-experiment-static-analysis-arm
Sep 28, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/ci-experiment-static-analysis-arm

Conversation

@nwparker

@nwparker nwparker commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4

ELI5

CI offers two kinds of machine, and this job was on the slower one for its workload. Moving it to the ARM machine — which is also free — makes the whole check about a quarter faster, with no code changes at all. One line.

What Changed

static_analysis moves from runs-on: ubuntu-latest to runs-on: ubuntu-24.04-arm. Nothing else, so the architecture is the only variable.

Measured, same commit, one run each:

step x64 (ubuntu-latest) ARM
job total 172 / 180s 128s
Checkout 13s 12s
install-node-dependencies 16s 16s
Lint 24–36s 25s
anti-slop 28–39s 19s
type-aware (tsgolint) 24s 15s
localization extraction 67s 46s
orcad terminal smoke 39s 14s
localization catalogs 19s 14s
localization coverage 18s 11s

≈26% faster. Every compute-bound step improved; checkout and install were flat.

Why

The repository already uses this runner for typecheck, where docs/reference/ci-runner-efficiency.md records ARM beating x64 by ~1.49x on tsc. I did not assume that figure transferred — oxlint is Rust and tsgolint is Go — so I measured. It does transfer, and across every engine in this job: Rust (oxlint), Go (tsgolint) and plain Node (the i18next extractor) all got faster.

The toolchain resolves on arm64, which was the first open question:

  • oxlint: @oxlint/binding-linux-arm64-gnu
  • tsgolint: @oxlint-tsgolint/linux-arm64
  • Bun: config/scripts/build-orcad-bun.mjs derives its target from process.arch, so it requests linux-arm64-glibc

The orcad smoke passing is the real proof. It compiles the CLI, builds orcad, boots the daemon, pairs, creates a worktree and round-trips a live PTY. Its success on arm64 means node-pty compiled from source there and that Bun, the bundled ripgrep and @parcel/watcher all resolved — that was the main thing that could have made this a non-starter.

Cost: none. ubuntu-24.04-arm is free for public repositories, the same as ubuntu-latest. Per docs/reference/ci-runner-efficiency.md, different labels grant no extra concurrency, so there is no capacity change either.

⚠️ The one tradeoff a reviewer should decide, not me

This moves the orcad PTY smoke to arm64 only. Nothing else in pr.yml builds orcad — the package job compiles the CLI but never builds or boots the daemon — so after this change no PR check exercises that boot-and-PTY path on x64. Orca ships x64 Linux, so an x64-specific node-pty, Bun or ripgrep regression would no longer be caught here.

Three ways to handle it, and I have no strong view:

  1. Accept it. The smoke is about orcad's own wiring, and the per-arch native bits are covered at package/e2e time.
  2. Keep the smoke on x64 in a small sibling job (costs a fresh checkout + install, ~28s of runner time, for the coverage).
  3. Alternate by schedule — ARM on PRs, x64 nightly.

I left it on ARM here because that is what was measured, and flagged it rather than quietly changing coverage.

Linked Issue

N/A — internal CI performance work, no pre-existing issue.

Visual Proof

N/A — CI configuration only, no user-facing surface.

Testing

  • Ran the full job on ARM: conclusion: success, 128s, with every step green. Step timings above are read from the Actions API for that run.
  • pnpm test config/scripts/pr-workflow-parallelism.test.mjs config/scripts/ci-background-step-barriers.test.mjs → 28 passed. No contract test pins this job's runner label.
  • Verified arm64 platform packages exist for both lint engines, and that the Bun target is arch-derived rather than hardcoded.

Not verified: whether the native-module cache hit or node-pty compiled from source. This was the first ARM run for this job and its cache key includes runner.arch, so the cache was almost certainly cold — meaning 16s is a cold-cache number and steady state should be equal or better, not worse. Worth a glance on the second run.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

No new tests: this is a one-line runner-label change whose behavior is verified by the job itself passing.

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • glibc floor: docs/reference/linux-glibc-compatibility.md warns that a native module compiled on a newer runner can reference symbol versions absent on the Ubuntu 20.04 / glibc 2.31 floor. That governs artifacts that ship; this job packages nothing and its compiled node-pty never leaves the runner. The package jobs are untouched.
  • Native cache: the key already includes runner.arch, so ARM gets its own entry and cannot collide with the x64 one.
  • Backwards compatibility / Security / SSH / Mobile: no runtime code, no wire or on-disk format, no user-facing surface.
  • This single label change is worth more than the four other CI changes in this batch combined (194s → ~172s from those; → 128s with this).

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Measured 128s against 172s on ubuntu-latest, with every compute-bound step
faster: type-aware 24s to 15s, anti-slop 28s to 19s, localization extraction
67s to 46s, and the orcad terminal smoke 39s to 14s. Checkout and the install
were unchanged at 12s and 16s.

The toolchain resolves on arm64: both lint engines ship linux-arm64 bindings
(@oxlint/binding-linux-arm64-gnu, @oxlint-tsgolint/linux-arm64), and
build-orcad-bun.mjs derives its target from process.arch. The orcad smoke
booting and round-tripping a real PTY is the evidence that node-pty compiled
and that Bun, the bundled ripgrep and @parcel/watcher all resolved.

The runner is free for public repositories, the same one the typecheck job
already uses.
@nwparker
nwparker force-pushed the nwparker/ci-experiment-static-analysis-arm branch from 88b9fbf to 530f3d7 Compare September 28, 2026 08:37
@nwparker nwparker changed the title EXPERIMENT (do not merge): static analysis on the free ARM runner perf(ci): run static analysis on the free ARM runner Sep 28, 2026
@nwparker
nwparker marked this pull request as ready for review September 28, 2026 08:37
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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

📝 Walkthrough

Walkthrough

The static_analysis job now runs on ubuntu-24.04-arm instead of ubuntu-latest. Comments document measured runtime and the lint tools’ ARM64 support.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 530f3

Retain x64 smoke coverage before merging so regressions in the supported x64 path remain visible.

Architecture Summary

Architecture risk: 🔵 Low · up to 530f3

The changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.

Changed systems: None identified.

Architecture concerns
No architecture-level concerns identified.

Review details

Before / after behavior

  • observed — Modified behavior in .github/workflows/pr.yml: static_analysis now uses the ubuntu-24.04-arm runner instead of ubuntu-latest; comments record measured timings and toolchain ARM64 support.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, specific, and accurately identifies the main change: moving static analysis to the free ARM runner for CI performance.
Description check ✅ Passed The description is complete and relevant. It explains the change, rationale, measured results, testing, tradeoffs, compatibility considerations, and checklist status. The N/A linked issue is reasonabl…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.

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.

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
.github/workflows/pr.yml (1)

162-162: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Retain Linux x64 smoke coverage.

Orca still supports x64 targets, including Linux x64 dependencies. static_analysis now runs smoke:orcad-terminal only on ARM, and no other workflow invokes this smoke command. Add a separate x64 smoke run while retaining the ARM job, or provide equivalent x64 coverage elsewhere.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 762d64a0-9e89-4fa1-a4a0-bad6145aad73

📥 Commits

Reviewing files that changed from the base of the PR and between a174a08 and 530f3d7.

📒 Files selected for processing (1)
  • .github/workflows/pr.yml

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

@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 code issues — one coverage decision the author already flagged, laid out below.

Reviewed changes

  • static_analysis moves to the ARM runner — .github/workflows/pr.yml:162 switches runs-on: ubuntu-latest to ubuntu-24.04-arm, with a 5-line comment recording the measured speedup and why the toolchain resolves on arm64.
  • Measured ~26% job-time reduction — 128s vs 172s with every compute step faster. I verified the load-bearing claims rather than taking them on trust: both lint engines ship arm64 bindings, the Bun target is arch-derived in config/scripts/build-orcad-bun.mjs, and the native cache key already carries runner.arch (install-node-dependencies/action.yml:179,190), so there is no x64/ARM cache collision.
  • No contract test pins this job's runner label — pr-workflow-parallelism.test.mjs asserts the typecheck label and static_analysis's native-runtime only.

ℹ️ The x64 orcad-daemon PTY smoke loses its only home

The smoke:orcad-terminal step (.github/workflows/pr.yml:290) is the only place in any PR, scheduled, or manual workflow that boots the orcad daemon, pairs a client, and round-trips a live PTY. After this change that end-to-end path runs on arm64 only, while Orca ships x64 Linux. I independently confirmed the author's note: bun-profile-tests.yml builds orcad on x64 (ubuntu-22.04) but only runs the bundled-Bun PTY tests and the --orcad-smoke-load-check load probe — it never boots the daemon or exercises its dispatch path, so it does not restore the coverage this move drops.

The change itself is correct and well-evidenced. This is the one decision the author explicitly left to a reviewer, and since the repo keeps x86 unit coverage scheduled (docs/reference/ci-runner-efficiency.md:70-75) I would lean toward option 3 from the PR body (ARM on PRs, x64 on a nightly/scheduled lane) as the cheapest way to keep the daemon's PTY path exercised on x64 — but options 1 and 2 are defensible too. Flagging for an explicit choice rather than silently approving.

Technical details
# x64 orcad daemon PTY coverage

## Affected sites
- `.github/workflows/pr.yml:162` — `runs-on: ubuntu-24.04-arm` on `static_analysis`.
- `.github/workflows/pr.yml:290-302` — the only `pnpm run smoke:orcad-terminal` invocation in the repo, change-scoped to orcad/CLI/shared/resources inputs.
- `bun-profile-tests.yml:64,77-87` — x64 leg builds orcad but only runs `test:bun:profile --artifact` plus the Node-18 load / profile-preflight probes; no daemon boot, no client pairing, no PTY round-trip.

## Required outcome
- Decide whether x64 is allowed to lose the orcad-daemon boot + pairing + PTY round-trip, or restore it via a small x64 sibling job / scheduled lane.
- If accepted, the tradeoff is worth recording in `docs/reference/ci-runner-efficiency.md` alongside the existing unit-shard architecture note.

## Open questions for the human
- Is the orcad daemon's PTY dispatch path already trusted to be architecture-independent enough that dropping its x64 run is acceptable per PR?

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

@nwparker
nwparker merged commit 2f8f4f5 into main Sep 28, 2026
36 of 51 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