Skip to content

fix(BA-4096): avoid nested bind mount of DO_NOT_STORE_PERSISTENT_FILES_HERE.md#10944

Open
seedspirit wants to merge 5 commits intomainfrom
BA-4096
Open

fix(BA-4096): avoid nested bind mount of DO_NOT_STORE_PERSISTENT_FILES_HERE.md#10944
seedspirit wants to merge 5 commits intomainfrom
BA-4096

Conversation

@seedspirit
Copy link
Copy Markdown
Contributor

Summary

  • Stop bind-mounting DO_NOT_STORE_PERSISTENT_FILES_HERE.md at /home/work/DO_NOT_STORE_PERSISTENT_FILES_HERE.md; this was a nested bind mount (on top of the /home/work bind mount) that runc rejects on macOS Docker Desktop with VirtioFS because virtiofs resolves the nested path to /run/host_virtiofs/..., outside the container rootfs.
  • Copy the file into the scratch work/ directory during scratch provisioning instead, matching how dotfiles (.bashrc, .vimrc, etc.) and the Kubernetes agent path already handle it.
  • Updated both the legacy active path (agent.py:mount_krunner) and the not-yet-wired KernelRunnerMountProvisioner so the fix isn't lost when the new path is activated.

Test plan

  • On macOS with Docker Desktop VirtioFS, create a session and confirm it starts without the "outside of rootfs" error
  • Inside the new container, cat /home/work/DO_NOT_STORE_PERSISTENT_FILES_HERE.md shows the original content
  • On Linux (native Docker), session creation still works and the file is present at /home/work/DO_NOT_STORE_PERSISTENT_FILES_HERE.md

Resolves BA-4096

seedspirit and others added 4 commits April 10, 2026 11:27
…ES_HERE.md

Dropping the bind mount in mount_krunner() is the first step of fixing
session creation on macOS with Docker Desktop VirtioFS, where runc
rejects the nested mountpoint as "outside of rootfs". The file will
instead be copied during scratch provisioning in a follow-up commit.
…om KernelRunnerMountProvisioner

Remove the nested bind mount entry for DO_NOT_STORE_PERSISTENT_FILES_HERE.md
from the new KernelRunnerMountProvisioner path so the fix is preserved when
this code path is wired up. The file will be copied into the scratch work
directory during provisioning instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… work_dir

Instead of bind-mounting the warning doc into /home/work (which fails on
macOS Docker Desktop VirtioFS due to nested bind mount resolution), copy
it into the scratch work directory during provisioning, matching how
.bashrc, .vimrc, and other dotfiles are handled.
Copilot AI review requested due to automatic review settings April 10, 2026 02:32
@github-actions github-actions bot added size:S 10~30 LoC comp:agent Related to Agent component labels Apr 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Stops a nested bind mount of DO_NOT_STORE_PERSISTENT_FILES_HERE.md (problematic on macOS Docker Desktop VirtioFS) by provisioning the file into the scratch work/ directory instead of bind-mounting it.

Changes:

  • Copy DO_NOT_STORE_PERSISTENT_FILES_HERE.md into the scratch work/ directory during scratch provisioning and ensure ownership is applied.
  • Remove the nested bind mount for the markdown file from both the kernel runner mounts and the legacy agent.py mount path.
  • Add a changelog entry documenting the fix.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/ai/backend/agent/stage/kernel_lifecycle/docker/scratch.py Copies the warning markdown into scratch work/ and includes it in chown paths.
src/ai/backend/agent/stage/kernel_lifecycle/docker/mount/krunner.py Removes the bind mount that previously mounted the markdown into /home/work.
src/ai/backend/agent/agent.py Removes the legacy bind mount of the markdown file into /home/work.
changes/10944.fix.md Documents the macOS VirtioFS nested bind mount fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HyeockJinKim HyeockJinKim added this to the 26.4 milestone Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:agent Related to Agent component size:S 10~30 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants