main: keep mount parent dirs runner-owned in fallback path#61
Merged
Conversation
When a sticky disk fails to expose (e.g. the 45s timeout), the fallback directory was created with 'sudo mkdir -p' alone, leaving intermediate parent directories like /home/runner/.cache owned by root. Subsequent tools then fail with EACCES (e.g. corepack mkdir /home/runner/.cache/node/corepack/v1). Create parents as the runner user first, same as the successful mount path. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
ajwerner
approved these changes
Jul 8, 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.
Summary
Fixes root-owned parent directories left behind when a sticky disk fails to expose, which surfaces later as EACCES errors from tools like corepack (
Error: EACCES: permission denied, mkdir '/home/runner/.cache/node/corepack/v1').Root cause: on expose timeout/failure,
ensureFallbackDirectoryran onlysudo mkdir -p <path>, so any missing intermediate dirs (e.g./home/runner/.cachefor a~/.cache/uvmount) were createdroot:root, and only the leaf was chowned back to the runner. The successful mount path (mountStickyDisk) already avoided this by first running a non-sudomkdir -pon the parent.Change: extract that logic into
createMountPoint(stickyDiskPath)(non-sudo parentmkdir -p→sudo mkdir -pleaf → chown leaf + workspace-local parent) and use it from bothmountStickyDiskandensureFallbackDirectory.Observed in production on
blacksmith-01kwz990dntbn1dvjhk60tyzmb-4vcpu(langchain-ai): three sticky disks (go-cache,pnpm-store,uv-cache) hit the 45s expose timeout, the fallback created/home/runner/.cacheas root, and the next step's corepack invocation failed with EACCES.Link to Devin session: https://app.devin.ai/sessions/c8e9c0baeeae4bb2b08f6327a3bf477f
Requested by: @piob-io
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled. (Staging)Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.