Skip to content

ci(ts): move all workflows to ubuntu-latest (LAB-3503) - #122

Draft
27Bslash6 wants to merge 2 commits into
mainfrom
lab-3503-ubuntu-latest-migration
Draft

ci(ts): move all workflows to ubuntu-latest (LAB-3503)#122
27Bslash6 wants to merge 2 commits into
mainfrom
lab-3503-ubuntu-latest-migration

Conversation

@27Bslash6

@27Bslash6 27Bslash6 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR migrates all CI/CD workflows from self-hosted runners (cachekit-lean, cachekit) to GitHub-hosted ubuntu-latest runners across the TypeScript repository.

Key Changes

Runner Migration

  • Replaced all self-hosted runner references (cachekit-lean, cachekit) with ubuntu-latest in ci.yml, build-native.yml, and build-wasm.yml.
  • Removed the fork-vs-internal conditional runner selection logic (github.event.pull_request.head.repo.fork && 'ubuntu-latest' || 'cachekit-lean'), since all jobs now uniformly use ubuntu-latest.
  • Removed the "Configure Rust paths (self-hosted)" steps that set custom RUSTUP_HOME/CARGO_HOME paths, which were only needed for the locked-down self-hosted pods.

New Composite Action

  • Added a reusable composite action at .github/actions/setup-pnpm-node/action.yml that installs pnpm and Node.js (with pnpm store caching) in the correct order. This consolidates the repeated pnpm + Node.js setup steps that previously appeared in every job.
  • Updated all workflows to consume this shared action, reducing duplication.

Rust Build Caching

  • Added Swatinem/rust-cache steps to the native build and workers jobs to cache Rust build artifacts. This compensates for the loss of persistent state that the self-hosted runners previously provided.

Drift Guard

  • Added a new self-hosted-drift-guard job that scans .github/workflows/ for any lingering self-hosted runner references (cachekit/self-hosted) and fails the build if found. This prevents accidental reintroduction of self-hosted runners on main/push. The job is wired into the ci-success gate.

Build Matrix Updates

  • In build-native.yml, the x86_64-unknown-linux-gnu target now builds on ubuntu-latest instead of cachekit-lean, and the test matrix was simplified to remove the OS dimension.

Why

This migration removes the dependency on self-hosted infrastructure, simplifying the CI configuration (no more fork/internal branching logic or manual Rust path setup) while adding explicit build caching and a drift guard to maintain performance and prevent regressions.

cachekit-ts is public and forkable but every job ran on the org-shared,
privileged self-hosted ARC pool (runs-on: cachekit / cachekit-lean) gated
only by an in-workflow fork-guard ternary, a control a fork PR can simply
delete since it runs the fork's own copy of the workflow. Ray ratified
moving all public lanes off the pool onto GitHub-hosted ubuntu-latest
(LAB-1161 stage 1, option a+c); the real server-side control (scoping the
runner group away from public repos) is staged behind this as stage 2.

- Collapse every fork-guard runs-on ternary in ci.yml/build-wasm.yml to a
  literal ubuntu-latest; fix build-native.yml matrix generator and test
  job matrix to stop emitting cachekit-lean; delete now-dead self-hosted-
  only steps and stale comments.
- Add a self-hosted-drift-guard job (ci.yml) that fails CI if any
  runs-on/matrix runner value in .github/workflows/ still names
  cachekit/cachekit-lean/self-hosted, maintainer drift protection, not a
  fork-PR control (documented as such; that's stage 2's job).
- Add hosted caching (cache: pnpm, Swatinem/rust-cache) since the pool's
  warm hostPath cache disappears on ephemeral GitHub-hosted runners.
- Extract .github/actions/setup-pnpm-node as a composite action for the
  10 identical Install-pnpm/Setup-Node call sites this change touched.

Reviewed by expert panel (bug-hunter-supreme, security-specialist,
code-craftsman, catchphrase-agent): fixed the drift guard's case-
sensitivity gap, documented its remaining heuristic limits, dropped a low-
value rust-cache step from the rarely-run build-wasm.yml, and collapsed a
vestigial single-value matrix axis in build-native.yml test job.
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 8103fed3-94da-4d6c-9e8c-b1baa79aef45

📥 Commits

Reviewing files that changed from the base of the PR and between 906942d and 5f92e58.

📒 Files selected for processing (4)
  • .github/actions/setup-pnpm-node/action.yml
  • .github/workflows/build-native.yml
  • .github/workflows/build-wasm.yml
  • .github/workflows/ci.yml

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.


Walkthrough

The PR adds a shared pnpm and Node.js action, moves workflows to Ubuntu-hosted runners, adds Rust caching, and introduces a guard that detects self-hosted runner references before CI reports success.

Changes

CI standardisation

Layer / File(s) Summary
Shared pnpm and Node.js setup
.github/actions/setup-pnpm-node/action.yml
Adds a composite action that installs pinned pnpm, configures Node.js, and enables pnpm caching. The Node.js version is configurable and defaults to 22.
Native and WebAssembly workflow migration
.github/workflows/build-native.yml, .github/workflows/build-wasm.yml
Moves Linux execution to ubuntu-latest and replaces separate setup steps with the shared action. Native builds add Rust build-artifact caching.
CI job migration and caching
.github/workflows/ci.yml
Runs CI jobs on ubuntu-latest and uses the shared setup action. The workers job adds Rust build-artifact caching.
Self-hosted runner drift guard
.github/workflows/ci.yml
Adds a job that scans workflow files for cachekit or self-hosted runner references. The CI success job requires this guard to succeed.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 5f92e

The hosted-runner migration and drift guard have no identified merge-blocking risk.

🚥 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 and concisely describes the main change: moving all CI workflows to ubuntu-latest.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lab-3503-ubuntu-latest-migration

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

@kodus-27b

kodus-27b Bot commented Sep 13, 2026

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 13, 2026
kodus-27b[bot]
kodus-27b Bot previously approved these changes Sep 13, 2026
@27Bslash6
27Bslash6 marked this pull request as draft September 14, 2026 04:19
…3503)

Comment-only, plus one step name. The drift-guard rationale named org runner
settings that do not belong in a public repository; the public reason is
simply that a public, forkable repo runs only on GitHub-hosted runners. No
behaviour change.
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