Skip to content

ci: cache the compare tests' ngtsc baseline with vp run - #711

Closed
wan9chi wants to merge 3 commits into
voidzero-dev:mainfrom
wan9chi:feat/vp-run-ng-baseline-cache
Closed

wan9chi wants to merge 3 commits into
voidzero-dev:mainfrom
wan9chi:feat/vp-run-ng-baseline-cache

Conversation

@wan9chi

@wan9chi wan9chi commented Nov 11, 2026

Copy link
Copy Markdown
Member

Why

The E2E job's Compare tests step compiles every fixture with Angular's compiler (ngtsc) on every PR push, even when nothing that compile depends on changed. That takes about 7 minutes. This caches it with vp run and its remote task cache, so PRs reuse what main has built.

Changes

  • compare --fixtures is split into two tasks. It compiled every fixture with both ngtsc and Oxc in one run, so the ngtsc compile couldn't be cached on its own. Compare tests now runs vp run compare, which runs the two tasks the root vite.config.ts defines: ng-baseline compiles the fixtures with ngtsc and saves the outputs, then compare compiles them with Oxc and compares the result with those outputs.
  • Only ng-baseline is cached. It reads only the fixtures and the Angular side of the harness, so a change to Oxc still hits. compare reads the Oxc binding, which is built outside vp run, so it always runs. vp run tracks the files a task reads, so ng-baseline needs no input config.

Results

Across 131 E2E jobs replayed in a fork:

  • Median E2E job: 12.4 min → 5.2 min
  • Compare tests on a hit: 439 s → 10 s
  • ng-baseline hit rate: 92%, with 0 false hits

wan9chi and others added 3 commits November 11, 2026 11:37
The Compare tests step compiles every fixture with ngtsc before comparing the
output with Oxc's, which takes about 7 minutes of each E2E job. `vp run compare`
now runs it as two tasks: `ng-baseline` compiles the fixtures with ngtsc and
saves the outputs, cached locally and in the remote task cache, and `compare`
compiles them with Oxc and compares the outputs with the saved ones.

The baseline script loads only the Angular side of the harness, so the
binding, the Rust sources and the comparison code aren't among its inputs.
Pull requests read the remote cache anonymously; only pushes to main upload,
from a job variant that may request an OIDC token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pick the cache mode with an expression instead of a second napi-main job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the preview build from the registry bridge with the npm release, and drop the
.npmrc that pointed @voidzero-dev at the bridge. vite-plus joins the other
minimumReleaseAgeExclude entries for toolchain packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​vite-plus@​1.6.098100100100100

View full report

@wan9chi

wan9chi commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

Superseded by #712, which uses a branch in this repository instead of a fork.

@wan9chi wan9chi closed this Nov 11, 2026
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