fix(bay): 修复 Docker bind Cargo 目录处理 - #28
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors volume management in the Docker driver to resolve and map cargo bind paths locally through Bay's mounted path instead of directly using host paths. It introduces a helper method _local_cargo_path to validate paths (ensuring they are within the configured host root, start with the correct prefix, and are not symbolic links) and updates create_volume, delete_volume, and volume_exists to use this local mapping. Unit tests have been added to verify these changes. I have no additional feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
修改内容
bay-cargo-名称前缀。问题原因
Bay 运行在容器内时,Docker daemon 使用宿主机目录,Bay 进程只能访问映射后的容器目录。旧实现使用宿主机目录执行本地文件操作,因此 bind Cargo 创建和清理会失败。
验证
21 passed525 passedSummary by Sourcery
Ensure Docker bind cargo volumes are created, checked, and deleted via Bay's container-mounted cargo root while still returning host-side paths to the Docker daemon.
Bug Fixes:
Tests: