Repository navigation
refactor(legal-agent-bench): migrate to the Harbor Environment Server - #5788
Closed
rystewart-nvidia wants to merge 23 commits into
Closed
rystewart-nvidia wants to merge 23 commits into
rystewart-nvidia wants to merge 23 commits into
Conversation
This was referenced Nov 7, 2026
rystewart-nvidia
force-pushed
the
lab-refresh/harbor
branch
from
November 7, 2026 03:39
14db541 to
adc1881
Compare
rystewart-nvidia
force-pushed
the
lab-refresh/harbor
branch
from
November 10, 2026 21:56
adc1881 to
6a6c156
Compare
Contributor
|
This moves LAB onto |
rystewart-nvidia
force-pushed
the
lab-refresh/harbor
branch
from
November 12, 2026 18:31
bf308c9 to
5cee333
Compare
Contributor
Author
|
@cmunley1 updated this PR to have LAB to use environment_servers/harbor directly, and removed the deprecated Harbor agent integration. Also updated the PR description and title accordingly |
7 tasks done
rystewart-nvidia
force-pushed
the
lab-refresh/harbor
branch
from
November 12, 2026 20:34
5cee333 to
b922c2b
Compare
cmunley1
previously approved these changes
Nov 13, 2026
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
…nvironment Server Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Contributor
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
7 tasks done
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
Signed-off-by: Ryan Stewart <[email protected]>
7 tasks done
Contributor
Author
|
superseded by changes merged in #5791, closing |
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.
What does this PR do?
Run LAB through Gym's Harbor Environment Server (instead of the deprecated Harbor agent adapters). The Environment Server owns task setup, sandbox lifetime, output collection, verification, and cleanup. The LAB Native harness borrows the agent sandbox through Gym's existing session API.
Changes are limited to LAB code and documentation, apart from registering the native agent and extending its shared configuration test.
instance_idrows during preparation, preserving task IDs and caller parameters. Write canonical task rows and a digest-checked task mapping.Update: This PR now depends on #5792. This PR will be rebased onto main after #5792 merges. This PR incorporates the native-agent work from #5968, which will be closed in favor of this PR.
Validation
All 547 LAB, native-agent, benchmark, shared configuration, manifest, and docs-link tests passed. Tests cover preparation and cache invalidation, literal tool arguments, borrowed-session cleanup, verifier isolation, deadlines, grading failures, and trusted metadata. All-files pre-commit, import checks, and Fern validation passed.
uv sync --locked --project resources_servers/legal_agent_bench source resources_servers/legal_agent_bench/.venv/bin/activate PYTHONPATH=. LITELLM_LOCAL_MODEL_COST_MAP=True uv run --active --no-sync python -m pytest \ resources_servers/legal_agent_bench/tests \ responses_api_agents/legal_agent_bench_native/tests \ benchmarks/legal_agent_bench/tests --import-mode=importlib -qLITELLM_LOCAL_MODEL_COST_MAP=Trueavoids downloading model prices during imports;--active --no-syncuses the activated environment.Shared configuration and manifest checks:
Rollouts
The trust-document example ran through the Environment Server and Docker with GPT-5.6-sol as policy and GPT-5.5 as judge. It produced the requested DOCX, passed 23/23 criteria, and received reward 1, with no judge errors. This used the retained source pin and single-judge scoring. A short OpenShell run also passed staging, execution, separate verification, output collection, and cleanup.
To reproduce:
With Docker running, add
policy_base_url,policy_api_key, andpolicy_model_nameto the gitignored rootenv.yaml, plus the judge settings below. Use the model IDs accepted by your endpoints. Setdefault_hostinenv.yamlto the host address that the sandboxes can reach.Using the activated environment from Validation, prepare and run 1 example task:
In another terminal with the same environment activated:
uv run --active --no-sync gym eval run --no-serve \ --config results/lab-smoke/config.yaml \ --input results/lab-smoke/prepared.jsonl \ --output results/lab-smoke/rollouts.jsonl --limit 1 --concurrency 1Inspect the rollout rows and the outputs and judge reports under
results/lab-smoke/artifacts. Stop the servers with Ctrl-C after collection. Scores and completion can vary; these commands use a twenty-minute agent budget.Compatibility and benchmark impact
The Harvey LAB task source is still pinned to commit
f46ef86e4788545622db25dcffa3aebb7a139929, with 1,749 tasks and the existing prompt, tools, and single-judge scoring. This will be updated in a subsequent commit (#5791). The LAB Native harness is now the default throughconfig.yamlandconfig_native.yaml. The policy output-token default is 65,536. Changing execution paths or token budgets can affect scores.Prepare legacy rows before running them. Keep the generated JSONL and its
.tasksets.jsonmapping together. As with shared Harbor preparation, finish preparation before starting servers; use separate output paths for concurrent runs with different task selections. Replace old Harborjoband LAB Resources overrides with Environment Server settings; the agent name islegal_agent_bench_benchmark_agent.Sandbox selection uses Gym's
sandboxconfig and the shared Environment Server's provider restrictions. Automatic image building requires Docker. With another sandbox backend, supplying a prepared, provider-compatible tools image avoids needing Docker locally. Preparation storage must support hardlinks and cross-processflock;noflockandlocalflockshared mounts are unsupported.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).