Repository navigation
ci: skip unrelated installs and share xterm build dependencies - #23607
Conversation
|
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 configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe changes add a composite action that restores xterm dependency caches and exposes cache status. New workflows seed the cache and compare three cache-disabled samples with three cache-enabled samples on pull requests. The existing pull-request workflow now uses the shared action. Patch regeneration checks the toolchain when installed dependencies match the install stamp. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Cached dependencies remain tied to the pinned xterm source and runtime inputs, while patch verification still runs. No concrete merge-blocking regression is established; complete the planned measurements and normal CI checks. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 327a81de-f4ab-4e77-946f-dfae8a57db02
📒 Files selected for processing (4)
.github/actions/prepare-xterm-dependencies/action.yml.github/workflows/ci-xterm-cache.yml.github/workflows/pr.ymlconfig/scripts/regenerate-xterm-patches.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
There was a problem hiding this comment.
Important
The installed-dependency cache this PR adds can never be restored by the job it was written for: the key embeds runner.arch, only the seed job on ubuntu-latest (X64) saves it, and xterm_patch_sync runs on ubuntu-24.04-arm (ARM64) with no restore-keys. As written, production gets no reuse, and the benchmark measures the wrong architecture.
Reviewed changes
- New composite action —
.github/actions/prepare-xterm-dependencies/action.ymlrestores the pinned upstream checkout's.gitand installednode_modules, keyed by OS, arch, resolved Node version, and a hash of the manifest plus the generator/action files. - New pilot workflow —
.github/workflows/ci-xterm-cache.ymlseeds that cache onmain(and when its own inputs change) and runs a six-leg baseline/cache benchmark on pull requests. - Production consumer —
xterm_patch_syncinpr.ymlreplaces its inline~/.npm+.gitcache step with the new action. - Generator guard —
ensureDependenciesnow callsassertToolchainon the install-stamp hit path, so a reusednode_moduleswhose pinned toolchain drifted fails loudly instead of being silently reused.
ℹ️ A production cache miss is colder than the benchmark's baseline
The benchmark's cache: false arm restores the xterm-upstream-* npm download cache before a cold install, but the production job no longer restores it. A real miss therefore runs npm ci with no registry cache at all — a path the benchmark never measures, and one that the new key makes more frequent (any generator-script or action edit now invalidates the key).
Technical details
# Production miss loses the npm download cache
## Affected sites
- `.github/workflows/pr.yml:488` — the action restores only `.git` + `node_modules`; the step it replaced also restored `~/.npm`.
- `.github/workflows/ci-xterm-cache.yml:66-73` — the benchmark's `cache: false` arm still restores `xterm-upstream-*` (`~/.npm` + `.git`), so it is not the production miss path.
## Required outcome
- Either restore the existing `xterm-upstream-*` key alongside the installed-deps cache in `xterm_patch_sync`, or state explicitly that a fully cold install on miss is the accepted trade and treat the `cache: false` arm as reference-only.
## Open questions for the human
- Is the plan to keep `xterm_patch_sync` on arm64, or move it? That decides whether the npm-cache restore is worth reinstating.DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 5a7e963a-7f51-46e6-b0e5-ab00f10e50e0
📒 Files selected for processing (4)
.github/actions/prepare-xterm-dependencies/action.yml.github/workflows/ci-xterm-cache.yml.github/workflows/ci-xterm-dependency-pilot.ymlconfig/scripts/xterm-dependency-cache.test.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
Since the last pullfrog review (045a853), this update:
- Bound the production seed to verified main entries —
ci-xterm-cache.ymldrops itspull_requesttrigger andmeasurejob, gatesseedongithub.ref == 'refs/heads/main', replacesinstall-node-dependencieswith a bareactions/setup-node, and removes the inline baseline npm-cache step. - Moved reuse onto the production architecture —
seednow runsubuntu-24.04-arm(matchingxterm_patch_sync), the pilot'smeasurematrix also runs ARM, and the cache key gained the/etc/os-releaseimage so an image change invalidates it. - Moved the npm download fallback into the action —
xterm-upstream-*(~/.npm+.git) is now restored on an installed-deps miss, so a production miss is no longer colder than the benchmark baseline. - Added a stand-alone ARM pilot workflow —
ci-xterm-dependency-pilot.ymlseeds the installed-deps cache and runs thesample × cachebenchmark onubuntu-24.04-arm. - Added a YAML-contract test covering the action key/paths, the seed's save ordering and guards, and the production consumer's use of the action.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| - name: Preserve fallback downloads | ||
| if: steps.cache.outputs.cache-hit != 'true' |
There was a problem hiding this comment.
This save — and the action's matching restore — run only on an installed-deps miss, which is the same condition that governs the fallback's only access. In steady state the installed-deps key hits (production xterm_patch_sync and every nightly seed skip the fallback), so xterm-upstream-* sees no access for >7 days and GitHub evicts it; it is then likely absent on the first key rotation, exactly the miss it was added to warm. The pilot's unconditional actions/cache@v5 at ci-xterm-dependency-pilot.yml:24 is the keep-alive shape this seed lacks; either restore it unconditionally here too, or accept that a key rotation starts fully cold.
Technical details
# Fallback npm cache expires before the miss it warms
## Affected sites
- `.github/workflows/ci-xterm-cache.yml:48-49` — "Preserve fallback downloads" saves only when the installed-deps key misses.
- `.github/actions/prepare-xterm-dependencies/action.yml:26-27` — the fallback is restored only when the installed-deps key misses.
- `.github/workflows/ci-xterm-dependency-pilot.yml:24-30` — the pilot's unconditional `actions/cache@v5` is the keep-alive shape the seed lacks.
## Required outcome
- Either restore `xterm-upstream-*` unconditionally in the seed so its last-access stays recent, or state explicitly that the fallback is best-effort and expect a cold `npm ci` when the installed-deps key eventually rotates.
## Open questions for the human
- Is a fully cold `npm ci` on a key rotation acceptable, or should the fallback be kept warm?| readYaml('../../.github/workflows/pr.yml').jobs.xterm_patch_sync['runs-on'] | ||
| ) | ||
| expect(pr.some((step) => step.uses === './.github/actions/prepare-xterm-dependencies')).toBe(true) | ||
| expect(pr.some((step) => /cache(?:\/save)?@/.test(step.uses ?? ''))).toBe(false) |
There was a problem hiding this comment.
This regex matches actions/cache@v5 and actions/cache/save@v5 but not actions/cache/restore@v5, so the guard that production uses no direct cache action would miss a restore-only substitution. Extending the alternation to save|restore closes the hole.
There was a problem hiding this comment.
ℹ️ No new issues in the latest commits — approval is withheld only because the two prior minor threads are still unresolved.
Reviewed changes
Since the last pullfrog review (7682b70), this update:
- Makes the production xterm job dependency-free —
xterm_patch_syncdropsinstall-node-dependenciesfor a bareactions/setup-node@v6; the generator's--checkneeds only node/npm/git/tar plus its localxterm-patch-text.mjs, so no Orcanode_modulesor pnpm is required. - Removes the completed benchmark pilot —
ci-xterm-dependency-pilot.ymlis deleted, and nothing in the workflows or tests references it. - Covers the new production shape in tests —
pr-workflow-parallelism.test.mjsassertsxterm_patch_synchas no install step, andxterm-dependency-cache.test.mjsasserts itssetup-nodeinputs and the absence of any direct cache action. Both files pass locally (24 tests).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
Xterm patch checks finish sooner by installing only the tools they use. Every pristine and patched bundle is still rebuilt and compared.
What Changed
Use Node directly instead of restoring and installing Orca's unrelated dependencies. Restore the pinned upstream checkout's installed tools from a shared main cache. Cache keys separate Ubuntu versions, architecture, exact Node versions, manifests and generator/action changes; cache hits recheck the pinned tool versions. A miss tries the existing npm-download fallback. That fallback is best-effort: it may expire after seven idle days, in which case the normal cold
npm cipath runs. We avoid a daily download-cache restore solely to keep rarely needed fallback data alive.A main-only producer verifies before saving. It runs on relevant changes and daily to handle Node patch releases or eviction, and skips verification on hits. PRs restore only. Temporary benchmark workflows have been removed.
Why
This avoids redundant installation without caching a passing test result. Dependency reuse alone was a modest gain on ARM64; removing Orca installation made the complete change worthwhile. Both producer and consumer use ubuntu-24.04-arm, enforced by a workflow test.
Testing
c55929ed491b, including all eight unit shards, typecheck, static analysis and both packaging jobs: https://github.com/stablyai/orca/actions/runs/36410345808.Linked Issue
N/A — maintainer-requested CI optimization.
Visual Proof
N/A — CI only; no UI or application behavior changes.
Review
Exact cache keys, main-only writers, successful verification before publication, cold fallback, preserved full checks, and producer/consumer runner alignment reviewed. No SSH, folder workspace, Windows or macOS runtime changes.
Agent skill upstream boundary
Checklist