Skip to content

feat(harbor): bind-mount task.yaml/plugins/templates/extra_mounts, skip Dockerfile when unneeded, translate pre_run - #175

Merged
akshaylive merged 1 commit into
mainfrom
akshaya/mount_plugins
Sep 15, 2026
Merged

akshaylive merged 1 commit into
mainfrom
akshaya/mount_plugins

Conversation

@akshaylive

@akshaylive akshaylive commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • 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, instead of COPYing content into the image and rewriting paths in task.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, since docker_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/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).

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 passing
  • Full suite: pytest — 6167 passed, 8 skipped
  • Exported and ran uipath-admin audit smoke task end-to-end through harbor run -a coder_eval.harbor.agent:CoderEvalAgent -e docker, reward 1.0
  • Exported and ran uipath-agents antipattern_openai_agents_hitl (which needs pre_run to seed its fixture) end-to-end, reward 1.0

🤖 Generated with Claude Code

@uipreliga uipreliga left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🚢

@UiPath UiPath deleted a comment from github-actions Bot Sep 15, 2026
@akshaylive
akshaylive force-pushed the akshaya/mount_plugins branch from 6a8d6fd to ae4d4a6 Compare September 15, 2026 16:11
…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
akshaylive force-pushed the akshaya/mount_plugins branch from ae4d4a6 to 83eea1e Compare September 15, 2026 16:59
@akshaylive
akshaylive merged commit 7bf8966 into main Sep 15, 2026
15 checks passed
@akshaylive
akshaylive deleted the akshaya/mount_plugins branch September 15, 2026 17:30
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