Repository navigation
feat(cache): keep soldr's syslib store in RUNNER_TOOL_CACHE on act/self-hosted runners (#553) - #554
Merged
Merged
Conversation
…lf-hosted runners (#553)
This was referenced Oct 2, 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.
Closes #553.
What this changes
soldr prepareandsoldr buildinstall syslib bundles (zstd, sqlite, zlib-ng, lzma, bzip2, cmake, ninja, and the GNU/Linux GCC toolchain) under$SOLDR_CACHE_DIR/bin/syslib/<lib>/<version>/<slug>/. setup-soldr putsSOLDR_CACHE_DIRunderRUNNER_TEMP, which starts empty in every new container. Under act (bosn ci, forge-ci/bosn#323), every warm run of clud'sbuild-linux-x64therefore re-downloaded the whole set, taking 35–77 s.This PR uses option (a) from the issue. After the parallel cache restore and before any soldr process starts, setup-soldr makes
$SOLDR_CACHE_DIR/bin/sysliba symlink to:It exports the store path as
SETUP_SOLDR_SYSLIB_STORE.SOLDR_CACHE_DIR, the zccache directory, and the rest ofbin/do not move. soldr has no override for its syslib directory (every call site usespaths.bin.join("syslib")), so the change belongs in setup-soldr and soldr needs no change.Where it is on
ACT=true, e.g.bosn ci)/opt/hostedtoolcache(forge-ci/bosn#352)RUNNER_ENVIRONMENT=self-hosted)$SOLDR_CACHE_DIR/bin, includingsyslib/. A symlink there would make setup-cache save a pointer instead of the content, which would make hosted runs slowercross-targetslanes--restore(tarunpack) refuses to write through a link that leaves its rootSETUP_SOLDR_SYSLIB_TOOL_CACHE=0|1overrides the default. Ifbin/syslibis already a real, non-empty directory (for example one setup-cache restored), setup-soldr leaves it alone. An empty directory, a stale link, or a dangling link is replaced. A failure to link only produces a warning, and soldr then downloads intoRUNNER_TEMPas it does today.Why sharing the store is safe
soldr is responsible for the store's integrity (
soldr-fetch/src/fetch/syslib_common.rs::ensure_syslib_bundle):soldr: trust: verified syslib … sha256=…).completestamp is written last, so an interrupted install is never mistaken for a finished oneflockin the syslib directory serializes concurrent installs, so parallel jobs sharing a self-hosted tool cache wait for each other and reuse the result instead of racing<lib>/<version>/<slug>), so a new version is installed beside the old one rather than over itThis is the same model as a developer's long-lived
~/.soldr.Tests (RED then GREEN)
__tests__/syslib-tool-cache.test.ts(7 tests):RUNNER_TOOL_CACHE, and the decision matrix above holds, including both overridesSOLDR_CACHE_DIRdoes not download. Run 1 links and installs through a mocked fetch. Run 2 uses an empty new soldr root with the tool cache persisted, relinks, and the stamp check that mirrors soldr's short-circuits, so the fetch count stays at 1. A second link in the same job reportsalready-linkedsyslib/is kept, and empty directories and stale or dangling links are replacedLocal gates:
npm run typecheckis clean.npm testreports 851 tests, 850 passed, 0 failed, 1 skipped (the watchdog self-test).npm run lint:vendor-prosepasses, andnpm run buildwas run, which changed onlydist/main.js.npm run pretest(two-phase-actions-cache.test.ts, "default Actions-cache wrapper round trips…",'failed' !== 'saved') also fails on unmodifiedorigin/mainon this NixOS host. That failure is environmental and comes from before this PR.Taking effect for consumers
clud uses
zackees/setup-soldr@v0. Nothing changes for clud until this is merged andv0is promoted through the manual Update v0 tag workflow (AGENTS.md gate). No consumer input change is needed: underbosn cithe action seesACT=trueand links automatically. The first run populates/opt/hostedtoolcache/soldr-syslib/linux-x64, and runs after that skip the downloads.