8000 Benchmarks: one task protocol (Harbor's format) for single tasks and streams by iamziyuzhao · Pull Request #56 · Infini-AI-Lab/hermit · GitHub
[go: up one dir, main page]

Skip to content

Benchmarks: one task protocol (Harbor's format) for single tasks and streams - #56

Merged
haizhongzheng merged 4 commits into
mainfrom
harbor-interface
Nov 5, 2026
Merged

haizhongzheng merged 4 commits into
mainfrom
harbor-interface

Conversation

@iamziyuzhao
@iamziyuzhao iamziyuzhao commented Nov 1, 2026 •
Copy link
Copy Markdown
Collaborator

Summary

Naming: the protocol is the benchmark's, the engine is Harbor's. The docs section is "Benchmarks" (docs/framework/task.md#benchmarks), the rule in examples/README.md says every container benchmark comes as a task set in Harbor's format, and agent.name: harbor names the engine, as codex names Codex.

Benchmarks enter Hermit through one protocol, the task-set format of Harbor; harbor is the agent that runs them. Concretely: agent.name: harbor runs any task set in Harbor's format (task.toml, environment/, tests/test.sh writing the reward) as the acting pipeline, for single tasks and for streams, instead of each example driving Docker in its own way.

  • hermit/harbor/ (host side): runner.HarborAgent turns one rollout into one Harbor trial (job config, harbor run in Harbor's own venv, the trial's result.json read back: status, failure cause, reward, tokens, a curated log without session transcripts; the disk gate, the per-image cleanup modes and the HALT sentinel of the Terminal-Bench bridge, made generic). dataset downloads a registry dataset, indexes task directories into tasks.jsonl rows (per task, per rollout #k, per step <task>:<step>), writes splits and a sha256 lock. staging deploys the adapter for the container exactly as hermit deploy does (context, skills, roles, the whole adapter under hermit/<id>/, hooks rewritten to run from that copy). judge.score reads the reward and gives the verifier's output as feedback. A bound backend reference (model: fireworks/...) hands Harbor the endpoint and key variable; a plain name uses the ChatGPT login for Codex.
  • hermit/harbor/harborside/ (Harbor's venv, harbor + stdlib only): codex.HermitCodex, Harbor's Codex with the deployed workspace uploaded into the task's workdir; scripted.ScriptedAgent, a shell script as the agent, to check a task set's packaging without a model; driver, Harbor's MultiStepTrial fed one step at a time over a Unix socket.
  • Streams. A task with [[steps]] (one environment through many steps, each with its instruction and verifier) is run one step per rollout: the driver keeps the environment between the Trainer's steps so a learner acts between them, steps of one stream run in order (a step whose turn has not come waits; a wrong order is stream_order, a dead driver stream_lost), different streams run concurrently, the last or an aborted step stops the environment, and harbor run evaluates the whole stream with a frozen adapter. This is the shape a CL-Bench order will take.
  • OfficeQA through Harbor. examples/officeqa/utils/harbor/build_tasks.py writes one Harbor task per question in the SkillOpt setting (SkillOpt's task text as the instruction, the exact-match judge inside tests/, the corpus bind-mounted at /app/docs/root_1); gepa/run_codex_harbor.yaml runs the Codex harness that way. No result is claimed for it: it is packaging, checked with the scripted agent, not a run.
  • Docs: docs/framework/task.md "Harbor benchmarks", the recipe's "Through Harbor", config-fields, the rule in examples/README.md (a container benchmark comes as a Harbor task set; no example drives Docker itself), CHANGELOG.

Limits and follow-ups

  • Streams need sandbox.profiles.rollout.enabled: false (a driver started inside a bubblewrap worker would die with it); the same unconfined rollout every Docker-driving agent has today. A preset that grants the rollout role the Docker socket is a follow-up.
  • An adapter with a context_tool is refused (as the CLI agents refuse it); the adapter's MCP tools are not served in the container.
  • Not in this PR: moving exa 8000 mples/terminal_bench_2 / swebench_verified (the AHE branch) onto hermit/harbor; CL-Bench as multi-step tasks (needs a host-side chat agent whose tools run in the container, and a clbench image); an OfficeQA parity run through Harbor.

@iamziyuzhao iamziyuzhao changed the title Harbor benchmarks: agent.name harbor for single tasks and streams Benchmarks: one task protocol (Harbor's format) for single tasks and streams Nov 1, 2026
iamziyuzhao and others added 4 commits November 5, 2026 00:49
A task set in Harbor's format (task.toml, environment/, tests/test.sh writing the reward) runs as the acting
pipeline through the built-in `harbor` agent: one rollout is one Harbor trial, started, installed, verified and
read back by `harbor run` in Harbor's own venv, with the adapter deployed into the container as `hermit deploy`
lays it out (context, skills, roles, hooks, the adapter's copy under hermit/<id>/). `hermit.harbor.judge` reads
the reward and gives the verifier's output as feedback. `python -m hermit.harbor.dataset` downloads a dataset,
indexes task directories into tasks.jsonl rows (per task, per rollout, per step), writes splits and a sha256 lock.

A task with [[steps]] is a stream: one environment through many steps. A driver (harborside/driver.py, Harbor's
MultiStepTrial fed one step at a time over a Unix socket) keeps the environment between the Trainer's steps so a
learner acts between them; steps of one stream run in order, streams run concurrently, the last or an aborted
step stops the environment, and `harbor run` evaluates the whole stream with a frozen adapter.

The container-side half (hermit/harbor/harborside: HermitCodex, a scripted agent for model-free smoke tests, the
driver) imports harbor and the standard library only. OfficeQA gets a Harbor packaging of the SkillOpt setting
(utils/harbor/build_tasks.py, the exact-match judge inside tests/, gepa/run_codex_harbor.yaml), checked with the
scripted agent; no result is claimed for it.

Tests: a fake harbor command and a fake driver (tests/test_harbor_runner.py), the Harbor-side agents and the
driver's protocol under the Harbor venv (tests/test_harbor_harborside.py), and a real-Docker smoke of a one-step
task and a three-step stream (tests/test_harbor_smoke.py, HERMIT_HARBOR_SMOKE=1).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The task-set format of Harbor is the one way a container benchmark enters Hermit, so the docs section, the
rule in examples/README.md, the changelog entry and the module docstrings say "benchmarks" and "Harbor's
format" instead of "Harbor benchmarks"; the agent keeps its name, harbor, as the engine that runs them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJYNyvHmXqKo4LE96nN
The rule in examples/README.md and the Benchmarks section say so; the examples that still own their loop are
listed as work to move onto it, and the limits are named as pieces still to build.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FcJCJYNyvHmXqKo4LE96nN
Import the acting Agent from hermit.agent.acting, read templates from
hermit/adapter/templates, move the Harbor tests to tests/core/, and list
hermit/harbor/ as a shared layer (hermit/agent/acting/agent.py imports it).
@haizhongzheng haizhongzheng left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rebased onto main 77ec08e and ported to the agent layers and grouped tests; full suite has no new failures. Merging as the base for the sandbox refactor.

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

0