feat(harbor): bind-mount task.yaml/plugins/templates/extra_mounts, skip Dockerfile when unneeded, translate pre_run - #175
Merged
Conversation
akshaylive
requested review from
CarlesUIPath,
bai-uipath,
tmatup and
uipreliga
as code owners
September 15, 2026 00:08
akshaylive
force-pushed
the
akshaya/mount_plugins
branch
from
September 15, 2026 16:11
6a8d6fd to
ae4d4a6
Compare
…tead of COPY, skip Dockerfile when unneeded, translate pre_run Harbor task exports previously left agent.plugins[] (e.g. a skill plugin directory) and sandbox.docker.extra_mounts (e.g. UiPath CLI credentials) unavailable inside the container -- docker_runner.py auto-mounts these for a normal docker sandbox run, but the Harbor exporter had no equivalent, so an exported agent ran with no skill content and no credentials. - environment/docker-compose.yaml now bind-mounts environment/task.yaml itself, each `type: local` agent.plugins[] dir, each TemplateDirSource in sandbox.template_sources, and each sandbox.docker.extra_mounts entry (its own ro/rw mode preserved) -- all at their own host path, so nothing needs COPYing into the image or rewriting in task.yaml. Mount paths are always emitted POSIX-style (as_posix()) since docker-compose volume specs are POSIX regardless of the host OS running the exporter. - environment/Dockerfile is now written only when sandbox.docker.dockerfile_path is set (real RUN build steps needed); otherwise task.toml's [environment].docker_image points Harbor straight at the pre-built image via its own should_use_prebuilt_docker_image path, and no Dockerfile is written at all. - pre_run commands are now translated into the agent-phase task.yaml -- they run before the agent starts, which coder-eval execute still does for the CoderEvalAgent embed, so this was a fixable gap rather than a fundamental limitation (unlike post_run, which belongs to the grading phase execute never runs, and stays untranslated with a warning). Verified end-to-end against a real harbor install: exported and ran two tasks (uipath-admin audit smoke, uipath-agents antipattern_openai_agents_hitl) through `harbor run -a coder_eval.harbor.agent:CoderEvalAgent`, both scoring 1.0 after these fixes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
akshaylive
force-pushed
the
akshaya/mount_plugins
branch
from
September 15, 2026 16:59
ae4d4a6 to
83eea1e
Compare
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
environment/docker-compose.yamlnow bind-mountsenvironment/task.yamlitself, eachtype: localagent.plugins[]dir, eachTemplateDirSourceinsandbox.template_sources, and eachsandbox.docker.extra_mountsentry (its ownro/rwmode preserved) — all at their own host path, instead ofCOPYing content into the image and rewriting paths intask.yaml. Fixes a real bug: an exported agent previously ran with no skill/plugin content and no credentials (e.g.~/.uipath) available inside the container, sincedocker_runner.py's auto-mount for a normal docker sandbox run had no Harbor equivalent. Mount paths are always emitted POSIX-style (as_posix()), since docker-compose volume specs are POSIX regardless of the exporter's host OS.environment/Dockerfileis now written only whensandbox.docker.dockerfile_pathis set (realRUNbuild steps needed); otherwisetask.toml's[environment].docker_imagepoints Harbor straight at the pre-built image via its ownshould_use_prebuilt_docker_imagepath, and no Dockerfile is written at all.pre_runcommands are now translated into the agent-phasetask.yaml— they run before the agent starts, whichcoder-eval executestill does for theCoderEvalAgentembed, so this was a fixable gap rather than a fundamental limitation (unlikepost_run, which belongs to the grading phaseexecutenever runs, and stays untranslated with a warning).Test plan
pytest tests/test_harbor_packager.py tests/test_harbor_export_golden.py tests/test_harbor_experiment_packager.py tests/test_harbor_agent.py— 59/59 passingpytest— 6167 passed, 8 skippeduipath-adminaudit smoke task end-to-end throughharbor run -a coder_eval.harbor.agent:CoderEvalAgent -e docker, reward1.0uipath-agents antipattern_openai_agents_hitl(which needspre_runto seed its fixture) end-to-end, reward1.0🤖 Generated with Claude Code