Skip to content

ci(judge-e2e): skip the engine on JS-only changes and cut its build from ~37 min - #1359

Merged
andersonleal merged 2 commits into
mainfrom
ci/judge-e2e-skip-engine-js-only
Oct 9, 2026
Merged

andersonleal merged 2 commits into
mainfrom
ci/judge-e2e-skip-engine-js-only

Conversation

@andersonleal

@andersonleal andersonleal commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Judge E2E took ~38 min per run, 37.1 of it in the real-engine step, while its 11 cases take ~27 s. The rest was compilation (run 37926568171):

Suite Build Tests
judge-semif / decider / laya / clef 7m38s / 7m31s / 8m24s / 7m58s ~2 s each
typesafe / openai / judge-provider / judge ~1m10s–1m20s each 2–5 s each

The job also ran in full for PRs that touch only packages/console-ui (types only) or the root pnpm files, which the engine suite never exercises. #1353 paid 38 min for one .d.mts. Those paths changed 54 times in the last month.

What

  • Skip the engine on JS-only changes: a scope step diffs the PR merge commit against its first parent. The Rust/engine steps run only when an engine-relevant path changed (on.pull_request.paths minus the four JS-only entries). The UI Vitest and tsc builds still run on every trigger.
  • crates/llama-native: III_LLAMA_CPP_MINIMAL=1 builds one CPU module and no Vulkan. It is meant for test builds only; published builds are unchanged.
  • One CARGO_TARGET_DIR for all eight suites, so each shared unit builds once. judge-laya's opt-level = 3 still gets its own llama.cpp. copy_into already removes before copying, so the shared profile dir is safe.
  • Removed rust-cache, which never helped and stored 1 GB in the repo cache quota per PR, and the Vulkan apt step. The hosted image already ships cmake, curl, tar and patch.

Verification

https://claude.ai/code/session_01WQhvPNhJJpri8PUFLGuQ5s

Summary by CodeRabbit

  • Tests
    • Rust engine tests now run only when changes affect relevant engine components; unrelated changes skip the suite.
    • Test runs use a shared temporary build directory and a minimal Linux x86_64 engine configuration.

packages/console-ui is a type-only surface and the root pnpm files only
reach the judge UIs, yet a PR touching just those ran the full ~37 min
real-engine suite (e.g. #1353, one .d.mts file). Keep the UI Vitest and
tsc builds on those paths and gate the toolchain, cache, llama.cpp tools,
engine install and engine tests on a change the engine suite builds.

Claude-Session: https://claude.ai/code/session_01WQhvPNhJJpri8PUFLGuQ5s
@andersonleal andersonleal added the no-ticket PR deliberately has no Linear ticket (bump/typo/CI-only) label Oct 9, 2026
@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
workers Ready Ready Preview Oct 9, 2026 1:19pm UTC
workers-tech-spec Ready Ready Preview Oct 9, 2026 1:19pm UTC

Request Review

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 83 skipped (no docs/).

Layer Result
structure ✓
vale ✓
ai ✓
render ✓

Four for four. Nicely done.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0f8018ec-950e-4d27-bce6-4a185a99564c

📥 Commits

Reviewing files that changed from the base of the PR and between fd06275 and da1405d.


📒 Files selected for processing (2)
  • .github/workflows/judge-e2e.yml
  • crates/llama-native/build.rs

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



📝 Walkthrough

Walkthrough

The workflow checks changed paths and runs the Rust engine suite only when they match engine-related patterns. Those tests use a shared temporary Cargo target directory and III_LLAMA_CPP_MINIMAL=1. The build script uses that variable to control CPU variants and Vulkan for dynamic Linux x86_64 builds.

Changes

Real-engine test workflow

Layer / File(s) Summary
Minimal Linux build configuration
crates/llama-native/build.rs
The build script reruns when III_LLAMA_CPP_MINIMAL changes. For dynamic Linux x86_64 builds, it sets CPU variants and Vulkan to OFF when the variable is exactly 1, and to ON otherwise.
Scoped real-engine test workflow
.github/workflows/judge-e2e.yml
The workflow compares the PR merge commit with its first parent and checks changed paths against engine-related patterns. It conditionally installs Rust and the pinned engine, then runs real-engine tests with a shared temporary Cargo target directory and III_LLAMA_CPP_MINIMAL=1. The workflow removes the Cargo cache and llama.cpp build-tools provisioning steps.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other


Merge Risk: ⚪ Minimal · up to da140

The workflow still selects real-engine tests for this change. No issue identified here prevents merging after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main changes: skipping engine tests for JS-only changes and reducing engine build time.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 …
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 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the paths at dawn,
Then starts the engine suite when matched.
A smaller build wakes up to run,
With CPU variants and Vulkan detached.
I hop beside the passing tests!

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

@andersonleal andersonleal changed the title ci(judge-e2e): skip the Rust engine suite on JS-only shared changes ci(judge-e2e): skip the engine on JS-only changes and cut its build from ~37 min Oct 9, 2026
The engine step spent ~36 of 37 min compiling: llama.cpp from scratch
for each of semif, decider, laya and clef (every CPU variant plus the
Vulkan shaders), and eight separate workspaces rebuilding the same deps.
The 11 cases themselves take ~27 s.

- crates/llama-native: III_LLAMA_CPP_MINIMAL=1 builds one CPU module and
  no Vulkan (test-only; published builds are unchanged).
- judge-e2e: one CARGO_TARGET_DIR for all suites plus the minimal build;
  drop rust-cache (PR-scoped, never reaches another PR, and it purges
  path crates) and the Vulkan apt step.

Local mirror run: 11/11 pass in 245 s, llama.cpp built twice (judge-laya
keeps its own opt-level 3 build).

Claude-Session: https://claude.ai/code/session_01WQhvPNhJJpri8PUFLGuQ5s
@andersonleal
andersonleal marked this pull request as ready for review October 9, 2026 13:33
@andersonleal
andersonleal merged commit d89ffbe into main Oct 9, 2026
34 of 35 checks passed
@andersonleal
andersonleal deleted the ci/judge-e2e-skip-engine-js-only branch October 9, 2026 13:59

This branch was successfully deployed

2 active deployments
Preview – workers — da1405d2 Deployed Oct 9, 2026 by vercel[bot]
Preview – workers-tech-spec — da1405d2 Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-ticket PR deliberately has no Linear ticket (bump/typo/CI-only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant