fix: pass effective task path to deploy_skills so already-injected ch…#230
Open
EYH0602 wants to merge 3 commits intobenchflow-ai:mainfrom
Open
fix: pass effective task path to deploy_skills so already-injected ch…#230EYH0602 wants to merge 3 commits intobenchflow-ai:mainfrom
EYH0602 wants to merge 3 commits intobenchflow-ai:mainfrom
Conversation
…eck works When skills_dir is set, `_inject_skills_into_dockerfile` writes the `COPY _deps/skills /skills/` line into a temp copy of the task. The later `deploy_skills` call was given `cfg.task_path` (the original, unmodified task dir), so its `already_injected` check always read False and runtime `env.upload_dir(..., "/skills")` fired on top of the already-baked layer — failing with `cannot overwrite directory "/skills/<entry>" with non-directory "/skills"` when the source contained a colliding symlink. Stash the post-injection path on `self._effective_task_path` and pass it to both `deploy_skills` call sites. Add a regression test that guards the detection. Fixes #11
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
When deploy_skills detects the Dockerfile already bakes in `COPY _deps/skills /skills/`, the runtime upload is skipped but effective_skills was left as task.config.environment.skills_dir (often None), causing the subsequent linking step to silently skip distribution to agent-specific paths like /home/agent/.agents/skills. Sandbox users relied on that runtime linking since Dockerfile injection only links under /root/. Tighten the regression test to assert env.exec was called with the expected `ln -sfn` command.
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
deploy_skillswas receivingcfg.task_path(original) instead of the post-injection temp copy, so itsalready_injectedcheck always read False and the runtimeenv.upload_dir(..., "/skills")fired on top of skills already baked into the image. With a colliding symlink in the source, the cp failed withcannot overwrite directory "/skills/<entry>" with non-directory "/skills".self._effective_task_pathinTrial._setupand pass it to bothdeploy_skillscall sites (oracle + agent).tests/test_agent_setup.pythat writes a Dockerfile carrying the injectedCOPY _deps/skills /skills/line and assertsenv.upload_diris not called.Test plan
pytest tests/test_agent_setup.py tests/test_trial_install_agent_timeout.py tests/test_env_setup.py tests/test_verify.py— passes (81 tests).ruff checkclean.ty check src/clean.skills_dir: autoto confirm 16/16 trials succeed end-to-end.