Skip to content

main: keep mount parent dirs runner-owned in fallback path#61

Merged
piob-io merged 1 commit into
mainfrom
devin/1783521024-fallback-parent-ownership
Jul 8, 2026
Merged

main: keep mount parent dirs runner-owned in fallback path#61
piob-io merged 1 commit into
mainfrom
devin/1783521024-fallback-parent-ownership

Conversation

@piob-io

@piob-io piob-io commented Jul 8, 2026

Copy link
Copy Markdown

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, ensureFallbackDirectory ran only sudo mkdir -p <path>, so any missing intermediate dirs (e.g. /home/runner/.cache for a ~/.cache/uv mount) were created root:root, and only the leaf was chowned back to the runner. The successful mount path (mountStickyDisk) already avoided this by first running a non-sudo mkdir -p on the parent.

Change: extract that logic into createMountPoint(stickyDiskPath) (non-sudo parent mkdir -psudo mkdir -p leaf → chown leaf + workspace-local parent) and use it from both mountStickyDisk and ensureFallbackDirectory.

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/.cache as 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


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled. (Staging)


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

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>
@piob-io piob-io self-assigned this Jul 8, 2026
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@piob-io
piob-io merged commit 5b35017 into main Jul 8, 2026
12 checks passed
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.

2 participants