Repository navigation
Conversation
Harbor adapter for VitaBench (meituan-longcat/vitabench, ICLR 2026): 400 English tasks (delivery, instore, ota, cross_domain). Each task runs the pinned upstream environment and user simulator in a vita-runtime MCP sidecar; the verifier replays the recorded conversation through the official rubric-based evaluator. Includes the vita-llm-agent parity agent (drives the upstream LLMAgent in-container with upstream seed derivation) and an oracle-trajectory pipeline (scripts/build_oracle.py). Oracle trajectories and parity results pending API access. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…worm base - Per-task random oracle token, known only to the sidecar image and solution/; POST /state now rejects any request without it, so an agent cannot inject a fabricated conversation. - Verifier no longer falls back to /logs/agent (agent-writable); an unreachable sidecar now errors the trial instead of scoring a local file. - configure_run can only tighten step/error limits; record_termination accepts failure reasons only. - Pin python:3.12-slim-bookworm; raise build_timeout_sec to 2400 (two cold image builds exceed 900s). - Add scripts/check_runtime_hardening.sh (LLM-free integrity check).
…tart_period - VITA_EVALUATOR_MODEL no longer silently defaults to claude-sonnet-4-5; the verifier refuses to grade without it, so both parity sides use the same judge. - Sidecar healthcheck start_period 5s -> 120s: loading the vita environment can take over a minute on a cold or loaded host.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0c3f34cb7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| && git clone "${VITABENCH_REPO}" "${VITABENCH_ROOT}" \ | ||
| && git -C "${VITABENCH_ROOT}" checkout "${VITABENCH_COMMIT}" \ | ||
| && rm -rf "${VITABENCH_ROOT}/.git" \ | ||
| && pip install --no-cache-dir -e "${VITABENCH_ROOT}" \ |
There was a problem hiding this comment.
Remove private task definitions from the agent image
When a terminal-capable Harbor agent runs this image, the full checkout remains readable at /opt/vitabench, including data/vita/domains/*/tasks_en.json and tasks.json. These are the files _load_tasks() reads, containing the private user scenarios and evaluation_criteria deliberately withheld from the runtime config. Deleting .git does not remove that data, so an agent can read the hidden requests and grading rubrics directly instead of discovering requirements through the user simulator, invalidating benchmark fidelity. Remove or sanitize these task-definition files from the agent image; the verifier already receives the full task through /tests/config.json.
AGENTS.md reference: AGENTS.md:L109-L110
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 07e5733. The agent image now deletes data/vita/domains/*/tasks*.json right after install, and the build fails if any file containing evaluation_criteria remains under /opt/vitabench/data. The verifier gets its task from /tests/config.json. I verified this on real Docker (fork CI): the files are gone and vita.evaluator still imports.
| # Pinned upstream commit; keep in sync with task-template/environment/*/Dockerfile. | ||
| _VITABENCH_COMMIT = "742e240855bf8686a0842360749d5ea970ea3987" | ||
| _TEMPLATE_DIR = Path(__file__).parent / "task-template" | ||
| _ORACLE_DIR = Path(__file__).parent / "oracle" |
There was a problem hiding this comment.
Read oracle assets from the directory used by the builder
After scripts/build_oracle.py harvests a passing trial, it writes the trajectory under src/vita-bench/oracle/<set>/<id>.json, whereas this constant resolves to src/vita-bench/src/vita_bench/oracle. A fixture run of the builder followed by task generation reproduced the mismatch: the harvested JSON existed, but the generated solution contained only solve.sh and oracle_token. Consequently, harvested trajectories are silently skipped and oracle execution exits with a missing-trajectory error even after the assets have been built. Use the same oracle directory for both steps.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 07e5733. _ORACLE_DIR now resolves to src/vita-bench/oracle/, the same directory scripts/build_oracle.py writes to.
| if self._llm_args_json: | ||
| parts.extend(["--llm-args-json", shlex.quote(self._llm_args_json)]) | ||
| command = " ".join(parts) | ||
| return f"{command} 2>&1 | tee /logs/agent/vita-llm-agent.txt" |
There was a problem hiding this comment.
Propagate the parity runner's nonzero exit status
If an MCP transport error or another runner exception occurs before conversation termination, run_vita_llm_agent.py writes summary['error'] and exits 1, but under normal Bash pipeline semantics this command returns tee's successful status. Executing the generated command locally reproduced runner exit 1 becoming wrapper exit 0; Bash's help set documents pipefail as returning “the last command to exit with a non-zero status.” run() never checks the summary error, and a still-reachable sidecar with no termination reason is subsequently graded 0.0 by _evaluate(), turning infrastructure failures into ordinary parity losses. Preserve the runner status and surface reported errors before verification.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Thanks for checking. Inside Harbor this one doesn't apply: BaseInstalledAgent._exec already runs the command as set -o pipefail; … and raises NonZeroAgentExitCodeError on a nonzero status (checked in harbor 0.25.0), so a runner failure errors the trial instead of being graded. To keep the command correct when it is run outside Harbor too, 07e5733 also adds set -o pipefail to the command itself.
…; wait for sidecar - Agent image: delete data/vita/domains/*/tasks*.json after install (they hold the hidden user goals and grading rubrics); the build fails if any rubric file remains. The verifier already receives its task via /tests/config.json. (PR review P1) - Adapter reads oracle trajectories from src/vita-bench/oracle/, the directory scripts/build_oracle.py writes to; harvested trajectories were silently skipped. (P2) - solve.sh waits up to 300s for the sidecar before replaying. - Parity runner command sets pipefail itself (Harbor already prefixes it).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 07e5733bd5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self._finish_step() | ||
| self._require_active() |
There was a problem hiding this comment.
Handle step-limit termination without raising a tool error
When a tool-call turn begins at step 299 under the default 300-step budget, _finish_step() sets termination_reason to max_steps, so the immediately following _require_active() raises instead of returning terminal status. McpRuntime.call() propagates this as an exception, and the runner's main() replaces the accumulated transcript and token accounting with an error summary and exits nonzero. Ordinary budget exhaustion therefore becomes a runner failure, unlike the assistant-text path, which returns terminal status normally. Return a terminal result the runner can consume, or defer the check until the pending environment step completes; the equivalent path in call_assistant_tool() needs the same treatment.
AGENTS.md reference: AGENTS.md:L109-L110
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 4c88ce8. Both tool-call paths (submit_assistant_tool_calls and call_assistant_tool) now return termination_reason=max_steps when the budget ends on that turn, matching the text path. The parity runner also skips building an empty tool message. Checked in the sidecar image with max_steps=1: both paths end cleanly with no exception.
…s out When a tool-call turn consumed the last step, the sidecar raised instead of returning terminal status, so normal budget exhaustion surfaced as a runner error. Both tool-call paths now return termination_reason=max_steps like the text path, and the parity runner skips building an empty tool message. (PR review P2)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c88ce86c7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| first_user_text = await runtime.call("start_conversation") | ||
| message: Any = UserMessage(role="user", content=first_user_text) | ||
| transcript.append({"role": "user", "content": first_user_text}) |
There was a problem hiding this comment.
Check termination immediately after starting the conversation
When start_conversation consumes the configured budget (for example, with max_steps=1) or the simulated user's first reply is a stop, the sidecar is already terminal, but the runner still generates and submits an assistant turn. That submission fails in _require_active(), causing main() to discard the transcript and exit with an error instead of finishing with the recorded max_steps or user_stop result. This is reproducible with an in-memory fixture using the actual runtime and runner methods. Read get_runtime_status after initialization and skip the agent loop when termination is already set.
AGENTS.md reference: AGENTS.md:L109-L110
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 3d75396: after start_conversation the runner now reads get_runtime_status. If a termination reason is already set (an immediate user stop, or the budget spent during start), it records that reason and skips the agent loop instead of submitting into a closed run.
If the simulated user's first reply ends the conversation, or the step budget is spent during start_conversation, the runner now records that termination instead of submitting an agent turn into a closed run. (PR review P2)
- parity/run_original.sh runs upstream `vita run` (pinned commit) in the vita-runtime image, with models.yaml produced by the same generator as the Harbor side. It redacts the Authorization header that upstream writes into its results before copying them out. Upstream's --*-llm-args flags (type=dict) can't take JSON, so per-model args go through models.yaml on both sides. - parity/aggregate.py turns the upstream batch files and the Harbor job dirs into per-run success rates, mean ± sample SEM and the spec's run-range overlap check, and prints the parity_experiment.json metrics object. Infra-errored trials are excluded, not scored 0. Smoke-tested end to end with claude-haiku-5-5 on 2 delivery tasks on both sides.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a01ae2ec2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| common = set().union(*orig.values()) ^ set().union(*harb.values()) if orig and harb else set() | ||
| if common: | ||
| print(f"WARNING: task sets differ between sides ({len(common)} ids only on one side)") |
There was a problem hiding this comment.
Validate task cohorts per run before reporting parity
If an infrastructure failure removes a task from one Harbor run but that task appears in another run, this union comparison still reports identical task sets. An offline two-task fixture produced original_runs=[50,50] and harbor_runs=[100,50] after one Harbor trial lacked a reward, with no task-set warning and a positive overlap verdict. These scores use different task populations, so they are not comparable repetitions of the same benchmark. Validate task IDs in every run before emitting parity metrics; require missing trials to be rerun or explicitly select a common cohort across both sides and all runs.
AGENTS.md reference: AGENTS.md:L109-L110
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Good catch, fixed in 4e5eeee. aggregate.py now checks the task cohort of every run on both sides. If any run is missing a task, it lists the missing tasks per run and scores only the cohort common to all runs; --strict aborts instead. parity/test_aggregate.py reproduces your fixture: an errored Harbor trial in run 1 no longer yields [100, 50] against [50, 50].
| task_dir = Path(cfg["task"]["path"]).name # e.g. vita-cross-10804001 | ||
| tid = re.sub(r"^vita-[a-z]+-", "", task_dir) | ||
| if keep and tid not in keep: |
There was a problem hiding this comment.
Preserve canonical task IDs when reading Harbor trials
For uppercase source IDs such as the documented A0812003, _slugify() generates vita-cross-a0812003, so reconstructing the ID from its directory yields a0812003, while original_runs() retains A0812003. Although aggregate.py --help describes --tasks as “restrict to these upstream task ids”, an offline generation-and-aggregation fixture confirmed that --tasks A0812003 retains the original result but discards the corresponding Harbor trial despite its valid reward. Read the canonical task_id from the saved runtime state, or normalize identifiers symmetrically before filtering and comparison.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 4e5eeee. Task ids are now compared case-insensitively on both sides, and --tasks is normalized the same way. --tasks A0812003 keeps both the original result and the matching vita-cross-a0812003 Harbor trial; this is covered in parity/test_aggregate.py.
…ats; set adapter_pr
…scored as 0 - VitaLLMAgent writes agent/trajectory.json (ATIF; validated against harbor's Trajectory model) from the runner transcript: system prompt, user turns, agent turns with tool calls paired to their results, and final token metrics, so the Harbor viewer can show every conversation. - cost_usd is recorded as unknown (None) instead of $0 when upstream has no price for the model but tokens were spent. - The sidecar records an infra_error when the user simulator's LLM call fails; the verifier then errors the trial instead of grading the unfinished conversation as 0. parity/aggregate.py also excludes trials with an exception_info (Harbor's own job mean counts them as 0).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c6fd42f22d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| output = { | ||
| "summary": {"error": f"{type(exc).__name__}: {exc}", "model": args.model}, | ||
| "transcript": [], | ||
| } |
There was a problem hiding this comment.
Retain partial transcripts and usage on runner errors
If an exception occurs after successful agent turns, this handler discards the accumulated conversation and token/cost accounting. An offline second-turn failure reproduced 100 input tokens, 50 output tokens, and three transcript entries being replaced by a summary without usage and an empty transcript. This also gives _write_atif_trajectory() no conversation to export, removing the diagnostics needed to investigate failed or retried trials. Preserve the partial summary and transcript alongside the error while retaining the nonzero exit status.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 4e5eeee. On a mid-run exception the runner now keeps the partial transcript and token usage alongside the error, so trajectory.json and the diagnostics survive, and it still exits non-zero. I checked it with an injected second-turn failure: 100/50 tokens and 3 transcript entries are preserved, with error set and exit code 1.
…partial runs - aggregate.py: every run on both sides must score the same task cohort. Mismatches are listed per run and scoring is restricted to the common cohort (--strict to fail). Task ids are compared case-insensitively, since Harbor dir names are lowercased while upstream ids like A0812003 are not. Self-check: parity/test_aggregate.py. - run_vita_llm_agent.py: on a mid-run exception, keep the partial transcript and token usage (so trajectory.json and diagnostics survive) while still exiting non-zero. (PR review P2 x3)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e5eeee2e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| candidate, new_state = agent.generate_next_message(message, _clone(state)) | ||
| if candidate is not None and ( | ||
| candidate.has_text_content() or candidate.is_tool_call() | ||
| ): | ||
| agent_msg, state = candidate, new_state |
There was a problem hiding this comment.
Count usage before rejecting an agent response
When a candidate contains usage/cost information but neither text nor tool calls, the retry loop discards it without accounting for that completion; _accumulate_usage() is reached only after a candidate is accepted. An offline runner fixture with rejected and accepted responses consuming 100 and 200 prompt tokens reported only 200, and an all-invalid run reports zero tokens and cost. Accumulate usage from each returned candidate before the validity filter so retries are included even when the run ends with invalid_agent_message.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 10fa786. Usage is now accumulated for every candidate the agent returns, before the validity filter. Rejected retries are counted, including runs that end with invalid_agent_message, and accepted responses are still counted exactly once.
Usage is now accumulated for every completion the agent returns, before the invalid-message filter, so retries are counted, including runs that end with invalid_agent_message. (PR review P2)
|
On October 19, Harbor updated its new-task template to use a separate verifier by default. I noticed the tasks generated by this adapter still run the grader in the agent’s workspace. Could you switch them to a separate verifier and rerun the oracle on the latest stable Harbor release? Harbor #3712 If you find the full oracle run to be too costly time-wise or compute-wise, maybe you can start with rerunning one representative task? For that task, try the reference solution first, then with a submission you know is wrong. Once you are done, could you please share the task ID and both scores so we can check that the new verifier can grade submissions as expected? If you’ve already run parity or in the middle of running parity, could you keep the original submissions, agent logs, and grading results, preferably in your Hugging Face fork? If only the grading environment changes and those files contain everything the verifier needs, we may be able to regrade the saved submissions without running the agents again. |
Per Harbor's new-task default (#3712): the vita-runtime sidecar writes the conversation to its own /var/lib/vita/state.json, the task declares it as a sidecar artifact, and Harbor restores it in a separate verifier built from tests/Dockerfile (pinned vita package + rubrics). The agent container is stopped before sidecar artifacts are collected, so it cannot touch what is graded. Bump harbor to >=0.26.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@Yiminnn please modify your parity plan as we discussed. |
Parity checks adapter correctness, not model performance (organizer guidance), so it runs on 20 of 400 tasks: 5 per domain, drawn once with a seeded sampler. The list lives in main.py (PARITY_TASK_IDS); the README documents the selection and the matching original-side task ids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51c3a3ab22
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Harbor side (generate the subset with: uv run vita-bench --split parity --output-dir datasets/vita-bench-parity) | ||
| PYTHONPATH="$PWD/src/vita-bench" uv run --project src/vita-bench harbor run -c src/vita-bench/run_vita-bench.yaml |
There was a problem hiding this comment.
Point the parity run at the generated subset
When following the 20-task parity instructions, the subset is generated under datasets/vita-bench-parity, but this command loads a YAML whose datasets section still selects datasets/vita-bench (src/vita-bench/run_vita-bench.yaml:44-45). The harness guide documents harbor run -c ... as the “Config file” invocation (docs/adapters.mdx:283). If the full 400-task dataset already exists, this launches 1,200 Harbor trials instead of 60, potentially spending 20× the intended API budget; if only the subset exists, the configured dataset is absent. Use a subset-specific configuration or explicitly select the generated subset in this command.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 800d07d. Added src/vita-bench/run_vita-bench_parity.yaml, which points at datasets/vita-bench-parity (jobs go to jobs/vita-bench-parity). The README now generates the subset from the repo root with uv run --project src/vita-bench vita-bench --split parity --output-dir datasets/vita-bench-parity and runs that config. run_vita-bench.yaml stays the full-set config.
|
Thanks @XiangningLin! Updated the parity plan in the PR description: parity now runs on a 5% subset (20/400 for vita-bench, 16/328 for seccodebench). Each subset is drawn once with a fixed seed and generated with |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 800d07debe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| ```bash | ||
| PYTHONPATH="$PWD/src/vita-bench" uv run --project src/vita-bench harbor run -c src/vita-bench/run_vita-bench.yaml | ||
| python src/vita-bench/scripts/build_oracle.py jobs/<job-id> --min-passes 2 |
There was a problem hiding this comment.
Bootstrap oracle files before requiring two confirmations
For a first-time oracle build, the preceding job produces independent live-agent trajectories, not repeated evaluations of one trajectory. build_oracle.py counts confirmations using the complete messages JSON, including the fresh timestamps added by the sidecar, so even three passing live trials each have only one confirmation. An offline fixture with three passing trajectories reproduced this command writing zero oracle files; the subsequent oracle run then fails because oracle_trajectory.json is absent. First harvest candidates with --min-passes 1, regenerate and replay them, then require two confirmations using both the original and replay job outputs.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Real, fixed in 00c93dc. The README now builds oracles in two rounds: stage one passing candidate per task with --min-passes 1 --out jobs/oracle-candidates --clean, generate tasks from them (vita-bench --oracle-dir jobs/oracle-candidates), replay with -a oracle, then promote with --min-passes 2 --clean over the live and replay jobs. --clean also fixes a related problem: candidates that failed the replay used to stay in oracle/ even with --overwrite. scripts/test_build_oracle.py covers the flow offline, including three distinct passing live runs giving 0 confirmations.
| ```bash | ||
| PYTHONPATH="$PWD/src/vita-bench" uv run --project src/vita-bench harbor run -c src/vita-bench/run_vita-bench.yaml | ||
| python src/vita-bench/scripts/build_oracle.py jobs/<job-id> --min-passes 2 | ||
| uv run vita-bench --output-dir datasets/vita-bench --overwrite # re-generate with oracle files |
There was a problem hiding this comment.
Select the adapter project when regenerating oracle tasks
In a fresh checkout following these repository-root commands, this invocation cannot resolve the adapter's console script: it is declared in src/vita-bench/pyproject.toml, and there is no root uv project. Checked uv run --help, which describes --project as “Run the command within the given project directory”; running uv run --offline vita-bench --help at the repository root fails with Failed to spawn: vita-bench. Consequently this step never copies harvested trajectories into the generated tasks before oracle verification. Add --project src/vita-bench, as in the neighboring commands.
AGENTS.md reference: AGENTS.md:L33-L34
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 00c93dc: every uv run in the oracle section now passes --project src/vita-bench.
Root cause: build_oracle.py only added or replaced files and never removed any, and round 1 wrote candidates straight into oracle/, so a candidate that failed its replay stayed there even with --overwrite (which only touches accepted tasks). Also, independent live runs never confirm each other, so the documented one-shot --min-passes 2 wrote nothing on a first build. - build_oracle.py: --out (stage candidates outside oracle/) and --clean (empty the output dir first, so it holds only this run's accepted set) - adapter/main: --oracle-dir to generate tasks from staged candidates - README: live -> stage -> replay -> promote (passed twice) -> regenerate, with --project src/vita-bench on every uv invocation (PR harbor-framework#100 review) - scripts/test_build_oracle.py: offline self-check of the flow Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00c93dc026
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| """Export the recorded conversation (used by the verifier).""" | ||
| from starlette.responses import JSONResponse | ||
|
|
||
| return JSONResponse(json.loads(json.dumps(runtime.state_payload(), default=str))) |
There was a problem hiding this comment.
Restrict access to the full runtime state
When the simulated user invokes tools, _run_user_turn() records those user-only calls and results but returns only the eventual user message to the assistant. This unauthenticated route exposes those internal exchanges, along with the dumped database, to terminal-capable agents at http://vita-runtime:8000/state. That gives them information unavailable through the normal MCP/parity observation stream, compromising benchmark fidelity. Since evaluate.py now reads the sidecar artifact instead of this endpoint, remove the GET route or authenticate it rather than leaving the full state agent-readable.
AGENTS.md reference: AGENTS.md:L109-L110
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Real, fixed in 21f7604. GET /state is removed. The separate verifier reads the sidecar artifact (/var/lib/vita/state.json), so nothing needs it any more. scripts/check_runtime_hardening.sh now asserts that GET /state returns 405, and it reads the recorded state from the sidecar's own file to confirm that rejected injections leave it empty and that the oracle token never ends up in it. Before the fix the new check failed (200); after it, it passes. Token-gated POST /state for the oracle replay is unchanged, and a replay still loads all 41 messages and hands the state to the verifier.
…environment Root cause: VitaBench keeps its data registries (locations, stores, products) per thread (vita.data_model.thread_safe_base), and upstream builds and uses an environment on one thread. FastMCP runs sync tools in a worker pool, so tool calls from the agent saw empty registries: address_to_longitude_latitude raised "list index out of range", product search returned nothing, and ordering failed with "<product> not found". The original side never hit these errors on the same task, so Harbor scores were depressed by the adapter itself. Fix: build the runtime on one dedicated thread and route every MCP tool, domain tool and /state call through it. scripts/test_sidecar_threads.py (run inside the sidecar image, no LLM) calls a data-backed tool through FastMCP's dispatch from fresh threads; it fails before the fix and passes after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s to the host user - server.py: remove GET /state. It exposed the full runtime state (the user simulator's internal tool calls and the database dump) to terminal-capable agents; the separate verifier reads the sidecar artifact instead. The hardening check now asserts GET /state -> 405 and reads the recorded state from the sidecar's own file (fails before, passes after). - run_original.sh: chown the copied export to the owner of the bind mount, so a non-root caller on rootful Docker gets readable files (no-op under rootless runtimes, verified with podman). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21f7604f16
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| trajectory = build_atif_trajectory( | ||
| transcript=json.loads(transcript_path.read_text(encoding="utf-8")), | ||
| summary=summary, | ||
| system_prompt=instruction_path.read_text(encoding="utf-8") if instruction_path.exists() else None, |
There was a problem hiding this comment.
Record the parity agent's actual system prompt in ATIF
For generated tasks, this records the full Harbor instruction as the ATIF system message, but run_vita_llm_agent.py::run_agent() uses that file only to extract the time and supplies get_agent_policy(args.language) to LLMAgent. The exported trajectory.json therefore claims the model received the MCP-specific instructions and XML-like wrappers that were never sent, misleading prompt comparisons and parity diagnostics in the Harbor viewer. Export the actual rendered upstream system prompt from the runner and use it here instead.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Real, fixed in b78950d. The runner now stores the exact prompt it sends, agent.system_prompt (the upstream LLMAgent policy with {time} filled in), in its summary, and the ATIF export uses that as the system message instead of the Harbor instruction. The runner reads the instruction only for the environment time. scripts/test_atif_system_prompt.py fails before the change and passes after.
The runner sends LLMAgent its upstream policy (get_agent_policy, with {time}
filled in) and reads the Harbor instruction only for the environment time,
but trajectory.json recorded the Harbor instruction as the system message.
The runner now saves agent.system_prompt in its summary and the ATIF export
uses that. scripts/test_atif_system_prompt.py fails before, passes after.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@Yiminnn current plan looks good, and for the agent + model, you can use codex + deepSeek-V4.1-Flash, have dm-ed you the keys. |
|
@audreina17 Done. The generated tasks now use a separate verifier (
Judge: Parity hasn't been run yet, so there are no saved submissions yet. Once it runs, the original submissions, agent logs and grading results will go to the HF fork. |
…laude-haiku-5-5 (judge) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Podman's Docker-compat API re-splits exec-form healthcheck args on whitespace, turning the python -c script into 'python3 -c import ...', so vita-runtime never became healthy and every trial hit the 2400s environment-start timeout. The new one-expression form has no spaces and behaves identically on Docker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…production Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y results VitaBench ships no reference trajectories. scripts/synthesize_oracle.py builds one per task from the gold end state: it replays the gold orders, bookings and reservations through the real tools in the upstream runtime and, before each action, makes the lookups an agent would and states what the tools returned. No LLM is involved; grading is untouched. 249 of 400 trajectories were scored 1.0 by the official judge (claude-haiku-5-5) and are stored under oracle/: delivery 74, instore 78, ota 62, cross_domain 35. About 85 of the remaining tasks cannot pass with any replay of the gold state (store missing from the environment, gold contradicting its own rubric, impossible clock or inventory, rubrics no tool output can verify); the README lists them by task id. The judge is not deterministic: 8 of 25 identical trajectories got a different verdict when judged twice, so the count will not reproduce exactly. Also: - README: move "How it is graded" and "Oracle solutions" under the sections the adapter contract allows; document oracle coverage and the upstream data problems found. - Record parity: original 33.33 +/- 7.26, Harbor 16.67 +/- 8.33 over 3 runs x 20 tasks (run ranges overlap). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f248b04b0c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ], | ||
| "harbor_runs": [ | ||
| 0.0, | ||
| 25.0, |
There was a problem hiding this comment.
Recompute published parity scores on the common task cohort
The newly published results exclude the ungraded cross_domain:10807014 trial (README.md:246–248), but Harbor run 1 is still reported as 25.0%. With one of the 20 binary tasks excluded, the shared cohort has 19 tasks, so 25.0% is not a possible success rate; parity/aggregate.py:99–114 now also restricts every original and Harbor run to that common cohort. These arrays therefore cannot be reproduced by the documented aggregator despite its earlier cohort fix, and either retain the infrastructure failure in the denominator or contain stale results. Rerun that trial or regenerate both sides’ arrays, mean/SEM, sample size, and README table using the common cohort.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The numbers are computed on the full 20-task cohort, and the README wording was wrong, not the arrays. The run-1 trial for cross_domain:10807014 had no reward, and was re-run once in a separate job (parity-harbor-run1-retry, scored 0). aggregate.py drops the errored trial and takes the re-run, so with the three Harbor job dirs passed to --harbor it prints harbor run 0: 20 tasks, cohort: 20 tasks and exactly [0.0, 25.0, 25.0]. bd09353 corrects the README and the notes field, which said the trial was excluded.
…notes The previous oracle set mixed three synthesizer versions. 74 of its files came from a version that built all tasks in one process without clearing upstream's per-thread registries, so their tool results contained entities of other tasks. Replace the whole set with trajectories from a single run of the committed script, each judged once: delivery 70, instore 74, ota 52, cross_domain 28. 24 tasks had no verdict (upstream evaluator crash on the judge's reply) and are not included. synthesize_oracle.py: - clear upstream registries per task - delivery: per-order time-rubric assignment, tighter "around T" window, gold dispatch times checked against the rubric, env address spelling, existing-order matching, no unrelated item substitution - state the chosen place / items, same-day alternatives, weather, holidays and order history next to each action - item owner and date corrections, nested and re-used gold orders, booking time format and date typos - distance lookups limited to gold places plus the three nearest others README / metadata: single-run coverage table, upstream data problems restricted to tasks that are still uncovered, the gateway pass-through used for validation, per-trial parity findings, and the corrected note on the re-run parity trial (it is counted, so every run has 20 tasks). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd09353bd7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| args = parser.parse_args() | ||
| _bootstrap() |
There was a problem hiding this comment.
Resolve synthesis paths before changing directories
When invoked outside VITABENCH_ROOT with a relative --dataset (described by --help as “generated Harbor dataset dir”) or --out, _bootstrap() changes directories before either path is consumed. An offline fixture with an existing ./dataset raises FileNotFoundError; with an absolute dataset and --out out, candidates are instead written into the upstream checkout, leaving the caller's intended output directory empty. Resolve both paths against the invocation directory before bootstrapping so relative-path runs read and export the intended oracle assets.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in c9857bb: --dataset and --out are resolved to absolute paths before _bootstrap() changes directory.
The 24 tasks whose first judging crashed in the upstream evaluator were judged once more on the same trajectories: 8 passed, 10 did not, 6 still have no verdict. Coverage: delivery 70, instore 75, ota 55, cross_domain 32. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ysis Every task that did not pass was classified against its task data (upstream defect / fixable in the oracle / judge). The fixable ones were addressed generically in synthesize_oracle.py and the uncovered tasks judged once more; passing trajectories from the previous run are kept unchanged. New passes: 43 (delivery 6, instore 9, ota 15, cross_domain 13). synthesize_oracle.py: - state a rubric's conclusion only when every number and named place in it is backed by the tool results of the conversation (directly or as a sum / difference / multiple of returned prices) - distances: zero-distance gold places, places without a street number, stations and airports as anchors and candidates, units, restated next to the action - totals against a stated price limit and pieces-per-unit arithmetic - order notes a rubric asks for but gold omits; rubric-named note changes and cancellations on existing orders - claim an existing env order only when a rubric names it; a re-used id from an earlier day at another price is a new purchase; kept orders are described, not just shown - delivery windows no longer taken from train/flight rubrics or store hours; "at T" aims at T - item kept in the gold store when it sells the gold-named item; no empty orders; calendar checks without a festival name; existing bookings the user asks to confirm README: coverage table, provenance of the stored trajectories, the conclusion rule, upstream lists restricted to uncovered tasks. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…judge) The nine tasks whose judging crashed in the upstream evaluator were judged once more on the same trajectories: 1 passed, 7 did not, 1 still has no verdict. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ebda2391e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if exc or not reward_file.is_file(): | ||
| # Agent crash / infra failure: exclude (re-run it), never count as 0. | ||
| why = (exc or {}).get("exception_type") or "no reward" | ||
| errored.append(f"{trial.name} (run {idx}, {why})") | ||
| continue |
There was a problem hiding this comment.
Preserve empty repetitions before validating parity cohorts
When every trial in a repetition lacks a usable reward, this continue prevents its runs[idx] bucket from ever being created, so the per-run cohort check never sees that repetition. The newly reproduced case is an entirely ungraded repetition: an offline three-repetition fixture exited successfully with --strict, original_runs=[100,100,100], harbor_runs=[100,100], and a positive overlap verdict, although --help promises to fail “when runs differ.” Unlike the previously fixed partial-cohort case, this bypasses validation by dropping a whole repetition and can produce publishable parity statistics from insufficient repetitions. Preserve run identities before excluding errored rewards on both sides, and reject empty repetitions before scoring.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in c9857bb. Both loaders now register a repetition before excluding ungraded trials, and main() aborts when any repetition has no graded trial ("no graded trial in harbor run 2 (re-run it)"), with or without --strict. test_aggregate.py has a case for a repetition whose only trial errored. The published arrays are unchanged: all three Harbor repetitions have 20 graded tasks.
|
@Slimshilin this is ready for review.
Edited: oracle count updated from 276 to 287 after a further round of fixes. |
Tasks still uncovered were re-synthesized with further fixes and judged once: 11 more pass (cross_domain 5, ota 5, delivery 1). 19 of the new trajectories got no verdict (upstream evaluator crash) and are not included. synthesize_oracle.py: - verified statements also cover "need to check / inform" rubrics and plain facts (last order date, departure and arrival times, opening hours, distances, totals); every statement needs at least one checkable number, date, clock time or name, all backed by tool results, and a distance limit needs a measured distance under it - cheapest available fare per route and date when rubrics compare dates - totals of the new orders in the summary - item option taken from the item's "Available in ..." tag when gold leaves it empty and a rubric names one Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ed, 6 no verdict) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…aths aggregate.py dropped a repetition in which no trial had a reward, so the cohort check never saw it and statistics were computed from fewer repetitions. Repetitions are now registered before errored trials are excluded, and an empty one aborts the run. test_aggregate.py covers it. The published parity numbers are unchanged. synthesize_oracle.py resolved a relative --dataset / --out after _bootstrap() had changed directory; both are now made absolute first. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Pushes to harborframework/parity-experiments are rejected while that repo is over the Hub's file-count limit, so the raw parity outputs are mirrored in a separate dataset repo and linked from the README and parity notes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…r fixes Synthesizer: read the delivery window from the final clause of a rubric, treat an unpadded am/pm-less time before the clock as evening, aim just before T for 'around T', buy env orders that are dated after the task clock, never leave an order empty when every gold id is stale, give a time rubric only to its best matching order, recap an order before cancelling it, say what a kept order or booking is, name stations/airports, sum hotel room-nights, and keep gold places among the distance anchors. README: coverage 294/400; 23 more tasks with a rubric blocked by upstream data. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7307008e07
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| all_runs = [("original", i, r) for i, r in sorted(orig.items())] + [("harbor", i, r) for i, r in sorted(harb.items())] | ||
| empty = [f"{side} run {i}" for side, i, r in all_runs if not r] | ||
| if empty: # a repetition without a single graded task is missing data, not a 0-task cohort | ||
| raise SystemExit(f"aborting: no graded trial in {', '.join(empty)} (re-run it)") |
There was a problem hiding this comment.
Reject mismatched repetition counts before reporting parity
When an entire repetition has no trial records—for example, an omitted or interrupted Harbor job—it never appears in these dictionaries, so both the empty-run and task-cohort checks pass. An offline fixture with three original repetitions and only two complete Harbor repetitions emitted original_runs=[50,50,50], harbor_runs=[50,50], and a positive parity verdict. Unlike the repaired all-ungraded case, there is no bucket to inspect here. Compare repetition counts across sides before emitting publication-ready metrics; otherwise missing runs silently change the mean/SEM and allow an incomplete experiment to pass validation.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 04413d6. aggregate.py now compares the number of repetitions on the two sides before any other check and aborts when they differ ("3 original repetition(s) vs 2 Harbor repetition(s); run the missing repetition before reporting parity"), so an omitted or interrupted job can no longer shrink the mean/SEM. test_aggregate.py has a case for it: three original repetitions against two complete Harbor repetitions must exit non-zero. The reported parity numbers are unchanged (3 repetitions on each side).
…g on one side Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04413d6cc0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self.infra_error = f"user_simulator: {type(exc).__name__}: {exc}" | ||
| self._write_state() | ||
| raise | ||
| user_message.validate() |
There was a problem hiding this comment.
Record user-message validation failures as infrastructure errors
If the simulated user returns a message that fails validate() and an MCP agent returns after that tool error, the validation exception is never recorded in infra_error: only generate_next_message() is inside the guarded block. The verifier consequently bypasses its infrastructure-error check and _evaluate() scores the still-open conversation as 0.0; an offline fixture using these methods reproduced this result. Include validation in the guarded operation so invalid simulator output produces an errored trial rather than an ordinary benchmark loss.
AGENTS.md reference: AGENTS.md:L109-L110
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 3a13ae6. user_message.validate() is now inside the guarded block in _run_user_turn(), so an invalid simulator message sets infra_error and the verifier reports an errored trial instead of scoring the open conversation as 0.0. Oracle replay does not call the user simulator, so stored trajectories are unaffected; as a smoke test I replayed vita-delivery-10711001 on the rebuilt runtime: the replay completed (22 messages, agent_stop, no infra error). That judge draw scored it 4/5 rubrics, where the same stored trajectory scored 5/5 in four earlier runs; this is the judge nondeterminism described under "Oracle solutions" in the README, not a change in the conversation.
| key = json.dumps(state["messages"], sort_keys=True, ensure_ascii=False) | ||
| pass_counts[key] += 1 | ||
| candidates[identity].append((pass_counts[key], state_path)) |
There was a problem hiding this comment.
Deduplicate trials before counting oracle confirmations
When the input job directories overlap—for example jobs and jobs/run-1—the same state file is visited twice and increments this counter twice. A one-trial offline fixture with duplicate inputs was promoted by --min-passes 2, even though the script documents that threshold as protection against “single lucky judgments.” Deduplicate resolved state/trial paths before incrementing pass_counts, so one evaluation cannot satisfy a multi-pass confirmation requirement.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 3a13ae6. build_oracle.py now skips a state file whose resolved path it has already visited, so overlapping inputs such as jobs and jobs/run-1 count each trial once. test_build_oracle.py has the case: with jobs and jobs/live both passed and --min-passes 2, only the trajectory that really passed twice (live + replay) is written.
- synthesize_oracle.py: state a 'result is no' package check from the product records, name the station nearest to a chosen place, recap a hotel before booking it, summarise room-nights as one stay, and do not geocode a landmark that the chosen place's own tag names. - build_oracle.py: overlapping job directories no longer count a trial twice. - runtime server: an invalid simulated-user message is recorded as an infrastructure error instead of ending as a scored 0. - README: coverage 296/400 and the per-task list of upstream data problems. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The synthesizer states a 0 m distance when a chosen place and a user location share one point, so 'hotel within 500 m of the square' is said in words. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b51dd56d42
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| def _register_domain_tools() -> None: | ||
| for tool in runtime.environment.get_tools(): | ||
| mcp.tool()(make_domain_tool_handler(tool, runtime.call_assistant_tool)) |
There was a problem hiding this comment.
Record schema-rejected MCP calls in the benchmark state
For a standard Harbor agent calling these domain tools after start_conversation, FastMCP rejects missing required parameters or schema-invalid values before invoking the handler. Because message recording and limit accounting happen inside call_assistant_tool, these failed turns never enter the persisted conversation and consume neither the 300-step budget nor the 10-error budget. In contrast, the raw JSON path used by the parity agent records and charges the assistant turn before tool dispatch. Handle validation failures at the MCP dispatch boundary and record/count their turns too; otherwise standard agents receive extra retries and the verifier grades an incomplete trajectory.
AGENTS.md reference: AGENTS.md:L109-L110
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 3621dea. The runtime server now has a FastMCP middleware (RecordRejectedDomainCalls): when FastMCP rejects a domain tool call against its schema, the call is handed to call_assistant_tool with its raw arguments. The assistant turn is recorded and charged to the step budget, the upstream tool returns its own error, and that error counts toward the 10-error budget, which is what the raw JSON path already did. Adapter control tools keep FastMCP validation. scripts/test_sidecar_threads.py covers it inside the runtime image: after address_to_longitude_latitude with no arguments the conversation has two more messages (the tool call with {} and its error result) and num_errors is one higher. Oracle rerun on the rebuilt runtime: vita-delivery-80715001 replays and scores 1.0.
…ema validation FastMCP rejects a call with missing or invalid arguments before the handler runs, so a standard agent's bad call never reached the conversation or the step / error budgets. A middleware now hands such a call to the runtime with its raw arguments: the assistant turn is recorded, upstream's tool returns its own error, and the error is counted, as on the raw JSON path. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Summary
Harbor adapter for VitaBench (meituan-longcat/vitabench, ICLR 2026; v2.0 adapter list, claim confirmed by Xiangning (Shining) Lin on Discord). The benchmark has 400 life-service customer-service tasks (delivery / instore / ota / cross_domain, 100 each) in a multi-turn conversation with a simulated user over a 66-tool environment, graded by the official rubric-based sliding-window LLM evaluator.
This builds on the closed #76 by @JLzhang0426. Their commit is kept as-is for attribution; my changes are on top.
Design
vita-runtimesidecar that hosts the upstream environment (tools + DB) and the simulated user behind an MCP streamable-http server. The agent talks to it through MCP only.GET /state) and scores it with the unmodified upstreamvita.evaluator.evaluate_simulation. Reward is 1.0 only if every rubric is met.tests/. The sidecar sees the task withoutevaluation_criteria.Changes on top of #76
POST /stateto replace the conversation with a fabricated one, and the verifier also fell back to an agent-writable file under/logs/agent.solution/contain.configure_runcan only tighten limits, andrecord_terminationaccepts failure reasons only.scripts/check_runtime_hardening.shverifies this against a live sidecar without any LLM: 5/5 checks pass.VITA_EVALUATOR_MODELmust be set explicitly. The upstream default isanthropic.claude-3.7-sonnet.[verifier] environment_mode = "separate"): the conversation is exported from the sidecar and the official evaluator runs there, out of the agent's reach.python:3.12-slim-bookworm.build_timeout_secis raised to 2400 (two cold image builds take more than 900s), and the sidecar healthcheckstart_periodto 120s.Status
claude-haiku-5-5: a reference trajectory scores 1.0 and a known-wrong one 0.0 (vita-delivery-10711001)harborframework/parity-experimentsare currently rejected (the dataset repo is over the Hub's 1,000,000-file limit); until then the full artifacts are mirrored at https://huggingface.co/datasets/yiminn/vita-bench-parity-experimentsharbor-datasets), pending the question belowOpen question for reviewers
VitaBench ships no reference trajectories, and about 60 tasks cannot pass with any replay of the gold end state (gold store missing from the environment, gold contradicting its own rubric, impossible clock or inventory, rubrics no tool output can verify; listed per task in the README). The LLM judge is also not deterministic (8 of 25 identical trajectories got a different verdict when judged twice). I kept all 400 tasks so the dataset matches upstream and documented oracle coverage instead of excluding the uncovered tasks. Please tell me if you prefer them excluded.
Parity
Agent scenario: custom agent (spec Scenario 3). Upstream
vita rundrives its ownLLMAgent. On the Harbor side,vita_llm_agentruns the same upstreamLLMAgentclass against the task'svita-runtimeMCP sidecar, with upstream seeding (seed=300, one derived seed per trial). The Harbor task prompt mirrors the upstream agent system prompt.Models (identical on both sides, through the organizer's OpenAI-compatible gateway):
Tasks / runs. A 5% subset: 20 of 400 tasks, 5 per domain (delivery / instore / ota / cross_domain), drawn once with a seeded sampler and generated with
uv run vita-bench --split parity(list inmain.py: PARITY_TASK_IDS; the README gives the matching original-side task ids). 3 runs per side, reported as mean ± sample SEM; matching criterion: the run ranges overlap.Procedure (symmetric on both sides):
vita run --re-evaluate-fileon Harbor-produced trajectories. This separates evaluator drift from agent and user drift.Parity results
The run ranges overlap, but this is a weak match. A per-trial comparison of the 120 trials found no adaptation difference (same conversation lengths, prompts and user-simulator guidelines); with 20 binary tasks per run the gap is about 1.5 standard errors. On both sides the user simulator opens in Chinese in about 75% of trials, which causes tool errors on the English environment. Details are in the README.
Oracle
VitaBench ships no gold trajectories.
scripts/synthesize_oracle.pybuilds one per task from the gold end state without calling an LLM: it replays the gold orders, bookings and reservations through the real tools, makes the lookups an agent would before each action, and states what the tools returned. It states a rubric's conclusion only when every number and named place in it is backed by the tool results. The replay is token-gated, and the verifier scores it with the unmodified upstream evaluator.Each stored trajectory was judged once and kept as judged (232 from the first full run, 65 from six later revisions of the script applied to tasks that had not passed). For at least 96 of the 103 uncovered tasks the README names a rubric that the task data itself makes unsatisfiable. The README lists the upstream data problems found per task, and notes that validation ran behind a local pass-through for two gateway quirks (SSE replies to non-streaming requests, empty
content_filtercompletions); the pass-through does not alter model output and is not part of the adapter.🤖 Generated with Claude Code