Improve generic Harbor and MiniSWE evaluation resilience#759
Draft
neubig wants to merge 6 commits into
Draft
Conversation
Preserve nested agent kwargs and expose the existing LiteLLM proxy credential under the OpenAI-compatible aliases expected by mini-swe-agent. Co-authored-by: openhands <openhands@all-hands.dev>
This was referenced Jul 18, 2026
Co-authored-by: openhands <openhands@all-hands.dev>
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
Root cause
Long MiniSWE runs retained unbounded message history until requests exceeded model context limits. Separately, completed verifier results could be classified as incomplete after an agent error, and evaluation-only reruns continued to aggregate stale converted JSONL instead of the authoritative Harbor trial files.
Impact
The changes are benchmark- and provider-agnostic: context trimming is opt-in and configurable, scoring follows Harbor's primary verifier reward, and rescoring consistently uses raw results when available.
Validation
Live evidence was refreshed on 2026-07-19 UTC from the existing PR branch
codex/deepswe-pier-eval-20260716after re-fetching PR #759. Environment:uv 0.11.24, Python 3.12.13, OpenHands SDK submodule43376f1, Harbor CLI 0.20.0 installed in the local.venv, Docker daemon 29.6.1. Current remediation commit:652d92dcd1186cb719aaadb222a31c93d7cd2c1c(empty evidence-only commit; no source files needed changes).Commands and observed results:
Result: submodule initialized at
43376f1868ffd702746080714a59c16d3f69ec12,uv sync --devcompleted, and pre-commit hooks installed.Result: installed Harbor CLI 0.20.0 into
.venvfor the live run.PYTHONPATH=/tmp/pr759-live OPENHANDS_SUPPRESS_BANNER=1 PYTHONUNBUFFERED=1 \ /workspace/project/benchmarks/.venv/bin/harbor-infer \ /tmp/pr759-live/llm-dummy.json \ --harbor-target /tmp/pr759-live/fixture \ --harbor-target-type path \ --harbor-agent nop \ --harbor-executable /workspace/project/benchmarks/.venv/bin/harbor \ --benchmark-slug pr759-harbor-live \ --output-dir /tmp/pr759-live/output-plugin \ --num-workers 1 \ --n-limit 1 \ --note 20260719-live-nop-verifier-plugin \ --harbor-arg=--yes \ --harbor-arg="--verifier verifier_plugin:RewardOneVerifier"Result: actual repository
harbor-inferentrypoint invoked Harbor on a real local Harbor task fixture using Harbornopagent and a deterministic local verifier plugin returningVerifierResult(rewards={"reward": 1.0}), so no external LLM/API spend occurred. Harbor output reported1/1 Mean: 1.000,Trials 1,Exceptions 0,Reward 1.0 Count 1. The converter loggedProcessed trial fixture: reward=1.0andWrote 1 successful + 0 failed entriesto/tmp/pr759-live/output-plugin/pr759-harbor-live/dummy/noop-model_sdk_43376f1_maxiter_100_N_20260719-live-nop-verifier-plugin/output.jsonl. Cost report showed$0.000000.Result: actual repository
harbor-evalentrypoint refreshedoutput.jsonlfrom rawharbor_output, regenerated the report, and loggedResolved 1/1 completed instances./tmp/pr759-live/plugin-report.jsoncontainedtotal_instances=1,completed_instances=1,resolved_instances=1,incomplete_instances=0,error_instances=0, and aggregate cost/tokens all zero.Result:
68 passed, 2 warnings in 0.20s.Limitations: this was the smallest safe Harbor-compatible live fixture, not a full MiniSWE or Terminal-Bench run. It deliberately used Harbor
nopplus a local deterministic verifier to avoid external LLM spend. A preliminary shell-script verifier fixture that wrote/logs/verifier/reward.txtthrough Harbor 0.20.0 in this DinD environment ended withRewardFileNotFoundError; the successful evidence therefore uses a custom real Harbor verifier plugin. Docker required enabling the current sudo-capable user to access/var/run/docker.sockin this sandbox.This PR was prepared by an AI agent on behalf of the user. This validation update was added by an AI agent (OpenHands) on behalf of the user.
Closes #761