Repository navigation
Engineering - start more pull request jobs from the workspace images - #347275
Merged
Ladislau Szomoru (lszomoru) merged 2 commits intoNov 10, 2026
Merged
Ladislau Szomoru (lszomoru) merged 2 commits into
Ladislau Szomoru (lszomoru) merged 2 commits into
Conversation
Compile & Hygiene, Monaco Editor, Copilot - Check Test Cache, Copilot - Test (Linux and Windows) and chat-lib - Test (Linux) mount the workspace image of main before the checkout, like the Linux and Windows test jobs, instead of restoring the pnpm store cache and installing into an empty workspace. The root postinstall of an image installs extensions/copilot too, so the Copilot and chat-lib jobs install only what changed since. Without an image, or on any error, the jobs set up as before. The jobs share the image steps of Compile & Hygiene through YAML anchors, as a local action can't run before the checkout, and workspaceImage.test.ts checks that each of them downloads the scripts like the jobs that build the images. test-chat-lib gets a restore-pnpm-store input, and moves the node_modules folders above extensions/copilot out of the way instead of deleting them, which on an image would delete full installs. chat-lib - Test (Windows) keeps its standard windows-2025 runner, whose workspace has another path than that of the images. The other jobs of pr.yml don't install the dependencies of the workspace. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…has no workspace image The jobs of pr.yml that start from a workspace image no longer restore the pnpm store cache when there is no image, or the restore fails: their install steps install everything with pnpm install. chat-lib - Test (Linux) passes restore-pnpm-store: 'false' to test-chat-lib, while chat-lib - Test (Windows), which uses no image, and chat-lib-package.yml keep the store cache. The test jobs of pr-linux-test.yml and pr-win32-test.yml still restore the store cache without an image. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Alexandru Dima (alexdima)
previously approved these changes
Nov 10, 2026
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Successful image-backed CI validation is still needed for the migrated Linux jobs, since current runs exercise only the fallback and leave mount/checkout, incremental-install, and chat-lib extraction behavior unverified.
No open issues 🎉
What changed in this PR
Extends workspace-image reuse to six additional pull request jobs, reducing dependency setup work by starting from preinstalled workspaces.
Changes:
- Adds shared image restore steps, required permissions, and checkout preservation; these jobs use plain installs without a store cache when no image is available.
- Makes chat-lib’s store-cache restore optional and moves ancestor
node_modulesfolders aside instead of deleting them. - Expands the script-download guard test and documents image adoption and fallback behavior.
No actionable findings remain. Workflow execution with and without images still needs CI validation.
| File | Description |
|---|---|
build/lib/test/workspaceImage.test.ts |
Extends download-step consistency checks to the newly adopting jobs. |
.github/workflows/workspace_image/README.md |
Documents image consumers, runner constraints, and fallback behavior. |
.github/workflows/pr.yml |
Adds image reuse to six jobs and Windows junction-resolution support. |
.github/workflows/pr-workspace-images.yml |
Updates header comments to describe the broader consumer set. |
.github/workflows/caches/README.md |
Clarifies uncached installs when the newly adopting jobs lack an image. |
.github/actions/test-chat-lib/action.yml |
Adds optional cache restoration and moves ancestor dependencies out of module resolution. |
Review effort: Balanced
Ladislau Szomoru (lszomoru)
force-pushed
the
lszomoru/agents/pr-checks-workspace-image-adoption
branch
from
November 10, 2026 08:44
f522d36 to
7893fdd
Compare
Alexandru Dima (alexdima)
approved these changes
Nov 10, 2026
Ladislau Szomoru (lszomoru)
enabled auto-merge (squash)
November 10, 2026 09:20
auto-merge was automatically disabled
November 10, 2026 09:20
Pull request was closed
Ladislau Szomoru (lszomoru)
enabled auto-merge (squash)
November 10, 2026 09:21
Sandeep Somavarapu (sandy081)
approved these changes
Nov 10, 2026
Ladislau Szomoru (lszomoru)
deleted the
lszomoru/agents/pr-checks-workspace-image-adoption
branch
November 10, 2026 09:44
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up of #345429 ("Other jobs" follow-up): the Linux and Windows test jobs of pull requests start from the workspace images of
main, but the other jobs ofpr.ymlthat install the dependencies still restore the pnpm store cache and install into an empty workspace.What changes
These jobs of
pr.ymlnow mount the workspace image before the checkout, exactly like the test jobs ofpr-linux-test.ymlandpr-win32-test.yml:With an image, the checkout keeps its untracked files and reuses its
.git, and the existing install steps install only what changed since the commit of the image. Copilot and chat-lib are members of the root workspace since #347258, which an image holds installed, so the filtered Copilot and chat-lib installs are also incremental.Without an image (none of
main, a pull request to a release branch, other native build inputs than the image's, or any error or timeout of the restore), these jobs run their install steps with a plainpnpm install: they no longer restore the pnpm store cache. Unlike the test jobs, which still fall back to the store cache.runner.os, and uses the base branch like the test jobs.actions: readto find and download the image artifacts. Monaco Editor hadpermissions: {}; it now hascontents: readandactions: read.GODEBUG=winreadlinkvolume=1, aspr-win32-test.ymldoes, so that esbuild resolves pnpm's junctions on the image, which is mounted without a drive letter.restore-pnpm-storeinput (default'true') skips the store cache, which chat-lib - Test (Linux) sets to'false'. ItsisolateChatLib.tsstep (Engineering - install the built-in extensions, Copilot and the sanity tests in the root workspace #347258) removes only the links in thenode_modulesfolders aboveextensions/copilot, so it stays fast on an image.workspaceImage.test.tsnow checks that every job that uses the images downloads the scripts exactly like the jobs that build them.pr-workspace-images.ymllist the jobs that use the images, why the others don't, and how thepr.ymljobs install without one.Not adopted
windows-2025runner and the pnpm store cache. An image can only be used on the larger runners that build it, whose workspace has the same path as the image.chat-lib-package.ymlalso keeps the store cache.Reviewers should know
mainafter the last Linux image (Engineering - install every pnpm root with the isolated linker #347200), and the push build of the Linux image after that change hit its 60-minute timeout inInstall build tools. Until the next Linux image builds, the Linux jobs of this pull request run the plain install. Merging this pull request also builds new images, since it changespr-workspace-images.yml.How to test
This pull request's own checks run the changed jobs: each one reports in its job summary that it restored an image, or a
Workspace imagewarning when it installed everything instead.cd build && node --test lib/test/workspaceImage.test.ts lib/test/detectChanges.test.ts lib/test/detectMissingCaches.test.ts lib/test/agentHostTestSelection.test.ts: passed, 36 tests. Removing*image-scriptsfrom one of the jobs makes the workspace image test fail.cd build && pnpm run typecheck: passed../node_modules/.bin/eslint build/lib/test/workspaceImage.test.ts: passed.actionlint -shellcheck= .github/workflows/pr.yml(actionlint 1.7.12): passed, apart from the custom runner labels.🤖 Authored with GitHub Copilot on behalf of Ladislau Szomoru (@lszomoru).