From ab18e8428db3f1fb148da8d1d71e7fb778175ec4 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 6 Sep 2026 16:30:21 +0200 Subject: [PATCH] Give the build runner a writable cache The Docker runner starts the container with --read-only; only /workspace and a noexec /tmp are writable. Without a cache_root there is nowhere for npm to cache, and the partial writes surface as "tarball data ... seems to be corrupted" across most packages, then exit 254. Isolating it proved the network was fine: the same image on the same network installs playwright-core cleanly outside the runner sandbox. I caused this by omitting cache_root when writing the binding, reasoning that fewer paths meant less to debug. It meant more. Build and test steps now declare NPM_CONFIG_CACHE and HOME; the binding supplies both pointing at /cache, where Idunn bind-mounts the cache root read-write when the build-cache affordance is present. Lowercase env names are rejected by the recipe validator, which is why these are uppercase. Co-Authored-By: Claude Opus 5 --- deployment/idunn/recipe.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deployment/idunn/recipe.toml b/deployment/idunn/recipe.toml index 6e9fbff..e9a0d8d 100644 --- a/deployment/idunn/recipe.toml +++ b/deployment/idunn/recipe.toml @@ -33,42 +33,49 @@ required_gitlinks = ["vendor/CultLib"] id = "install-cultlib" phase = "build" runner = "node-build" +required_environment = ["NPM_CONFIG_CACHE", "HOME"] argv = ["npm", "ci", "--ignore-scripts", "--prefix", "vendor/CultLib"] [[steps]] id = "build-cultcache-ts" phase = "build" runner = "node-build" +required_environment = ["NPM_CONFIG_CACHE", "HOME"] argv = ["npm", "run", "build", "--prefix", "vendor/CultLib", "--workspace=cultcache-ts"] [[steps]] id = "build-cultnet-ts" phase = "build" runner = "node-build" +required_environment = ["NPM_CONFIG_CACHE", "HOME"] argv = ["npm", "run", "build", "--prefix", "vendor/CultLib", "--workspace=cultnet-ts"] [[steps]] id = "build-cultmesh-ts" phase = "build" runner = "node-build" +required_environment = ["NPM_CONFIG_CACHE", "HOME"] argv = ["npm", "run", "build", "--prefix", "vendor/CultLib", "--workspace=cultmesh-ts"] [[steps]] id = "install-heimdall" phase = "build" runner = "node-build" +required_environment = ["NPM_CONFIG_CACHE", "HOME"] argv = ["pnpm", "install", "--frozen-lockfile"] [[steps]] id = "test-heimdall" phase = "test" runner = "node-build" +required_environment = ["NPM_CONFIG_CACHE", "HOME"] argv = ["pnpm", "test"] [[steps]] id = "build-heimdall" phase = "build" runner = "node-build" +required_environment = ["NPM_CONFIG_CACHE", "HOME"] argv = ["pnpm", "build"] # The unit runs dist/src/index.js, and Node resolves its imports at runtime, so