Skip to content

fix(harbor_agent): restore pathspec in the Harbor agent environment - #5732

Merged
ananthsub merged 1 commit into
mainfrom
mmikulski/harbor-agent-restore-pathspec
Nov 6, 2026
Merged

ananthsub merged 1 commit into
mainfrom
mmikulski/harbor-agent-restore-pathspec

Conversation

@mjmikulski

Copy link
Copy Markdown
Contributor

What does this PR do?

Restores pathspec in the harbor_agent environment. Harbor imports it through dirhash → scantree, but since #4193 the shared policy excludes it (pathspec; sys_platform == 'never'), so from harbor.job import Job raises ModuleNotFoundError and every Harbor rollout fails and scores 0.

Fixes #4517

Supersedes #5040: that PR patches requirements.txt / overrides.txt, which #4837 replaced with managed pyproject.toml + uv.lock. This PR applies the same intent in the current layout.

It follows the existing per-component exception used by terminal_bench_4, miniswe_sandboxed_agent and harbor_agent_general:

  • pathspec==1.1.1 in dependencies and "pathspec" (instead of the never-marker) in override-dependencies;
  • the exception recorded in scripts/component-lock-policy.json;
  • uv.lock regenerated (only the pathspec entries change).

pathspec is MPL-2.0; this is the same license exception #4193 already granted to those components.

Validation

  • uv sync --frozen in responses_api_agents/harbor_agent, then python -c "from harbor.job import Job; import pathspec": OK (pathspec 1.1.1). Before this change the same import fails; we hit it on every rollout of a Harbor benchmark.
  • New responses_api_agents/harbor_agent/tests/test_dependencies.py (imports harbor.job.Job): passes.
  • python scripts/component_locks.py: 270 projects checked, 0 failed.
  • pre-commit run on the changed files: clean.

Rollouts

N/A: dependency-only change, no agent or environment behaviour changes. The failure it fixes happens at import time, before any rollout starts.

Compatibility and benchmark impact

None, other than Harbor-based benchmarks running again instead of scoring 0.

Checklist

  • I have read the contributing guidelines.
  • The change is focused.
  • Tests added and pass locally.
  • N/A: no documentation change needed.
  • Pre-commit checks pass locally.
  • New source files include the required Apache-2.0 SPDX header.
  • All commits have DCO sign-off.

Harbor imports pathspec through dirhash and scantree, but the shared policy
excludes it (#4193), so every Harbor rollout failed with ModuleNotFoundError.
Re-enable it for this component the same way terminal_bench_4,
miniswe_sandboxed_agent and harbor_agent_general do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: MJ Mikulski <mmikulski@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 6, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SHIP

LGTM — no concerns found. The dependency declaration, lockfile, and component-local exception are consistent. The regression test exercises the same import used by the runtime.

I reviewed all four changed files and the affected installation, policy-sync, and test-discovery paths. This was static review only; I couldn't execute dependency installation or tests.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@mjmikulski

Copy link
Copy Markdown
Contributor Author

/ok to test af92b0b

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

@mjmikulski mjmikulski added area:build Packaging, dependencies, containers, and releases bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer labels Nov 6, 2026
@ananthsub
ananthsub added this pull request to the merge queue Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42289914766

Merged via the queue into main with commit fc3293a Nov 6, 2026
74 checks passed
@ananthsub
ananthsub deleted the mmikulski/harbor-agent-restore-pathspec branch November 6, 2026 20:52

This branch was previously deployed

1 inactive deployment
public — af92b0bc Deployed Nov 6, 2026 by copy-pr-bot[bot] via release / finalize / notify #10619
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:build Packaging, dependencies, containers, and releases bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NVBug 6900605] Re-enable pathspec for harbor_agent venv so Harbor rollouts stop silently scoring 0

3 participants