Repository navigation
Examples: five Harbor benchmarks with baselines and their papers' methods - #106
Conversation
…AB's verifier and figures, tests) The post-PR audit of #106 found no P1; its three P2s and its P2 question, fixed: - AlgoTune's SkillOpt counted every rollout a failure: a trial's score, 1 - 1/speedup, never reaches SkillOpt's success_score of 1.0, so its analysts and slow update saw failures only. success_score is now 0.000001: a solver faster than the reference, as the verifier's own test has it. - SkillOpt's Codex trace summary, on by default, describes SkillOpt's own harness (task.md, SKILL.md, <answer>) and told the analyst that every Harbor rollout gave no answer: codex_trace_to_optimizer: false in the SkillOpt configs. - tests/core/test_harbor_examples.py now holds the configs to training and validation rows disjoint from the test's, the smoke's rows apart from the run's, the learners sandboxed, web search off, and SkillOpt's success and trace settings, and loads every config with no skip (neither tasks.jsonl nor skillopt is needed): each of 12 broken copies fails it. - LAB-Bench's split is by question, and FigQA asks up to three questions about a figure: 25 of the 127 test questions share a figure with a training question. utils/rows/test_new_figures.txt (written by utils/figures.py) lists the other 102 for a second score from the same trials. And its P3s. LAB-Bench's verifier ran /app/setup.py, the agent's to rewrite, when the mapping was missing: the patch (now patches.py:patch_tasks) removes that fallback too, re-locked from a fresh download. The SWE oracle command gets its own run name. The final adapt 8000 er's export goes to a fresh git-ignored folder per profile. The claims the audit checked against the papers (Meta-Harness's leaderboard figures, AHE's rollback and efforts, RRSI's trials, GEPA's splits, NPUEval's score, SkillOpt's meta skill) and the trial counts are corrected. The READMEs say how Terminal-Bench 2.0's images are pulled, how infra trials count, and what the learners read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
2ca476a to
a0f4fa8
Compare
b6cf47b to
f271051
Compare
a0f4fa8 to
31b1510
Compare
f271051 to
4622bd6
Compare
31b1510 to
2d9401c
Compare
4622bd6 to
3aa0cc2
Compare
The post-PR audit of this PR's 2d9401c found one high issue and six medium ones, and the audit of #106's 3aa0cc2 one medium issue in this PR's code; each is fixed here, and so are five of the low ones. - Claude Code on Anthropic's own API with a key (`acting_agent: {cli: claude}`, `anthropic/<model>`, no login) started every session without a token: the launch script exported the plan's empty ANTHROPIC_API_KEY before ANTHROPIC_AUTH_TOKEN read the key from it. A variable the plan passes under another name is now set first, in one export that reads every source as Harbor passed it; a source no entry sets is unset, and the plan's own variables come after. - A Harbor halt (a lost sign-in, an API account's usage limit) ends `hermit train` unfinished at the step that met it, before its learner (after the learner's call when a run of `run_agent`'s met it), and a resume runs that step again: before, every later rollout came back infra/halted while the learner went on, and the run ended as finished. - Whether the provider could not serve a Codex session is read from its last failure since the session last worked, never from a warning of Codex's (the trust it gives a deployment's hooks), and a turn that failed, or a stream that ended, while Codex retried its requests is one it could not serve, unless the sign-in was lost: Codex 0.164 that cannot reach chatgpt.com fails its turn with `workspace routing discovery failed`, which the last-failure rule had made the agent's empty answer. Codex 0.164's own words for a lost sign-in are matched. - A ChatGPT sign-in a session hands back replaces the shared copy only as a later, well-formed refresh: a regular file of at most 64 KiB (a container's larger one is never downloaded) holding its refresh and access tokens, for the copy's account, stamped after the copy and at most a minute ahead of this machine's clock (an hour where the clock may differ). Harbor no longer gets CODEX_FORCE_AUTH_JSON or CODEX_AUTH_JSON_PATH from the user's environment. - Only a pipeline that keeps its trials by row (a Harbor task set with `trial_cache` on, in the config or its benchmark file: isolate.keeps_trials) is handed rows naming their epoch or asking for a new run; no record keeps `epoch` or `fresh` (rollout.TRIAL_KEYS), so the learning material's `input` and every learner's text of a task are the same in each epoch, and the adapter's per-task context gets the task's own row. - A Harbor trial is scored as Harbor grades it: a verifier that left no reward Harbor could read or ran out of its time (`verifier_timeout: agent`, now the default; `infra` the opt-in for a host whose load makes verifiers time out), and a request of one of Harbor's own agents that the provider refused for what it held, are the agent's result, 0 without a reward, unless the verifier's output shows its tools never arrived or the host's disk full; a provider that could not serve, or refused the run's configuration, stays infra (Hermit runs it again, where Harbor grades it). An OSError on this machine while the adapter is staged is infra (`staging_failed`); the adapter's own deployment or per-task context failing stays the agent's 0, since what its child process prints could be the adapter's words. A verdict that quotes the verifier's output applies `verifier_redact`. - `dataset prepare`: a patched set is its patch's own. The download record names the patch (its hook and its file's digest), a reuse of another source's or another patch's tasks is refused before the patch runs, the default data directory is named by the patch too (an unpatched set's name as before), and a download is patched in its own folder before it is moved into place. - The AHE Adapter's learners' clocks (`evolve_timeout_s`, the Agent Debugger's `timeout_s`) are the Base Agent's own, counted from the CLI's start: a wait for the login's plan or a session slot pauses them instead of spending them (a hold longer than a clock made the step a no-op recorded as done, or the Debugger's analyses upstream's fallback text). This reverses PR #65's choice that the Debugger's clock cover the plan wait: upstream's clocks had no plan hold to cover. `trainer.call_timeout_min` still bounds a step, waits included. - `hermit train`'s refusal of more than one epoch over a multi-step task's steps gives its true reason. Tests: test_harbor_harborside.py (every CLI's launch script on every backend run by bash, the returned files' limits), test_harbor_runner.py (grading as Harbor does, staging, redaction, the sign-in back by the environment's clock, Harbor's environment, a Codex outage), test_harbor_core.py (the rows only a trial cache is handed, the records, a halt), test_harbor_dataset.py (patched sets), test_cli_agent.py and test_base_agents.py (Codex's outcome and lost sign-in words, the take-back), tests/methods/ahe (both clocks through a real login path). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
c7f0f25 to
d647693
Compare
…as Hermit's own sessions are What the Harbor runner needs of the layers every method shares, so that a trial in a task's container is one more session of the CLI's Base Agent: - The hosts deploy for a caller that serves the adapter's tools itself (`--no-serve-tools` on every host; Pi's and dsh's `prepare(serve_tools=False)` names no server, and the acting agents' workspace now passes the flag on, so a container session of Hermit's own runs gets no server row it cannot start) and take one task's context (`--context-file`). - Every CLI Base Agent reads a stream its caller read elsewhere: `outcome()` with no stream file reads the stream's text as it reads the file, the reply included; a missing or empty stream is a session not served, never a TypeError. - A Codex session whose sign-in or key the provider refused is `login_failed` (the run stops) if its turn did not complete, read from its own notices: never one it recovered from, what its log quotes of the session's tool calls, or an event's text (U+0085, U+2028 and U+2029 end no line of a stream); `unavailable` comes from its last failure. Codex's records are read with span prefixes too (`RUST_LOG=codex_core=info`). - hermit.agent.base.trajectory, the AHE Debugger, Harness²'s bench, RRSI's render and SkillOpt's Codex trace read a Harbor trial of any CLI (`agent/agent-<backend>.jsonl`, then Harbor's own output files, then its ATIF trajectory, which the Debugger takes before those files), and AHE's texts (EVOLVER.md's too) name that trial's files (the stream, hook audit and state under agent/; the record's instruction, as the Debugger's `task0i.md`; START.md's tree). Harness²'s bench takes a Claude Code trial's final message as the Base Agent reads its reply. MWM counts a learner session's turns and actions from the events the common reader reads (a line of the CLI's own that is no JSON object, or an event holding U+2028, no longer fails the step) and finds a task's record by the material's own file name. - A Harbor acting agent's model is bound and checked in the acting CLI's dialect (`agent (harbor, <cli>)`, an endpoint's too), the whole Binding spec kept, developer_role included, and its login is a contained session's (logins_of) unless `claude_bin` names this machine's Claude Code, whose version is then checked; the task set's benchmark file counts for both, as the runner merges it (relative to `normalize_config`'s `base`, else the working directory). hermit.harbor.clis is the table of those CLIs. - A client of a CLI's chat endpoint counts what a session that failed or that the provider refused used, which the endpoint reports in its error body (ChatClient's `count_error_usage`, set by `endpoint_spec`). tests/selection.py counts the recorded OpenCode and dsh streams as shared: the methods' tests read them too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
…k's steps in order What a Harbor task set needs of the framework's own commands and configuration. There is no new way to run: training is `hermit train`, testing is `hermit eval --adapter ...`, each set by the run's YAML and overrides as before. - A run that is not the agent's result (`RunOutput.extra["unscored"]`: a Harbor trial of status infra) has status `infra`: never judged, its score null in steps.jsonl, left out of the Trainer's and `hermit eval`'s means and counted (`unscored`, in the summaries, the learning material and the card). `eval.infra_retries` and `eval.infra_wait_s` make `hermit eval` run such rows again, except a multi-step task's step rows, a task Harbor runs for none of Hermit's agents (`unsupported_task`) and any after a halt (a lost login, a usage limit). - `hermit eval` needs only what it reads (`data.tasks`, `data.test`, the agent, the judge): a config with no `data.train`, such as a baseline's, needs no template or Evolver; `hermit check` checks it as `eval` runs it (its probe on a test row), `hermit train` refuses it, and its run name is the config file's when `trainer.run_name` gives none. An adapter of the run's tree (`final`, `root`, a tag, a commit) needs that tree: without one, `eval` refuses it before any run. The `eval` section is checked where an eval runs. - With `eval.repeats` above 1, each repeat hands the pipeline copies of its rows that name it (`repeat`), so that a pipeline that keeps its trials by row (Harbor's trial cache) runs each repeat anew; results.jsonl names the repeat. With `trainer.epochs` above 1 each epoch's rows name the epoch (`epoch`), and the rows `run_agent` runs, and those of a task the epoch's order names twice, ask for a new run (`fresh`): such a pipeline runs each anew, an epoch on an adapter the one before left unchanged included, where it would have handed back the earlier trial. - A multi-step Harbor task's steps run in order in its stream: `data.shuffle` moves its rows as one; a split whose order is kept (the train split with `data.shuffle: false`, the test split, the validation split) that lists a step ahead of an earlier one, or without every earlier one, is refused before any run, and `hermit check` reports it; `next_tasks` may name a step only after the earlier ones; `run_agent` runs no training row that is such a step, and an id it does not run comes back as an error result (score 0), no longer an exception; Harness² fails such a step before any editor session, and records an infra execution's cause beside its null score. A run runs each step of a stream once, in one environment: a train split with such steps trains one epoch (`hermit train` refuses more, and `hermit check` reports it). `hermit check` checks the test split's order for a training config too, and its probe runs no later step. - The Harbor task set's tasks and jobs directories, and an eval config's tree, are run secrets. The Harbor agent is told what its streams are named for (`run_identity`: a training run's record directory and the id it keeps there, any other pipeline its own), whether they are kept for a resume (`keep_streams`: the Trainer's pipeline only, until the run finishes), the run its trials are kept to (`trial_scope`: the Trainer's pipeline only, that identity), whether the run deploys adapters, and the CLI and login of a model only a CLI reaches; `hermit check`'s probe takes no trial from the trial cache. - An acting agent of Harbor's own takes no adapter: `hermit train` refuses it, `hermit eval` runs it with `--adapter none` only, and `hermit check` reports it for a training config. tests/core/test_harbor_core.py covers these. What this commit hands the Harbor agent, the next commit's runner takes: three of these tests (Harbor's `dataset prepare`, and a pipeline closing its HarborAgent with its streams) pass from there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
…the adapter's tools, context and notes A Harbor trial ran only Codex well (and Claude Code through code of its own); the adapter's tools, a per-task context and an adapter's notes never reached the container, and infra trials counted as zeros. Now: - One HermitXXX class per CLI (hermit.harbor.clis: codex, claude, pi, opencode, dsh, mini-swe-agent) over one executor (harborside/hermit.py). Hermit's side renders each trial's session with the CLI's own Base Agent (hermit.harbor.launch: the home, the command, the environment; host paths made the container's) against the adapter deployed as `hermit deploy` lays it out, and harborside uploads and runs it as the task's agent user: the prompt on stdin, the stream in agent/agent-<backend>.jsonl, the deployment record always there (so an adapter's hooks run on Codex too, HERMIT_HOOK_LOGS set), a session still running at Harbor's timeout killed with its process group. The steps after the session still run past that timeout, and keep the session's own error when the timeout lands in them; a copy that failed is dropped, never kept in part. A `<cli>_bin` serves only at the asked-for version and when the agent user may execute it. The runner reads the stream back with the same Base Agent: reply, served, the plan's or the provider's refusal, the usage at `agent.params.price`, else at the backend's price. - The adapter's tools are served from this machine on the Docker bridge's gateway (hermit.harbor.tools, every call logged); a per-task context is computed in the adapter sandbox (hermit.harbor.context); an adapter's notes come back after the session (memory/ in the log). - A key or a token reaches the container by its variable's name only (`docker compose exec -e NAME`; Claude Code's subscription token on a descriptor), never in a command line, a file, the plan or a log; Codex's ChatGPT sign-in is a file of its home there (mode 600). Codex and Claude Code run on the user's subscription (`login: chatgpt | claude`) in the plan's slots and holds, each trial noting the plan's usage (so `MAX_USED` holds trials back): a refused session again after the window, one the provider could not serve after a pause unless it ran out of the agent's time, a lost sign-in never, none once another trial halted the run; the trial's usage is every run's. Codex's refreshed sign-in comes back and becomes the shared copy. A task whose agent network is not public gets the model's and tools' hosts allowlisted and web search off; `web_search` must be set. - The answer-only agent (`cli: answer`) makes one model call through an endpoint the runner serves and writes the answer into the container (LAB-Bench's questions); a request still in flight when the trial ends is given up, its cost unknown, and on a model a CLI reaches on a login the trial waits for that plan first (a request the plan held past the agent's time is infra, `usage_limit`). A question or attachments it cannot read fail the launch. - The judge scores the verifier's reward whenever the verifier gave one, a timeout or an agent error included (Harbor's own mean), says "passed" at `pass_reward` (null for a score scale) and leaves out what `verifier_redact` matches. Not the agent's result, so unscored (infra): a verifier whose tools never downloaded or that hit a full disk, harborside's launch failing (HermitLaunchError, the CLI's install included), a session that never started or whose tools never came up, a lost sign-in, a Claude Code, Pi or OpenCode session or an answer request the provider refused for the run's configuration before serving any (its key, model, bill or a setting it does not take: `model_rejected`, no halt), a task Harbor runs for none of Hermit's agents (MCP servers, a skills folder, a Windows container: `unsupported_task`, never handed to Harbor; the set's other tasks run). A trial out of the agent's time is the agent's even after a provider notice, and so is a request refused for its input; the adapter's context over the CLI's limit beside the image's own is the adapter's 0, and so is a session the model's safeguards ended. With `verifier_timeout: agent` (a verifier that times the agent's solution, as AlgoTune's does) a verifier out of its time is the agent's result, and Continual Harness's Refiner reads it as that, not as a session past its clock. - Startup refuses what every trial would: a login for another CLI, a login and a binding at once, a loopback model, a missing key or sign-in, a non-Docker environment for secrets by name, a plan the Base Agent cannot render (mini-swe-agent's: web search, a model class Hermit does not read), a `harbor` that is no executable file, mini-swe-agent without its package for a run that deploys adapters, the answer agent's attachments on a model a CLI reaches. Harbor's own claude-code gets a bound model's Messages API root (it was sent to /v1/v1/messages), keeps Harbor's per-task web rule unless `web_search` is false, and is r 10000 efused the subscription (`CLAUDE_FORCE_OAUTH`, or the subscription's token as its only sign-in). - `python -m hermit.harbor.dataset prepare` makes an example's data from its benchmark file's `dataset:` block (the registry's tasks, rows, splits, smoke rows, a patch, the images' sizes with `image_sizes: true`, a lock). A download is moved into place only once whole, and what is in its way is refused first; a relative `data:` is the benchmark file's folder's. The lock and the download record the tasks' source (a download of another source is never reused, and the default data directory is the source's own); the lock holds no path of this machine and hashes only a mode's executable bit (one written under a umask other than 022 needs writing again); an unreadable lock is refused unless `--force`. - Also, from the Terminal-Bench 2.1 runs: a host failure (Docker's, the host's /tmp full) is infra and no trial starts while /tmp is short; the trial of a task whose name is longer than 32 characters is found; a `harbor run` past its wait budget is killed and its trial's compose projects, the verifier's too, taken down by name alone (no compose file or `COMPOSE_*` variable read). A stream's step runs its own plan, its verifier read as a trial's; each `hermit eval` repeat and each run gets streams of its own, stopped when the run ends unless a `hermit train` may resume them. The trial cache keys the launch, the whole row, the task's files, the model's price and the adapter as deployed (a file's executable bit, not the bits a umask sets; not the adapter's card, which no deployment copies, so a final adapter tested again meets its trials); a cached trial costs nothing again; a training run's trials are its own (only the run, resumed, meets them) and each epoch's too, a row asking for a new run (run_agent's, a task a split names twice) is neither taken nor kept, and `hermit check`'s probe neither takes one nor keeps one. The benchmark file's price applies to its own model, and a model the config gives as an endpoint mapping keeps its own price. - OfficeQA's Harbor judge reads the final message from HermitCodex's stream (`agent-codex.jsonl`): a task set built before needs building again. - Docs and CHANGELOG for the whole change (the framework's task, configuration and command pages; the methods' pages; the Breaking entries: the runner's `codex_login` is gone, `login: chatgpt`; a table CLI's trial needs `web_search`; secrets by name run on local Docker only). Checked in real containers on this machine, each run a `hermit eval` of a config for it alone: Codex on the ChatGPT login (no adapter; tasks with an open and a closed network; the adapter's MCP tool, AHE's hooks, Continual Harness's notes, ASPIRE's template) and Claude Code on a subscription token (an instruction that begins with `/`, the MCP tool, AHE's hooks); Pi, OpenCode, dsh and mini-swe-agent on a scripted model; the answer agent; a three-step stream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The post-PR audit of this PR's 2d9401c found one high issue and six medium ones, and the audit of #106's 3aa0cc2 one medium issue in this PR's code; each is fixed here, and so are five of the low ones. - Claude Code on Anthropic's own API with a key (`acting_agent: {cli: claude}`, `anthropic/<model>`, no login) started every session without a token: the launch script exported the plan's empty ANTHROPIC_API_KEY before ANTHROPIC_AUTH_TOKEN read the key from it. A variable the plan passes under another name is now set first, in one export that reads every source as Harbor passed it; a source no entry sets is unset, and the plan's own variables come after. - A Harbor halt (a lost sign-in, an API account's usage limit) ends `hermit train` unfinished at the step that met it, before its learner (after the learner's call when a run of `run_agent`'s met it), and a resume runs that step again: before, every later rollout came back infra/halted while the learner went on, and the run ended as finished. - Whether the provider could not serve a Codex session is read from its last failure since the session last worked, never from a warning of Codex's (the trust it gives a deployment's hooks), and a turn that failed, or a stream that ended, while Codex retried its requests is one it could not serve, unless the sign-in was lost: Codex 0.164 that cannot reach chatgpt.com fails its turn with `workspace routing discovery failed`, which the last-failure rule had made the agent's empty answer. Codex 0.164's own words for a lost sign-in are matched. - A ChatGPT sign-in a session hands back replaces the shared copy only as a later, well-formed refresh: a regular file of at most 64 KiB (a container's larger one is never downloaded) holding its refresh and access tokens, for the copy's account, stamped after the copy and at most a minute ahead of this machine's clock (an hour where the clock may differ). Harbor no longer gets CODEX_FORCE_AUTH_JSON or CODEX_AUTH_JSON_PATH from the user's environment. - Only a pipeline that keeps its trials by row (a Harbor task set with `trial_cache` on, in the config or its benchmark file: isolate.keeps_trials) is handed rows naming their epoch or asking for a new run; no record keeps `epoch` or `fresh` (rollout.TRIAL_KEYS), so the learning material's `input` and every learner's text of a task are the same in each epoch, and the adapter's per-task context gets the task's own row. - A Harbor trial is scored as Harbor grades it: a verifier that left no reward Harbor could read or ran out of its time (`verifier_timeout: agent`, now the default; `infra` the opt-in for a host whose load makes verifiers time out), and a request of one of Harbor's own agents that the provider refused for what it held, are the agent's result, 0 without a reward, unless the verifier's output shows its tools never arrived or the host's disk full; a provider that could not serve, or refused the run's configuration, stays infra (Hermit runs it again, where Harbor grades it). An OSError on this machine while the adapter is staged is infra (`staging_failed`); the adapter's own deployment or per-task context failing stays the agent's 0, since what its child process prints could be the adapter's words. A verdict that quotes the verifier's output applies `verifier_redact`. - `dataset prepare`: a patched set is its patch's own. The download record names the patch (its hook and its file's digest), a reuse of another source's or another patch's tasks is refused before the patch runs, the default data directory is named by the patch too (an unpatched set's name as before), and a download is patched in its own folder before it is moved into place. - The AHE Adapter's learners' clocks (`evolve_timeout_s`, the Agent Debugger's `timeout_s`) are the Base Agent's own, counted from the CLI's start: a wait for the login's plan or a session slot pauses them instead of spending them (a hold longer than a clock made the step a no-op recorded as done, or the Debugger's analyses upstream's fallback text). This reverses PR #65's choice that the Debugger's clock cover the plan wait: upstream's clocks had no plan hold to cover. `trainer.call_timeout_min` still bounds a step, waits included. - `hermit train`'s refusal of more than one epoch over a multi-step task's steps gives its true reason. Tests: test_harbor_harborside.py (every CLI's launch script on every backend run by bash, the returned files' limits), test_harbor_runner.py (grading as Harbor does, staging, redaction, the sign-in back by the environment's clock, Harbor's environment, a Codex outage), test_harbor_core.py (the rows only a trial cache is handed, the records, a halt), test_harbor_dataset.py (patched sets), test_cli_agent.py and test_base_agents.py (Codex's outcome and lost sign-in words, the take-back), tests/methods/ahe (both clocks through a real login path). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The post-PR audit of this PR's fe8c5b4 found two medium issues and eleven low ones; each is fixed here. - A step of a multi-step task whose turn cannot come ends infra (stream_order) at once and starts no driver: its stream's driver waits for a step no rollout of the runner is running (one that ended before it reached the driver, or ran in an earlier training step), or the stream has no driver and no rollout of its first step is running to start one. Every later step of the stream ends the same way, and the last of them stops the driver. Before, each waited out its turn (by default its budget for each earlier step and an hour more), holding a rollout's worker, then ended infra, so a step that failed on this machine before it reached the driver, a halt (whose resume reran a later step on a new driver at step 1) or a driver gone lost the rest of the stream after hours. The runner keeps each stream's steps in flight; StreamClient.wait_turn takes what it asks. - `trial_cache` with an answer agent on a model a CLI reaches (`model: {cli, model, login}`): the trial's key held the URL of the endpoint the run's pipeline serves the model on (its port and token, and the binding's `messages_url` derived from it), which no resumed run or other eval has again, so no trial was ever taken from the cache. The key names that model by its CLI and login. - A new stream driver in a directory that held one sets the earlier one's trial and replies aside (`earlier/<n>/`): Harbor reuses a trial's step directories, so a step of a stream run again that left no output of its own was read, and billed, as the earlier run's. - A stream driver that answers no stop within 15 minutes (hung in a step) is killed with its process group, and its trial's compose projects are taken down by name. - An OSError on this machine while a trial's job and launch are written (its job directory, the launch plan, the agent's config, job.yaml), or a stream step's launch plan, is infra (`staging_failed`), as one while the adapter is staged is: before, it raised out of the rollout, the agent's 0. - A rollout that never reached a container (a halted run's, the disk gate's, an unsupported task's, a staging that failed, a stream step its driver was never asked for) costs 0: before, its cost was unknown, which left the eval's total cost unknown. A stream step lost after its request was sent keeps an unknown cost. - The ChatGPT sign-in's take-back reads the shared copy's own stamp as any accepted copy may hold it (at most an hour ahead of this machine's clock, as one from the user's own file), never as no stamp: an earlier file a session handed back replaced a copy stamped ahead of this clock. - Codex's fall back from WebSockets to HTTPS retries nothing, so a request refused after it is the session's own failure; only its reconnects (`Reconnecting...`) are retries. - `hermit eval` of a split that names a task twice keeps a row for each, as on main (the infra reruns kept the records by id). - `<jobs_dir>/HALT` names the record's cause first (`login_failed`, `usage_limit`) and says that it halts every run on that jobs directory, as the docs now do. - The docs: a sign-in file is checked for its size before it is downloaded (one grown after the check is refused when taken back); with Harbor's retry on, a failed attempt's usage is not counted; what `staging_failed` covers. The CHANGELOG's Harbor entry is rewrapped where earlier edits had cut its lines short. Tests: test_harbor_runner.py (a stream's lost turns, at once and in order, a halt's resume, a rerun's outputs, a hung driver, a stream step's launch, a lost step's cost, the CLI model's trial key, a trial's staging, a never-ran rollout's cost, the halt file), test_harbor_core.py (a split that names a task twice), test_cli_agent.py (a copy stamped ahead of this clock), test_base_agents.py (Codex's fall back). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The post-PR audit of this PR's 3a49adc found three medium issues and fifteen low ones; each is fixed here or, where it is a limit of the design, recorded in the PR. - `trial_cache` with a model a CLI reaches: 3a49adc named that model by its CLI and login alone, so a second eval on the same jobs directory whose CLI had another effort, `bin` or version met the first one's trials. The key also holds the CLI's identity (`hermit.agent.base.endpoint.cli_identity`: its settings as its sessions get them, less where they run and log and which plan they wait for, and its binary's path, size and time of change), as a digest that hermit.isolate.agent_pipeline hands the runner (`model_cli_identity`). Harbor's `retry`, the adapter sandbox's `sandbox_enforce` and `tools_host` are in the key too. - A trial whose agent ran out of its time or exited with an error is verified by Harbor and graded: when its verifier's tools then never arrived (a 5xx of GitHub's release download) or met the host's full disk, it is infra and run again, as one whose agent finished is. Before, it was the agent's 0 and stayed in the trial cache. - Codex's words for a refresh of the ChatGPT sign-in the provider refused ("Your access token could not be refreshed [because your refresh token was already used / has expired / was revoked]. Please log out and sign in again.") are a lost sign-in: the run halts. Before, the trial kept Harbor's verdict, scored 0 and cached. A sign-in refusal counts only since the session last worked: one on a side request the session worked after is none. - `run_tasks` submits each multi-step task's steps in step order, in the places its steps had: a `run_agent` call that listed a later step first, with fewer workers than the gap, gave the stream up and lost the earlier step too. - A step whose stream aborted before its turn is never asked for (`wait_turn` checks the abort first), so it costs 0; and a trial whose environment or agent setup failed before its agent started (Harbor records no `agent_execution`) costs 0. Both had an unknown cost, which left the eval's total cost unknown. - An OSError on this machine past the guarded steps (no process left to start `harbor`, a file it cannot write or read) is infra (`host_failed`), its cost unknown, not the agent's error scored 0. A trial cache this machine cannot write leaves the trial as it ended (it stands, uncached), an entry it cannot read is no trial kept, a key whose dry render cannot be written runs the trial without the cache, a sign-in take-back that fails leaves the trial as it ended, and a HALT file it cannot write leaves the halt to the rollout's output. - A stream step run again sets the tool-call log an earlier run of it left aside (`earlier-<n>-tool-calls.jsonl`) at its turn, so its curated log holds its own calls only. - A killed stream driver's socket is removed. - Only a Harbor task set's rows name their repeat (`repeat`, with `eval.repeats` above 1), and no record's `input` keeps it; a record's `input` drops only the keys its caller added (the Trainer's `epoch` and `fresh`), so a row's own field of those names stays. Every other pipeline gets its rows and records as on main, and a Harbor adapter's per-task context never reads `repeat`. - A failed `hermit eval` removes the earlier eval's `summary.json`, as it empties `results.jsonl`. - The overlap error of a declared path names a Harbor task set's directories as such. - The docs: `solved_once` counts each test id once; the steps of `run_agent`'s call run in step order; the cost of a trial that never started an agent; `host_failed`; the Codex refresh refusal and what to do about it; a copy stamped ahead by another clock is replaced once this clock passes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The post-PR audit of this PR's e7ace26 found no high or medium issue and eleven groups of low ones; the audit of the benchmarks PR stacked on it (b709e0c) found a medium issue here and a low one. Each is fixed here or, where it is a limit of the design, recorded in the PR. - `python -m pytest` imported the files of a run's folder beside an example's configs (`examples/*/runs`, their output_dir), a task container's and a learner's files among them, and ran them on this machine outside any sandbox: the root conftest ignores them, as it ignores a Harbor task set's. - A pipeline that deploys adapters is refused at startup where bubblewrap is not installed and the adapter sandbox that renders each adapter is required (`agent.params.sandbox_enforce`): each trial ended in the sandbox's error, scored 0. - A rollout that met a halt (a lost sign-in, an account's limit) and then an OSError of this machine (its curated log not written: a full disk) came back `host_failed` with no halt, so that nothing halted where its HALT file could not be written either: it keeps the halting verdict. A jobs directory this machine cannot make is `host_failed` at a cost of 0, not an error scored 0. - A stream step whose turn never came curated the tool-call log an earlier run of it left as its own: it curates none. - A verifier's words of a full disk (ENOSPC) made a trial infra even after its tests ran: now only before its tests wrote a report (`ctrf.json`), so that a test's own output (an agent's program, a task about a full disk) stays the agent's result. - The copy-back and the collect ran as root in /logs/agent, which every user can write in, through a link the agent's user could put there, and made what it named readable to all: each makes a new folder of root's, enters it, checks that it is that folder, and works in it by relative names. - `acting_agent.env` is written into each trial's job and onto `docker compose exec`'s command line: a variable of a secret's name, or a value naming one, is refused at startup. - The `tasks` link is followed once (`tasks_dir`), so that a prepare pointing it elsewhere mid-run changes neither a trial's task set nor the key it is kept under; a task's link to a folder is in its digest by where it points. - A codex, claude or pi trial of a model a CLI reaches got the loopback refusal once the pipeline served that model: it is refused for what it is. - A row of its own `epoch`, `fresh` or `repeat` field is refused where the framework adds those keys (hermit train with the trial cache, hermit eval's repeats of a Harbor task set; hermit check says so too): they would replace it, and no record would keep it. - `dataset prepare`: a data directory that is the set's own folder in another download is that download's (its marker is beside it), refused to a benchmark of another patch; a download is marked in its own folder before the set is moved into place; an image whose size cannot be read anew keeps the earlier one; split counts are whole numbers, and a smoke task is named once; the rows, the lock, the splits and the sizes are all made before any is written, so that a refusal leaves the link and every file as they were; a `data` naming a variable that is not set is refused; this machine's errors (an OSError, Harbor's failed download) are the command's `error:`, exit 1. - An ATIF trajectory's tool-call id that is no string (a list, an object) reads as no id, never a TypeError in each learner reading the log. - Tests: a trial-cache key this machine cannot make, a sign-in take-back that fails, MWM's name of a task's record. - The docs: a command a CLI ran in a session of its own (Claude Code's shell tool) is outside the process group the kill reaches; a `timeout` or an `agent_error` scores 0 when its verifier left no reward. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The post-PR audit of this PR's b9a3d61 found no high or medium issue and four groups of low ones. Each is fixed here; its questions are recorded in the PR. - A `hermit eval` refused at its start (a row of its own reserved key, or a pipeline whose startup checks refuse it: no bubblewrap, a secret in its env) had already emptied the earlier eval's results.jsonl and removed its summary.json: the eval empties them once its pipeline and judge are built, as on `main`, and a refused start leaves them as they were. One that fails after its start still leaves no earlier summary. - `acting_agent.env`'s secrets are read as Harbor fills its values: `${NAME:-default}`, which Harbor fills in from this process's environment, is refused like `${NAME}` (it got through), and a referenced name is a secret's by the rule the variable's own name is (`launch.SECRET_VAR`), so that a setting named like one (`${TOKENIZERS_PARALLELISM}`) is no longer refused. `$NAME`, which Harbor hands on as that text, is still refused where it names a secret, as it never passes the secret the config meant. - `hermit check` refuses a test row's own `repeat` wherever `hermit eval` of the config would (a training config's eval too), by eval's own rule (`_harbor_rows`), and a test now covers it. - Tests: an unused fixture, a temporary directory outside the test's own `tmp_path`, blank lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
Everything in hermit/ outside hermit/harbor/ is back at main (e813538): the three agent layers, the Trainer, hermit eval, hermit check, the configuration, the sandbox, the methods and the hosts, but one change. Pi's and dsh's prepare take serve_tools, as the other four hosts already do, so that a trial gets the adapter's tools from the runner. hermit/harbor/FRAMEWORK_SUPPORT.md lists where each of Harbor's needs now lives, and what could later become framework support. What a Harbor task set now meets: - A trial that is not the agent's result (infra) runs again in the runner (agent.params.infra_retries, 2; infra_wait_s, 300 s). One still infra is refused by the judge, so the run records a failed run (judge_error): hermit eval counts it among its errors and as 0 in its mean. python -m hermit.harbor.report gives pass@1 over the trials that are the agent's result. - A lost sign-in, or an API account's usage limit, raises LoginFailed, which ends hermit train and hermit eval as a local session's does. There is no HALT file. - There is no trial cache; agent.params.trial_cache is refused. - A multi-step task's stream is the runner process's own and is never resumed; a split keeps its steps in order (data.shuffle: false). - A Codex trial's lost sign-in and provider outage are read in hermit/harbor/signin.py (the outage by the session's last failure, so a reconnect Codex recovered from is no outage). - The answer agent's model that only a CLI reaches is given in the benchmark file; a run config's own is refused at startup. - A trial's log keeps the CLI's stream, task.md, prompt.txt, last_message.txt and the hook files at its top, where the methods read a local session's. Fixes of the last audit (of 418a00d): a stream's step gets the sign-in at its turn, not when its rollout began; acting_agent.env secrets are named by Harbor's own rule; each step's allowed hosts reach the driver; the answer agent waits for its plan's window; a long task name's verifier containers are found as Harbor names them; a dataset's digest takes a link as the link itself, not the file it points to. Tests of the reverted code are back at main; the Harbor tests cover the new code. Docs and the changelog describe the PR as it is now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The first audit of the rework (2b2a46b) found no high issue, three medium and six low; a second audit of those fixes found no high issue, five medium and ten low. Each is fixed here, in hermit/harbor/, its docs and its tests, or recorded as a candidate where the fix is main's. - An adapter whose own deployment or per-task context fails in its child process is the agent's result: agent_error (adapter_failed), scored 0 with its message as the feedback, which `python -m hermit.harbor.report` counts among the scored trials. It left the pipeline as an exception before (status error), outside pass@1. - A stream's step that ends in any way before its driver is asked for it (its staging, its adapter, its tools, its launch plan, the disk gate, its turn's wait running out, its turn's sign-in or tools not readied, an exception of any of them) gives the stream up, so its driver is stopped once the stream's rollouts end, that step's own when it is the last, and the stream's next pass (an eval's next repeat, a later epoch) starts from its first step in a new environment. Before, the driver stayed up for a step that never came: the next pass's first steps ended stream_order and its last ran on the environment the pass before had left. A step the driver already ran gives nothing up. A later step of a stream with no driver and no rollout of its first step ends before anything is staged or served for it. - A runner's unfinished streams are closed by its finalizer, when the runner is freed and at exit for one still held then. Before, a weak set of runners was closed at exit, and a runner freed before then (`hermit check`'s probe, `hermit eval` once it returned) left its drivers up for stream.idle_s. - The docs say what a resumed `hermit train` does to a stream under way (its remaining steps in that epoch end stream_order, and the stream starts over at its first step's next rollout), and what an Evolver's run_agent of a stream's first step does once the Trainer's pass of it finished: it starts a pass the next epoch inherits. - A request the provider refused for the run's configuration (model_rejected) is not run again (NO_RETRY), and NO_RETRY is tested with runs again allowed; nor is a host failure past the trial's staging (host_failed, whose session may have run), which the docs now say. The `halted` cause, which nothing gives any more, is gone. - Codex: a session the provider refused for the run's configuration or bill (a 400, 402 or 404 Codex does not retry, an API account's quota) is model_rejected, as the other CLIs' are, never the agent's 0. Its usage limit is read from Codex's own notices, never from what its log quotes of the session's work, and a JSON line its log quotes no longer ends the record. A session that failed on its own after a reconnect Codex went on from, or whose response the provider's content filter ended, is no outage. - The answer agent's model a CLI reaches: its sessions run with plan_rerun off, so that a session the plan refused comes back at once (infra, run again once the plan allows) instead of waiting for the window inside the agent's time and scoring as the agent's timeout; its sign-in is checked at startup; its CLI sessions get main's check that the user's own secrets are absent (HOME_SECRETS). The runner refuses a run config's own `{cli}` model for the answer agent as written, as `hermit check` hands it, as well as the endpoint spec `hermit eval` and `hermit train` hand it, whose test builds it with main's endpoint_spec. - The docs say that `hermit check` builds the runner and reports its startup refusals, and that every run of Hermit's agents needs bubblewrap, a baseline's too (the runner cannot tell a run that deploys no adapter), unless sandbox_enforce or HA_ADAPTER_SANDBOX_ENFORCE says best_effort. - The report says when an eval did not finish: no summary.json beside its rows, one that is not of them (its count of trials, of failed runs or its mean score differ), or a last row cut off, which is left out. It reads the summary, never the files' times, which a copy changes. The docs say that a stopped eval writes no row of the repeat it stopped in. - A plan refusal's hold gets the run's stop, so that a hold that cannot be written waits no longer than the run. The docs record that trials racing on one ChatGPT copy for its refresh end the run: the loser's refusal reads as a lost sign-in. - FRAMEWORK_SUPPORT.md names the four private helpers of main that hermit/harbor/ uses, and more candidates: a trial's usage when LoginFailed ends the run, the run's own secrets for the answer agent's sandbox, public names for those helpers, rows that say who runs them (run_agent's or the Trainer's), the `login: claude` check of `hermit train`, RRSI's halt file. The docs no longer say a trial a lost sign-in ended keeps its runs' usage, and bind_agent_params is named right. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
The audit of e19d155 found no high issue, two medium and twelve low, and asked eleven questions. Each is fixed here, in hermit/harbor/, its docs and its tests, or recorded as a candidate where the fix is main's. - Pi's and dsh's trials get the backend's developer_role, as Hermit's own sessions do: the spec the config's loading keeps drops it (Binding.spec), so the runner takes the backends registry's for a backend it names at the same URL. A test compares a trial's provider settings with main's bind_agent_params on Fireworks (developer_role: system). - `hermit check` and `hermit train` check a Harbor run's acting model as a chat client's, main's rule for an agent it does not know: they refuse Claude Code on Anthropic's API, which `hermit eval` runs, and do not check that Codex's backend serves the Responses API. The docs say so, and candidate 7 names the cause in main. - On a login, busy_retries is one count over all of a trial's runs: infra_retries no longer multiplies it (up to 12 runs by default, where the docs said 4). A plan refusal of the answer agent's model runs the trial again once the plan allows, not counted in infra_retries. - A staging or per-task-context child that failed is the host's failure (staging_failed, run again), not the adapter's 0, when this process sees this machine fail any adapter's staging there: a folder it cannot write, less than 64 MB free, the strict adapter sandbox not starting. Startup refuses a runner whose bubblewrap cannot start that sandbox. - A trial's launch plan refused for what its adapter is (its tools beside text_only, a dsh server name made of a long id) is adapter_failed, scored 0, for a trial and for a stream's step; with no adapter it is still the config's error. - A provider that does not bill the account (a 402, its quota or credit spent) ends the run, as an API account's usage limit does. Before, every later trial ended model_rejected. - acting_agent.settings.env refuses a secret's $NAME inside a value by every rule (AUTH, PASSWD, Harbor's), and a secret's value written as it is. `effort: off` gives no effort flag, as on main. - The answer agent writes answer.json as a new file renamed into place, never through a link the container left there. Codex's auth.json is removed from the container once it has been copied back, before a verifier that shares the container runs. - The curated log's top stream is the one the launch plan names. The report adds a note when results.jsonl was written after summary.json, as by an eval stopped beside an earlier summary. The runner's finalizer gives each driver 2 minutes (CLOSE_STOP_S) before it kills it. - Tests for each fix above. They also catch four mutations no test caught before: the turn's sign-in copy, the first give-up reason, Codex's outage reading, and the report's errors comparison. - Docs that did not match the code: what `hermit eval` reads of a config made for it alone, the causes never run again, only a first step starting a finished stream over, the CLI Evolvers' run_agent, the stream socket's path, split files with more than one rollout, Harbor's own usage-limit error, when the `login: claude` warning fires, a quoted line in Codex's own form, the relay's sandbox, the deployment record's host paths, and hermit check's probe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
Main has gained Hermes Agent as a CLI Base Agent (#107, 616e818) since this PR's base, e813538. In the rebase, each conflict keeps both sides: #107's Hermes in the docs' lists and tables of CLIs, and this PR's Harbor beside it. A Harbor trial does not run Hermes: the runner refuses `acting_agent.cli: hermes` at startup, as it refuses any CLI with no HermitXXX class, which a new test holds. The docs now say so (the acting agent's row in docs/framework/task.md, the CHANGELOG entry), and FRAMEWORK_SUPPORT.md counts five other hosts that take `serve_tools`, Hermes's among them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
… gate held The round-11 audit of a332854 found no high or medium issue; these are its low ones and what its questions found. - A Pi or dsh trial's developer_role is the backends registry's only for the backend the registry has at the trial's URL (launch._with_role): the run config's `backends:` is not the runner's to read, where Hermit's own sessions take it. FRAMEWORK_SUPPORT.md (candidate 14), docs/framework/task.md and the changelog said the trial got what Hermit's sessions get; they now say where it does not, and a test holds the URL check, on both of the spec's paths. - acting_agent.settings.env refuses a value given as it is to a variable a word of whose name is a secret's wherever the word stands (HF_TOKEN_READ, OPENAI_API_KEY_2, SECRET_ID), not only at the name's end (launch.SECRET_VAR); a word that only holds one (GIT_AUTHOR_NAME, TOKENIZERS_PARALLELISM) is no secret. A test now holds Harbor's part of the rule for a `$NAME` inside other text ($OAUTH_CLIENT_ID). - The verdict of a trial, or of a stream's first step, that a disk gate held back na 10BC8 mes the gate that held it, the host's /tmp or Docker's data root; it named the data root whichever held it. - Tests for what none caught: the answer agent's relay's 402 whatever its words, the stop a runner's close gives each driver (CLOSE_STOP_S), a job folder this process cannot write (the host check after a failed staging child). - docs/framework/task.md says what the questions found: a login's wait for its plan has no bound, a request the plan held back at any time makes its timed-out trial infra, a refused session runs again as often as the plan refuses, the host check comes after the staging child, and N hung drivers hold a close up N x 2 minutes. The changelog's Codex refusal no longer reads as every 400 or 404. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
e19d155 to
6a79375
Compare
d647693 to
cb7184e
Compare
…ls for good The audit of 6a79375 found one high and four medium issues and fifteen low ones. This fixes the high and medium ones, and fourteen of the low ones (one is in the PR's description); the last is noted there. - High: a stream's next pass (an eval's next repeat) could meet the driver of the pass before in the half second between its last answer and its exit, take it for a live one, and lose the whole pass. The driver's record now says it is ending before its last answers (harborside.driver._mark_ending); StreamClient.running takes neither such a driver nor one killed and not yet reaped, and ensure() waits up to 30 s for an earlier driver to exit, then kills it, before it starts the next. - Medium: a step whose own folder this machine cannot make now gives its stream up (host_failed), so its driver is stopped and the next pass starts anew. Before, the driver waited for that step, and the next pass ran its last step on the old environment. - Medium: a step's curated log walks the agent's folders through open directory handles and opens each entry with O_NOFOLLOW (curate._files, and open_regular for the files at its top). A link that a process the agent left running swaps in while the stream's environment stays up is never followed, and a file gone meanwhile is left out without an error. - Medium: Codex's refusals for good are read in its own words: a provider's error body Codex passes on as it is, "model is not supported", and its plan refusals (a workspace out of credits, a spend cap, a plan without Codex). The plan refusals end the run, as a 402 does. - Medium: the answer agent's relay reads a 429 for a spent quota (OpenAI's insufficient_quota, as its code or its type) as the bill's refusal, which ends the run, not as an outage that runs again. - Low: - A relayed Codex session that main's reader leaves a 502 but whose stream says it was refused for good is a 400 with Codex's words. - The disk gate's verdict names the room for the task's image and for other trials' pulls, and a stream's first step keeps room for its image until its environment is up. - A step waits for its turn over the earlier steps' own budgets. - Refused at startup: a benchmark file's {cli} model without a login, which the runner cannot bind, and a login in acting_agent.settings. - A relative mini-swe-agent settings.config is read beside the params, as the runner's other paths are. - The texts on the line reader, the secret-name rules and their tradeoff, the time a kill takes at exit, the answer agent's effort, and a Harbor Claude session's token (on a descriptor). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
…hods Terminal-Bench 2.0, SWE-bench Verified, AlgoTune, Terminal-Bench-Science and LAB-Bench FigQA through Harbor, each a benchmark file (the registry's task set, locked), a baseline per profile (Codex with GPT-5.6-Luna on a ChatGPT login, Claude Code with Claude Haiku 5.5 on a Claude subscription) and the method whose paper's protocol fits it: the AHE Adapter on Terminal-Bench 2.0 in the AHE paper's in-sample protocol, trained on each task's rollouts #1 and #2 and tested on #3 and #4; its final adapter, frozen, on SWE-bench Verified and Terminal-Bench-Science against AHE's seed; SkillOpt in its paper's protocol on AlgoTune, a trial scored 1 - 1/speedup so that the mean gives AlgoTune's harmonic mean (a success, by which SkillOpt's analysts and slow update sort the rollouts, a solver faster than the reference), and on LAB-Bench FigQA, whose download is patched: the published tasks save the shuffle's seed where the agent reads it, which gives the answer away, and their verifier runs a script the agent can rewrite. LAB-Bench's test questions whose figure no training question has are listed for a second score from the same trials (utils/figures.py reads an eval's results). Every run is the framework's own commands on a config, as on main: a baseline is a config for `hermit eval` alone (`--adapter none`, or an adapter directory: a transfer's, or AHE's seed as the template's directory), whose training keys are placeholders (its Evolver, `eval-only`, one that `hermit train` does not find); a method is `hermit train` and then `hermit eval --adapter final` (and `--adapter root` for its seed or empty skill where no baseline tests it, an adapter of the same run's tree); a whole benchmark's test is an override of the same config (`data.test=../utils/splits/all.txt` with its own run name). An eval's number is the pass@1 that `python -m hermit.harbor.report` gives over the trials that are the agent's result: #105's runner runs an infra trial again, then records a failed run, 0 in `hermit eval`'s mean. AlgoTune's harmonic mean and LAB-Bench's second score read the rows the same way, and say when an eval did not finish. No trial is taken from an earlier run: there is no trial cache. SkillOpt's configs give its analysts no Codex trace summary (it describes SkillOpt's own harness). Every learner on a login waits for the plan's window (`plan_max_wait_s: null`); AHE's learners' clocks count the wait, as on main. examples/README.md says what a machine needs (bubblewrap for every run, a baseline's too) and lists every run with its trials, to be handed out; examples/conftest.py keeps `python -m pytest` out of a prepared task set and a run's `runs/`, and examples/.gitignore keeps the task sets' links out of git; tests/core/test_harbor_examples.py holds the protocols to the committed files (every learner's wait for the plan among them), loads every config as its command does (a baseline's refused by `hermit train`) and builds #105's runner from each config's settings, its startup checks included (this machine's sign-in and bubblewrap stood in for). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP
cb7184e to
d8496e4
Compare
… and stop - build_tasks.py imports task_text from utils/task.py (the module it named is gone) - Claude Code on a backend that needs no key gets its placeholder token - the answer agent's Codex model has web_search off unless given - a row without an instruction gets Harbor's instruction for its context - a benchmark's patch is loaded without writing __pycache__ beside it - a launch's plans folder is the user's only (0700) - curate opens a reward file and hermit-copy/memory without following links - an answer trial whose agent sent no request costs 0, not unknown - a spent quota ends the run even when the agent's time ran out Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing commands and configs (#105) * Shared layers: a Harbor trial of any CLI is deployed, bound and read as Hermit's own sessions are What the Harbor runner needs of the layers every method shares, so that a trial in a task's container is one more session of the CLI's Base Agent: - The hosts deploy for a caller that serves the adapter's tools itself (`--no-serve-tools` on every host; Pi's and dsh's `prepare(serve_tools=False)` names no server, and the acting agents' workspace now passes the flag on, so a container session of Hermit's own runs gets no server row it cannot start) and take one task's context (`--context-file`). - Every CLI Base Agent reads a stream its caller read elsewhere: `outcome()` with no stream file reads the stream's text as it reads the file, the reply included; a missing or empty stream is a session not served, never a TypeError. - A Codex session whose sign-in or key the provider refused is `login_failed` (the run stops) if its turn did not complete, read from its own notices: never one it recovered from, what its log quotes of the session's tool calls, or an event's text (U+0085, U+2028 and U+2029 end no line of a stream); `unavailable` comes from its last failure. Codex's records are read with span prefixes too (`RUST_LOG=codex_core=info`). - hermit.agent.base.trajectory, the AHE Debugger, Harness²'s bench, RRSI's render and SkillOpt's Codex trace read a Harbor trial of any CLI (`agent/agent-<backend>.jsonl`, then Harbor's own output files, then its ATIF trajectory, which the Debugger takes before those files), and AHE's texts (EVOLVER.md's too) name that trial's files (the stream, hook audit and state under agent/; the record's instruction, as the Debugger's `task0i.md`; START.md's tree). Harness²'s bench takes a Claude Code trial's final message as the Base Agent reads its reply. MWM counts a learner session's turns and actions from the events the common reader reads (a line of the CLI's own that is no JSON object, or an event holding U+2028, no longer fails the step) and finds a task's record by the material's own file name. - A Harbor acting agent's model is bound and checked in the acting CLI's dialect (`agent (harbor, <cli>)`, an endpoint's too), the whole Binding spec kept, developer_role included, and its login is a contained session's (logins_of) unless `claude_bin` names this machine's Claude Code, whose version is then checked; the task set's benchmark file counts for both, as the runner merges it (relative to `normalize_config`'s `base`, else the working directory). hermit.harbor.clis is the table of those CLIs. - A client of a CLI's chat endpoint counts what a session that failed or that the provider refused used, which the endpoint reports in its error body (ChatClient's `count_error_usage`, set by `endpoint_spec`). tests/selection.py counts the recorded OpenCode and dsh streams as shared: the methods' tests read them too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Core: infra runs, configs for hermit eval alone, and a multi-step task's steps in order What a Harbor task set needs of the framework's own commands and configuration. There is no new way to run: training is `hermit train`, testing is `hermit eval --adapter ...`, each set by the run's YAML and overrides as before. - A run that is not the agent's result (`RunOutput.extra["unscored"]`: a Harbor trial of status infra) has status `infra`: never judged, its score null in steps.jsonl, left out of the Trainer's and `hermit eval`'s means and counted (`unscored`, in the summaries, the learning material and the card). `eval.infra_retries` and `eval.infra_wait_s` make `hermit eval` run such rows again, except a multi-step task's step rows, a task Harbor runs for none of Hermit's agents (`unsupported_task`) and any after a halt (a lost login, a usage limit). - `hermit eval` needs only what it reads (`data.tasks`, `data.test`, the agent, the judge): a config with no `data.train`, such as a baseline's, needs no template or Evolver; `hermit check` checks it as `eval` runs it (its probe on a test row), `hermit train` refuses it, and its run name is the config file's when `trainer.run_name` gives none. An adapter of the run's tree (`final`, `root`, a tag, a commit) needs that tree: without one, `eval` refuses it before any run. The `eval` section is checked where an eval runs. - With `eval.repeats` above 1, each repeat hands the pipeline copies of its rows that name it (`repeat`), so that a pipeline that keeps its trials by row (Harbor's trial cache) runs each repeat anew; results.jsonl names the repeat. With `trainer.epochs` above 1 each epoch's rows name the epoch (`epoch`), and the rows `run_agent` runs, and those of a task the epoch's order names twice, ask for a new run (`fresh`): such a pipeline runs each anew, an epoch on an adapter the one before left unchanged included, where it would have handed back the earlier trial. - A multi-step Harbor task's steps run in order in its stream: `data.shuffle` moves its rows as one; a split whose order is kept (the train split with `data.shuffle: false`, the test split, the validation split) that lists a step ahead of an earlier one, or without every earlier one, is refused before any run, and `hermit check` reports it; `next_tasks` may name a step only after the earlier ones; `run_agent` runs no training row that is such a step, and an id it does not run comes back as an error result (score 0), no longer an exception; Harness² fails such a step before any editor session, and records an infra execution's cause beside its null score. A run runs each step of a stream once, in one environment: a train split with such steps trains one epoch (`hermit train` refuses more, and `hermit check` reports it). `hermit check` checks the test split's order for a training config too, and its probe runs no later step. - The Harbor task set's tasks and jobs directories, and an eval config's tree, are run secrets. The Harbor agent is told what its streams are named for (`run_identity`: a training run's record directory and the id it keeps there, any other pipeline its own), whether they are kept for a resume (`keep_streams`: the Trainer's pipeline only, until the run finishes), the run its trials are kept to (`trial_scope`: the Trainer's pipeline only, that identity), whether the run deploys adapters, and the CLI and login of a model only a CLI reaches; `hermit check`'s probe takes no trial from the trial cache. - An acting agent of Harbor's own takes no adapter: `hermit train` refuses it, `hermit eval` runs it with `--adapter none` only, and `hermit check` reports it for a training config. tests/core/test_harbor_core.py covers these. What this commit hands the Harbor agent, the next commit's runner takes: three of these tests (Harbor's `dataset prepare`, and a pipeline closing its HarborAgent with its streams) pass from there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Harbor: every CLI in the task's container from one launch plan, with the adapter's tools, context and notes A Harbor trial ran only Codex well (and Claude Code through code of its own); the adapter's tools, a per-task context and an adapter's notes never reached the container, and infra trials counted as zeros. Now: - One HermitXXX class per CLI (hermit.harbor.clis: codex, claude, pi, opencode, dsh, mini-swe-agent) over one executor (harborside/hermit.py). Hermit's side renders each trial's session with the CLI's own Base Agent (hermit.harbor.launch: the home, the command, the environment; host paths made the container's) against the adapter deployed as `hermit deploy` lays it out, and harborside uploads and runs it as the task's agent user: the prompt on stdin, the stream in agent/agent-<backend>.jsonl, the deployment record always there (so an adapter's hooks run on Codex too, HERMIT_HOOK_LOGS set), a session still running at Harbor's timeout killed with its process group. The steps after the session still run past that timeout, and keep the session's own error when the timeout lands in them; a copy that failed is dropped, never kept in part. A `<cli>_bin` serves only at the asked-for version and when the agent user may execute it. The runner reads the stream back with the same Base Agent: reply, served, the plan's or the provider's refusal, the usage at `agent.params.price`, else at the backend's price. - The adapter's tools are served from this machine on the Docker bridge's gateway (hermit.harbor.tools, every call logged); a per-task context is computed in the adapter sandbox (hermit.harbor.context); an adapter's notes come back after the session (memory/ in the log). - A key or a token reaches the container by its variable's name only (`docker compose exec -e NAME`; Claude Code's subscription token on a descriptor), never in a command line, a file, the plan or a log; Codex's ChatGPT sign-in is a file of its home there (mode 600). Codex and Claude Code run on the user's subscription (`login: chatgpt | claude`) in the plan's slots and holds, each trial noting the plan's usage (so `MAX_USED` holds trials back): a refused session again after the window, one the provider could not serve after a pause unless it ran out of the agent's time, a lost sign-in never, none once another trial halted the run; the trial's usage is every run's. Codex's refreshed sign-in comes back and becomes the shared copy. A task whose agent network is not public gets the model's and tools' hosts allowlisted and web search off; `web_search` must be set. - The answer-only agent (`cli: answer`) makes one model call through an endpoint the runner serves and writes the answer into the container (LAB-Bench's questions); a request still in flight when the trial ends is given up, its cost unknown, and on a model a CLI reaches on a login the trial waits for that plan first (a request the plan held past the agent's time is infra, `usage_limit`). A question or attachments it cannot read fail the launch. - The judge scores the verifier's reward whenever the verifier gave one, a timeout or an agent error included (Harbor's own mean), says "passed" at `pass_reward` (null for a score scale) and leaves out what `verifier_redact` matches. Not the agent's result, so unscored (infra): a verifier whose tools never downloaded or that hit a full disk, harborside's launch failing (HermitLaunchError, the CLI's install included), a session that never started or whose tools never came up, a lost sign-in, a Claude Code, Pi or OpenCode session or an answer request the provider refused for the run's configuration before serving any (its key, model, bill or a setting it does not take: `model_rejected`, no halt), a task Harbor runs for none of Hermit's agents (MCP servers, a skills folder, a Windows container: `unsupported_task`, never handed to Harbor; the set's other tasks run). A trial out of the agent's time is the agent's even after a provider notice, and so is a request refused for its input; the adapter's context over the CLI's limit beside the image's own is the adapter's 0, and so is a session the model's safeguards ended. With `verifier_timeout: agent` (a verifier that times the agent's solution, as AlgoTune's does) a verifier out of its time is the agent's result, and Continual Harness's Refiner reads it as that, not as a session past its clock. - Startup refuses what every trial would: a login for another CLI, a login and a binding at once, a loopback model, a missing key or sign-in, a non-Docker environment for secrets by name, a plan the Base Agent cannot render (mini-swe-agent's: web search, a model class Hermit does not read), a `harbor` that is no executable file, mini-swe-agent without its package for a run that deploys adapters, the answer agent's attachments on a model a CLI reaches. Harbor's own claude-code gets a bound model's Messages API root (it was sent to /v1/v1/messages), keeps Harbor's per-task web rule unless `web_search` is false, and is refused the subscription (`CLAUDE_FORCE_OAUTH`, or the subscription's token as its only sign-in). - `python -m hermit.harbor.dataset prepare` makes an example's data from its benchmark file's `dataset:` block (the registry's tasks, rows, splits, smoke rows, a patch, the images' sizes with `image_sizes: true`, a lock). A download is moved into place only once whole, and what is in its way is refused first; a relative `data:` is the benchmark file's folder's. The lock and the download record the tasks' source (a download of another source is never reused, and the default data directory is the source's own); the lock holds no path of this machine and hashes only a mode's executable bit (one written under a umask other than 022 needs writing again); an unreadable lock is refused unless `--force`. - Also, from the Terminal-Bench 2.1 runs: a host failure (Docker's, the host's /tmp full) is infra and no trial starts while /tmp is short; the trial of a task whose name is longer than 32 characters is found; a `harbor run` past its wait budget is killed and its trial's compose projects, the verifier's too, taken down by name alone (no compose file or `COMPOSE_*` variable read). A stream's step runs its own plan, its verifier read as a trial's; each `hermit eval` repeat and each run gets streams of its own, stopped when the run ends unless a `hermit train` may resume them. The trial cache keys the launch, the whole row, the task's files, the model's price and the adapter as deployed (a file's executable bit, not the bits a umask sets; not the adapter's card, which no deployment copies, so a final adapter tested again meets its trials); a cached trial costs nothing again; a training run's trials are its own (only the run, resumed, meets them) and each epoch's too, a row asking for a new run (run_agent's, a task a split names twice) is neither taken nor kept, and `hermit check`'s probe neither takes one nor keeps one. The benchmark file's price applies to its own model, and a model the config gives as an endpoint mapping keeps its own price. - OfficeQA's Harbor judge reads the final message from HermitCodex's stream (`agent-codex.jsonl`): a task set built before needs building again. - Docs and CHANGELOG for the whole change (the framework's task, configuration and command pages; the methods' pages; the Breaking entries: the runner's `codex_login` is gone, `login: chatgpt`; a table CLI's trial needs `web_search`; secrets by name run on local Docker only). Checked in real containers on this machine, each run a `hermit eval` of a config for it alone: Codex on the ChatGPT login (no adapter; tasks with an open and a closed network; the adapter's MCP tool, AHE's hooks, Continual Harness's notes, ASPIRE's template) and Claude Code on a subscription token (an instruction that begins with `/`, the MCP tool, AHE's hooks); Pi, OpenCode, dsh and mini-swe-agent on a scripted model; the answer agent; a three-step stream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Review fixes: the post-PR audits of 2d9401c and 3aa0cc2 The post-PR audit of this PR's 2d9401c found one high issue and six medium ones, and the audit of #106's 3aa0cc2 one medium issue in this PR's code; each is fixed here, and so are five of the low ones. - Claude Code on Anthropic's own API with a key (`acting_agent: {cli: claude}`, `anthropic/<model>`, no login) started every session without a token: the launch script exported the plan's empty ANTHROPIC_API_KEY before ANTHROPIC_AUTH_TOKEN read the key from it. A variable the plan passes under another name is now set first, in one export that reads every source as Harbor passed it; a source no entry sets is unset, and the plan's own variables come after. - A Harbor halt (a lost sign-in, an API account's usage limit) ends `hermit train` unfinished at the step that met it, before its learner (after the learner's call when a run of `run_agent`'s met it), and a resume runs that step again: before, every later rollout came back infra/halted while the learner went on, and the run ended as finished. - Whether the provider could not serve a Codex session is read from its last failure since the session last worked, never from a warning of Codex's (the trust it gives a deployment's hooks), and a turn that failed, or a stream that ended, while Codex retried its requests is one it could not serve, unless the sign-in was lost: Codex 0.164 that cannot reach chatgpt.com fails its turn with `workspace routing discovery failed`, which the last-failure rule had made the agent's empty answer. Codex 0.164's own words for a lost sign-in are matched. - A ChatGPT sign-in a session hands back replaces the shared copy only as a later, well-formed refresh: a regular file of at most 64 KiB (a container's larger one is never downloaded) holding its refresh and access tokens, for the copy's account, stamped after the copy and at most a minute ahead of this machine's clock (an hour where the clock may differ). Harbor no longer gets CODEX_FORCE_AUTH_JSON or CODEX_AUTH_JSON_PATH from the user's environment. - Only a pipeline that keeps its trials by row (a Harbor task set with `trial_cache` on, in the config or its benchmark file: isolate.keeps_trials) is handed rows naming their epoch or asking for a new run; no record keeps `epoch` or `fresh` (rollout.TRIAL_KEYS), so the learning material's `input` and every learner's text of a task are the same in each epoch, and the adapter's per-task context gets the task's own row. - A Harbor trial is scored as Harbor grades it: a verifier that left no reward Harbor could read or ran out of its time (`verifier_timeout: agent`, now the default; `infra` the opt-in for a host whose load makes verifiers time out), and a request of one of Harbor's own agents that the provider refused for what it held, are the agent's result, 0 without a reward, unless the verifier's output shows its tools never arrived or the host's disk full; a provider that could not serve, or refused the run's configuration, stays infra (Hermit runs it again, where Harbor grades it). An OSError on this machine while the adapter is staged is infra (`staging_failed`); the adapter's own deployment or per-task context failing stays the agent's 0, since what its child process prints could be the adapter's words. A verdict that quotes the verifier's output applies `verifier_redact`. - `dataset prepare`: a patched set is its patch's own. The download record names the patch (its hook and its file's digest), a reuse of another source's or another patch's tasks is refused before the patch runs, the default data directory is named by the patch too (an unpatched set's name as before), and a download is patched in its own folder before it is moved into place. - The AHE Adapter's learners' clocks (`evolve_timeout_s`, the Agent Debugger's `timeout_s`) are the Base Agent's own, counted from the CLI's start: a wait for the login's plan or a session slot pauses them instead of spending them (a hold longer than a clock made the step a no-op recorded as done, or the Debugger's analyses upstream's fallback text). This reverses PR #65's choice that the Debugger's clock cover the plan wait: upstream's clocks had no plan hold to cover. `trainer.call_timeout_min` still bounds a step, waits included. - `hermit train`'s refusal of more than one epoch over a multi-step task's steps gives its true reason. Tests: test_harbor_harborside.py (every CLI's launch script on every backend run by bash, the returned files' limits), test_harbor_runner.py (grading as Harbor does, staging, redaction, the sign-in back by the environment's clock, Harbor's environment, a Codex outage), test_harbor_core.py (the rows only a trial cache is handed, the records, a halt), test_harbor_dataset.py (patched sets), test_cli_agent.py and test_base_agents.py (Codex's outcome and lost sign-in words, the take-back), tests/methods/ahe (both clocks through a real login path). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Review fixes: the post-PR audit of fe8c5b4 The post-PR audit of this PR's fe8c5b4 found two medium issues and eleven low ones; each is fixed here. - A step of a multi-step task whose turn cannot come ends infra (stream_order) at once and starts no driver: its stream's driver waits for a step no rollout of the runner is running (one that ended before it reached the driver, or ran in an earlier training step), or the stream has no driver and no rollout of its first step is running to start one. Every later step of the stream ends the same way, and the last of them stops the driver. Before, each waited out its turn (by default its budget for each earlier step and an hour more), holding a rollout's worker, then ended infra, so a step that failed on this machine before it reached the driver, a halt (whose resume reran a later step on a new driver at step 1) or a driver gone lost the rest of the stream after hours. The runner keeps each stream's steps in flight; StreamClient.wait_turn takes what it asks. - `trial_cache` with an answer agent on a model a CLI reaches (`model: {cli, model, login}`): the trial's key held the URL of the endpoint the run's pipeline serves the model on (its port and token, and the binding's `messages_url` derived from it), which no resumed run or other eval has again, so no trial was ever taken from the cache. The key names that model by its CLI and login. - A new stream driver in a directory that held one sets the earlier one's trial and replies aside (`earlier/<n>/`): Harbor reuses a trial's step directories, so a step of a stream run again that left no output of its own was read, and billed, as the earlier run's. - A stream driver that answers no stop within 15 minutes (hung in a step) is killed with its process group, and its trial's compose projects are taken down by name. - An OSError on this machine while a trial's job and launch are written (its job directory, the launch plan, the agent's config, job.yaml), or a stream step's launch plan, is infra (`staging_failed`), as one while the adapter is staged is: before, it raised out of the rollout, the agent's 0. - A rollout that never reached a container (a halted run's, the disk gate's, an unsupported task's, a staging that failed, a stream step its driver was never asked for) costs 0: before, its cost was unknown, which left the eval's total cost unknown. A stream step lost after its request was sent keeps an unknown cost. - The ChatGPT sign-in's take-back reads the shared copy's own stamp as any accepted copy may hold it (at most an hour ahead of this machine's clock, as one from the user's own file), never as no stamp: an earlier file a session handed back replaced a copy stamped ahead of this clock. - Codex's fall back from WebSockets to HTTPS retries nothing, so a request refused after it is the session's own failure; only its reconnects (`Reconnecting...`) are retries. - `hermit eval` of a split that names a task twice keeps a row for each, as on main (the infra reruns kept the records by id). - `<jobs_dir>/HALT` names the record's cause first (`login_failed`, `usage_limit`) and says that it halts every run on that jobs directory, as the docs now do. - The docs: a sign-in file is checked for its size before it is downloaded (one grown after the check is refused when taken back); with Harbor's retry on, a failed attempt's usage is not counted; what `staging_failed` covers. The CHANGELOG's Harbor entry is rewrapped where earlier edits had cut its lines short. Tests: test_harbor_runner.py (a stream's lost turns, at once and in order, a halt's resume, a rerun's outputs, a hung driver, a stream step's launch, a lost step's cost, the CLI model's trial key, a trial's staging, a never-ran rollout's cost, the halt file), test_harbor_core.py (a split that names a task twice), test_cli_agent.py (a copy stamped ahead of this clock), test_base_agents.py (Codex's fall back). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Review fixes: the post-PR audit of 3a49adc The post-PR audit of this PR's 3a49adc found three medium issues and fifteen low ones; each is fixed here or, where it is a limit of the design, recorded in the PR. - `trial_cache` with a model a CLI reaches: 3a49adc named that model by its CLI and login alone, so a second eval on the same jobs directory whose CLI had another effort, `bin` or version met the first one's trials. The key also holds the CLI's identity (`hermit.agent.base.endpoint.cli_identity`: its settings as its sessions get them, less where they run and log and which plan they wait for, and its binary's path, size and time of change), as a digest that hermit.isolate.agent_pipeline hands the runner (`model_cli_identity`). Harbor's `retry`, the adapter sandbox's `sandbox_enforce` and `tools_host` are in the key too. - A trial whose agent ran out of its time or exited with an error is verified by Harbor and graded: when its verifier's tools then never arrived (a 5xx of GitHub's release download) or met the host's full disk, it is infra and run again, as one whose agent finished is. Before, it was the agent's 0 and stayed in the trial cache. - Codex's words for a refresh of the ChatGPT sign-in the provider refused ("Your access token could not be refreshed [because your refresh token was already used / has expired / was revoked]. Please log out and sign in again.") are a lost sign-in: the run halts. Before, the trial kept Harbor's verdict, scored 0 and cached. A sign-in refusal counts only since the session last worked: one on a side request the session worked after is none. - `run_tasks` submits each multi-step task's steps in step order, in the places its steps had: a `run_agent` call that listed a later step first, with fewer workers than the gap, gave the stream up and lost the earlier step too. - A step whose stream aborted before its turn is never asked for (`wait_turn` checks the abort first), so it costs 0; and a trial whose environment or agent setup failed before its agent started (Harbor records no `agent_execution`) costs 0. Both had an unknown cost, which left the eval's total cost unknown. - An OSError on this machine past the guarded steps (no process left to start `harbor`, a file it cannot write or read) is infra (`host_failed`), its cost unknown, not the agent's error scored 0. A trial cache this machine cannot write leaves the trial as it ended (it stands, uncached), an entry it cannot read is no trial kept, a key whose dry render cannot be written runs the trial without the cache, a sign-in take-back that fails leaves the trial as it ended, and a HALT file it cannot write leaves the halt to the rollout's output. - A stream step run again sets the tool-call log an earlier run of it left aside (`earlier-<n>-tool-calls.jsonl`) at its turn, so its curated log holds its own calls only. - A killed stream driver's socket is removed. - Only a Harbor task set's rows name their repeat (`repeat`, with `eval.repeats` above 1), and no record's `input` keeps it; a record's `input` drops only the keys its caller added (the Trainer's `epoch` and `fresh`), so a row's own field of those names stays. Every other pipeline gets its rows and records as on main, and a Harbor adapter's per-task context never reads `repeat`. - A failed `hermit eval` removes the earlier eval's `summary.json`, as it empties `results.jsonl`. - The overlap error of a declared path names a Harbor task set's directories as such. - The docs: `solved_once` counts each test id once; the steps of `run_agent`'s call run in step order; the cost of a trial that never started an agent; `host_failed`; the Codex refresh refusal and what to do about it; a copy stamped ahead by another clock is replaced once this clock passes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Review fixes: the post-PR audits of e7ace26 and b709e0c The post-PR audit of this PR's e7ace26 found no high or medium issue and eleven groups of low ones; the audit of the benchmarks PR stacked on it (b709e0c) found a medium issue here and a low one. Each is fixed here or, where it is a limit of the design, recorded in the PR. - `python -m pytest` imported the files of a run's folder beside an example's configs (`examples/*/runs`, their output_dir), a task container's and a learner's files among them, and ran them on this machine outside any sandbox: the root conftest ignores them, as it ignores a Harbor task set's. - A pipeline that deploys adapters is refused at startup where bubblewrap is not installed and the adapter sandbox that renders each adapter is required (`agent.params.sandbox_enforce`): each trial ended in the sandbox's error, scored 0. - A rollout that met a halt (a lost sign-in, an account's limit) and then an OSError of this machine (its curated log not written: a full disk) came back `host_failed` with no halt, so that nothing halted where its HALT file could not be written either: it keeps the halting verdict. A jobs directory this machine cannot make is `host_failed` at a cost of 0, not an error scored 0. - A stream step whose turn never came curated the tool-call log an earlier run of it left as its own: it curates none. - A verifier's words of a full disk (ENOSPC) made a trial infra eve 10BC8 n after its tests ran: now only before its tests wrote a report (`ctrf.json`), so that a test's own output (an agent's program, a task about a full disk) stays the agent's result. - The copy-back and the collect ran as root in /logs/agent, which every user can write in, through a link the agent's user could put there, and made what it named readable to all: each makes a new folder of root's, enters it, checks that it is that folder, and works in it by relative names. - `acting_agent.env` is written into each trial's job and onto `docker compose exec`'s command line: a variable of a secret's name, or a value naming one, is refused at startup. - The `tasks` link is followed once (`tasks_dir`), so that a prepare pointing it elsewhere mid-run changes neither a trial's task set nor the key it is kept under; a task's link to a folder is in its digest by where it points. - A codex, claude or pi trial of a model a CLI reaches got the loopback refusal once the pipeline served that model: it is refused for what it is. - A row of its own `epoch`, `fresh` or `repeat` field is refused where the framework adds those keys (hermit train with the trial cache, hermit eval's repeats of a Harbor task set; hermit check says so too): they would replace it, and no record would keep it. - `dataset prepare`: a data directory that is the set's own folder in another download is that download's (its marker is beside it), refused to a benchmark of another patch; a download is marked in its own folder before the set is moved into place; an image whose size cannot be read anew keeps the earlier one; split counts are whole numbers, and a smoke task is named once; the rows, the lock, the splits and the sizes are all made before any is written, so that a refusal leaves the link and every file as they were; a `data` naming a variable that is not set is refused; this machine's errors (an OSError, Harbor's failed download) are the command's `error:`, exit 1. - An ATIF trajectory's tool-call id that is no string (a list, an object) reads as no id, never a TypeError in each learner reading the log. - Tests: a trial-cache key this machine cannot make, a sign-in take-back that fails, MWM's name of a task's record. - The docs: a command a CLI ran in a session of its own (Claude Code's shell tool) is outside the process group the kill reaches; a `timeout` or an `agent_error` scores 0 when its verifier left no reward. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Review fixes: the post-PR audit of b9a3d61 The post-PR audit of this PR's b9a3d61 found no high or medium issue and four groups of low ones. Each is fixed here; its questions are recorded in the PR. - A `hermit eval` refused at its start (a row of its own reserved key, or a pipeline whose startup checks refuse it: no bubblewrap, a secret in its env) had already emptied the earlier eval's results.jsonl and removed its summary.json: the eval empties them once its pipeline and judge are built, as on `main`, and a refused start leaves them as they were. One that fails after its start still leaves no earlier summary. - `acting_agent.env`'s secrets are read as Harbor fills its values: `${NAME:-default}`, which Harbor fills in from this process's environment, is refused like `${NAME}` (it got through), and a referenced name is a secret's by the rule the variable's own name is (`launch.SECRET_VAR`), so that a setting named like one (`${TOKENIZERS_PARALLELISM}`) is no longer refused. `$NAME`, which Harbor hands on as that text, is still refused where it names a secret, as it never passes the secret the config meant. - `hermit check` refuses a test row's own `repeat` wherever `hermit eval` of the config would (a training config's eval too), by eval's own rule (`_harbor_rows`), and a test now covers it. - Tests: an unused fixture, a temporary directory outside the test's own `tmp_path`, blank lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Rework: Harbor's needs in hermit/harbor, the agent layers as on main Everything in hermit/ outside hermit/harbor/ is back at main (e813538): the three agent layers, the Trainer, hermit eval, hermit check, the configuration, the sandbox, the methods and the hosts, but one change. Pi's and dsh's prepare take serve_tools, as the other four hosts already do, so that a trial gets the adapter's tools from the runner. hermit/harbor/FRAMEWORK_SUPPORT.md lists where each of Harbor's needs now lives, and what could later become framework support. What a Harbor task set now meets: - A trial that is not the agent's result (infra) runs again in the runner (agent.params.infra_retries, 2; infra_wait_s, 300 s). One still infra is refused by the judge, so the run records a failed run (judge_error): hermit eval counts it among its errors and as 0 in its mean. python -m hermit.harbor.report gives pass@1 over the trials that are the agent's result. - A lost sign-in, or an API account's usage limit, raises LoginFailed, which ends hermit train and hermit eval as a local session's does. There is no HALT file. - There is no trial cache; agent.params.trial_cache is refused. - A multi-step task's stream is the runner process's own and is never resumed; a split keeps its steps in order (data.shuffle: false). - A Codex trial's lost sign-in and provider outage are read in hermit/harbor/signin.py (the outage by the session's last failure, so a reconnect Codex recovered from is no outage). - The answer agent's model that only a CLI reaches is given in the benchmark file; a run config's own is refused at startup. - A trial's log keeps the CLI's stream, task.md, prompt.txt, last_message.txt and the hook files at its top, where the methods read a local session's. Fixes of the last audit (of 418a00d): a stream's step gets the sign-in at its turn, not when its rollout began; acting_agent.env secrets are named by Harbor's own rule; each step's allowed hosts reach the driver; the answer agent waits for its plan's window; a long task name's verifier containers are found as Harbor names them; a dataset's digest takes a link as the link itself, not the file it points to. Tests of the reverted code are back at main; the Harbor tests cover the new code. Docs and the changelog describe the PR as it is now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Review fixes: two post-PR audits of the rework The first audit of the rework (2b2a46b) found no high issue, three medium and six low; a second audit of those fixes found no high issue, five medium and ten low. Each is fixed here, in hermit/harbor/, its docs and its tests, or recorded as a candidate where the fix is main's. - An adapter whose own deployment or per-task context fails in its child process is the agent's result: agent_error (adapter_failed), scored 0 with its message as the feedback, which `python -m hermit.harbor.report` counts among the scored trials. It left the pipeline as an exception before (status error), outside pass@1. - A stream's step that ends in any way before its driver is asked for it (its staging, its adapter, its tools, its launch plan, the disk gate, its turn's wait running out, its turn's sign-in or tools not readied, an exception of any of them) gives the stream up, so its driver is stopped once the stream's rollouts end, that step's own when it is the last, and the stream's next pass (an eval's next repeat, a later epoch) starts from its first step in a new environment. Before, the driver stayed up for a step that never came: the next pass's first steps ended stream_order and its last ran on the environment the pass before had left. A step the driver already ran gives nothing up. A later step of a stream with no driver and no rollout of its first step ends before anything is staged or served for it. - A runner's unfinished streams are closed by its finalizer, when the runner is freed and at exit for one still held then. Before, a weak set of runners was closed at exit, and a runner freed before then (`hermit check`'s probe, `hermit eval` once it returned) left its drivers up for stream.idle_s. - The docs say what a resumed `hermit train` does to a stream under way (its remaining steps in that epoch end stream_order, and the stream starts over at its first step's next rollout), and what an Evolver's run_agent of a stream's first step does once the Trainer's pass of it finished: it starts a pass the next epoch inherits. - A request the provider refused for the run's configuration (model_rejected) is not run again (NO_RETRY), and NO_RETRY is tested with runs again allowed; nor is a host failure past the trial's staging (host_failed, whose session may have run), which the docs now say. The `halted` cause, which nothing gives any more, is gone. - Codex: a session the provider refused for the run's configuration or bill (a 400, 402 or 404 Codex does not retry, an API account's quota) is model_rejected, as the other CLIs' are, never the agent's 0. Its usage limit is read from Codex's own notices, never from what its log quotes of the session's work, and a JSON line its log quotes no longer ends the record. A session that failed on its own after a reconnect Codex went on from, or whose response the provider's content filter ended, is no outage. - The answer agent's model a CLI reaches: its sessions run with plan_rerun off, so that a session the plan refused comes back at once (infra, run again once the plan allows) instead of waiting for the window inside the agent's time and scoring as the agent's timeout; its sign-in is checked at startup; its CLI sessions get main's check that the user's own secrets are absent (HOME_SECRETS). The runner refuses a run config's own `{cli}` model for the answer agent as written, as `hermit check` hands it, as well as the endpoint spec `hermit eval` and `hermit train` hand it, whose test builds it with main's endpoint_spec. - The docs say that `hermit check` builds the runner and reports its startup refusals, and that every run of Hermit's agents needs bubblewrap, a baseline's too (the runner cannot tell a run that deploys no adapter), unless sandbox_enforce or HA_ADAPTER_SANDBOX_ENFORCE says best_effort. - The report says when an eval did not finish: no summary.json beside its rows, one that is not of them (its count of trials, of failed runs or its mean score differ), or a last row cut off, which is left out. It reads the summary, never the files' times, which a copy changes. The docs say that a stopped eval writes no row of the repeat it stopped in. - A plan refusal's hold gets the run's stop, so that a hold that cannot be written waits no longer than the run. The docs record that trials racing on one ChatGPT copy for its refresh end the run: the loser's refusal reads as a lost sign-in. - FRAMEWORK_SUPPORT.md names the four private helpers of main that hermit/harbor/ uses, and more candidates: a trial's usage when LoginFailed ends the run, the run's own secrets for the answer agent's sandbox, public names for those helpers, rows that say who runs them (run_agent's or the Trainer's), the `login: claude` check of `hermit train`, RRSI's halt file. The docs no longer say a trial a lost sign-in ended keeps its runs' usage, and bind_agent_params is named right. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Review fixes: the tenth post-PR audit The audit of e19d155 found no high issue, two medium and twelve low, and asked eleven questions. Each is fixed here, in hermit/harbor/, its docs and its tests, or recorded as a candidate where the fix is main's. - Pi's and dsh's trials get the backend's developer_role, as Hermit's own sessions do: the spec the config's loading keeps drops it (Binding.spec), so the runner takes the backends registry's for a backend it names at the same URL. A test compares a trial's provider settings with main's bind_agent_params on Fireworks (developer_role: system). - `hermit check` and `hermit train` check a Harbor run's acting model as a chat client's, main's rule for an agent it does not know: they refuse Claude Code on Anthropic's API, which `hermit eval` runs, and do not check that Codex's backend serves the Responses API. The docs say so, and candidate 7 names the cause in main. - On a login, busy_retries is one count over all of a trial's runs: infra_retries no longer multiplies it (up to 12 runs by default, where the docs said 4). A plan refusal of the answer agent's model runs the trial again once the plan allows, not counted in infra_retries. - A staging or per-task-context child that failed is the host's failure (staging_failed, run again), not the adapter's 0, when this process sees this machine fail any adapter's staging there: a folder it cannot write, less than 64 MB free, the strict adapter sandbox not starting. Startup refuses a runner whose bubblewrap cannot start that sandbox. - A trial's launch plan refused for what its adapter is (its tools beside text_only, a dsh server name made of a long id) is adapter_failed, scored 0, for a trial and for a stream's step; with no adapter it is still the config's error. - A provider that does not bill the account (a 402, its quota or credit spent) ends the run, as an API account's usage limit does. Before, every later trial ended model_rejected. - acting_agent.settings.env refuses a secret's $NAME inside a value by every rule (AUTH, PASSWD, Harbor's), and a secret's value written as it is. `effort: off` gives no effort flag, as on main. - The answer agent writes answer.json as a new file renamed into place, never through a link the container left there. Codex's auth.json is removed from the container once it has been copied back, before a verifier that shares the container runs. - The curated log's top stream is the one the launch plan names. The report adds a note when results.jsonl was written after summary.json, as by an eval stopped beside an earlier summary. The runner's finalizer gives each driver 2 minutes (CLOSE_STOP_S) before it kills it. - Tests for each fix above. They also catch four mutations no test caught before: the turn's sign-in copy, the first give-up reason, Codex's outage reading, and the report's errors comparison. - Docs that did not match the code: what `hermit eval` reads of a config made for it alone, the causes never run again, only a first step starting a finished stream over, the CLI Evolvers' run_agent, the stream socket's path, split files with more than one rollout, Harbor's own usage-limit error, when the `login: claude` warning fires, a quoted line in Codex's own form, the relay's sandbox, the deployment record's host paths, and hermit check's probe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Rebase onto main: what Hermes Agent is to a Harbor run Main has gained Hermes Agent as a CLI Base Agent (#107, 616e818) since this PR's base, e813538. In the rebase, each conflict keeps both sides: #107's Hermes in the docs' lists and tables of CLIs, and this PR's Harbor beside it. A Harbor trial does not run Hermes: the runner refuses `acting_agent.cli: hermes` at startup, as it refuses any CLI with no HermitXXX class, which a new test holds. The docs now say so (the acting agent's row in docs/framework/task.md, the CHANGELOG entry), and FRAMEWORK_SUPPORT.md counts five other hosts that take `serve_tools`, Hermes's among them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Round-11 audit: a trial's developer_role, a secret's name, which disk gate held The round-11 audit of a332854 found no high or medium issue; these are its low ones and what its questions found. - A Pi or dsh trial's developer_role is the backends registry's only for the backend the registry has at the trial's URL (launch._with_role): the run config's `backends:` is not the runner's to read, where Hermit's own sessions take it. FRAMEWORK_SUPPORT.md (candidate 14), docs/framework/task.md and the changelog said the trial got what Hermit's sessions get; they now say where it does not, and a test holds the URL check, on both of the spec's paths. - acting_agent.settings.env refuses a value given as it is to a variable a word of whose name is a secret's wherever the word stands (HF_TOKEN_READ, OPENAI_API_KEY_2, SECRET_ID), not only at the name's end (launch.SECRET_VAR); a word that only holds one (GIT_AUTHOR_NAME, TOKENIZERS_PARALLELISM) is no secret. A test now holds Harbor's part of the rule for a `$NAME` inside other text ($OAUTH_CLIENT_ID). - The verdict of a trial, or of a stream's first step, that a disk gate held back names the gate that held it, the host's /tmp or Docker's data root; it named the data root whichever held it. - Tests for what none caught: the answer agent's relay's 402 whatever its words, the stop a runner's close gives each driver (CLOSE_STOP_S), a job folder this process cannot write (the host check after a failed staging child). - docs/framework/task.md says what the questions found: a login's wait for its plan has no bound, a request the plan held back at any time makes its timed-out trial infra, a refused session runs again as often as the plan refuses, the host check comes after the staging child, and N hung drivers hold a close up N x 2 minutes. The changelog's Codex refusal no longer reads as every 400 or 404. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Round-12 audit: a stream's next driver, a curated log's links, refusals for good The audit of 6a79375 found one high and four medium issues and fifteen low ones. This fixes the high and medium ones, and fourteen of the low ones (one is in the PR's description); the last is noted there. - High: a stream's next pass (an eval's next repeat) could meet the driver of the pass before in the half second between its last answer and its exit, take it for a live one, and lose the whole pass. The driver's record now says it is ending before its last answers (harborside.driver._mark_ending); StreamClient.running takes neither such a driver nor one killed and not yet reaped, and ensure() waits up to 30 s for an earlier driver to exit, then kills it, before it starts the next. - Medium: a step whose own folder this machine cannot make now gives its stream up (host_failed), so its driver is stopped and the next pass starts anew. Before, the driver waited for that step, and the next pass ran its last step on the old environment. - Medium: a step's curated log walks the agent's folders through open directory handles and opens each entry with O_NOFOLLOW (curate._files, and open_regular for the files at its top). A link that a process the agent left running swaps in while the stream's environment stays up is never followed, and a file gone meanwhile is left out without an error. - Medium: Codex's refusals for good are read in its own words: a provider's error body Codex passes on as it is, "model is not supported", and its plan refusals (a workspace out of credits, a spend cap, a plan without Codex). The plan refusals end the run, as a 402 does. - Medium: the answer agent's relay reads a 429 for a spent quota (OpenAI's insufficient_quota, as its code or its type) as the bill's refusal, which ends the run, not as an outage that runs again. - Low: - A relayed Codex session that main's reader leaves a 502 but whose stream says it was refused for good is a 400 with Codex's words. - The disk gate's verdict names the room for the task's image and for other trials' pulls, and a stream's first step keeps room for its image until its environment is up. - A step waits for its turn over the earlier steps' own budgets. - Refused at startup: a benchmark file's {cli} model without a login, which the runner cannot bind, and a login in acting_agent.settings. - A relative mini-swe-agent settings.config is read beside the params, as the runner's other paths are. - The texts on the line reader, the secret-name rules and their tradeoff, the time a kill takes at exit, the answer agent's effort, and a Harbor Claude session's token (on a descriptor). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP * Dual review: OfficeQA's task builder, keyless backends, a run's spend and stop - build_tasks.py imports task_text from utils/task.py (the module it named is gone) - Claude Code on a backend that needs no key gets its placeholder token - the answer agent's Codex model has web_search off unless given - a row without an instruction gets Harbor's instruction for its context - a benchmark's patch is loaded without writing __pycache__ beside it - a launch's plans folder is the user's only (0700) - curate opens a reward file and hermit-copy/memory without following links - an answer trial whose agent sent no request costs 0, not unknown - a spent quota ends the run even when the agent's time ran out Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Haizhong Zheng <hzzheng@umich.edu>
# Conflicts: # CHANGELOG.md # examples/README.md
There was a problem hiding this comment.
Thanks for this. Each benchmark comes with its task set locked, a baseline and its paper's method in that protocol, and runs through the commands we already have. We reviewed d8496e4 with two independent reviewers and found nothing that blocks the merge, so the code is unchanged. Since #105 was squash-merged, we merged harbor-foundation (#105's review fixes) and then main into this branch (2484eeb) and retargeted the PR to main. The two conflicts, in CHANGELOG.md and examples/README.md, kept this PR's text.
What we checked: all 26 configs load and pass the runner's startup checks; every SkillOpt and AHE parameter exists in its Evolver; the SkillOpt splits reproduce from the lock with seed 42; no run trains or validates on a row it is tested on; the run sheet's trial counts (1,780, 364, 1,400, 408) match the configs and row files; AlgoTune's 1 - 1/speedup mean gives the harmonic mean; LAB-Bench's patch removes the seed and the verifier's fallback, is idempotent and refuses a task it does not know; and the transfer commands (--adapter with a directory, the README's git archive export) match hermit eval on main.
Noted, not changed
- SWE-bench's and Terminal-Bench-Science's seed arm deploys
hermit/adapter/templates/ahefrom the checkout, so a__pycache__left there by local test runs goes with it.
Tests: test_harbor_examples, AlgoTune's and LAB-Bench's tests, OfficeQA's harbor judge and test_harbor_dataset pass: 161 passed. No trial was run on Docker here; as the PR says, the results tables are empty. CI passed on 2484eeb.
🤖 Generated with Claude Code
Change
#105, this PR's base, makes a Harbor task set the one way a benchmark enters Hermit, but packages no benchmark on it.
This PR adds five, each ready to hand to someone with a Docker host: the registry's task set in a
utils/benchmark.yaml(locked inutils/dataset.lock), a baseline config, and the method whose paper's protocol fitsthe benchmark, in that protocol. Nothing under
hermit/changes. Every run is the framework's own commands on aconfig, as for any task: a baseline is a config for
hermit evalalone (--adapter none, or an adapter directory: atransfer, or AHE's seed as its template's directory), and a method is
hermit train, thenhermit eval --adapter final(and--adapter rootfor its seed or empty skill where no baseline config tests it). An eval's number is thepass@1 that
python -m hermit.harbor.reportgives over the trials that are the agent's result (AlgoTune's harmonicmean from
utils/judge.py). The way in is examples/README.md#harbor-benchmarks:what a machine needs (Docker, bubblewrap, Harbor 0.25.0 in its own venv, the CLI's sign-in), the commands, and a run
sheet of every run with its trials, each of which can go to another person.
terminal_bench_2_0swebench_verifiedalgotuneterminal_bench_sciencelabbenchEvery config comes twice: Codex with GPT-5.6-Luna on a ChatGPT login and Claude Code with Claude Haiku 5.5 on a Claude
subscription, both at medium effort, acting and learning. Each README says why its method, with the paper's numbers,
compares its protocol with the paper's row by row, and has an empty results table.
Reworked on 11-16, with #105. #105 now leaves the framework as on
mainand keeps what Harbor needs inhermit/harbor/(its description). What that changes here:trial_cache: trueis gone from the five benchmark files. A resumed run or eval runs its trialsagain, and no text counts on a trial from an earlier run 8000 (the smokes' second eval from the cache, SWE-bench
Verified's tokens of a cached trial).
eval.infra_retriesis gone from the 18 configs that set it. Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's runner runs a trialthat is not the agent's result again, twice, five minutes apart (
agent.params.infra_retries,infra_wait_s; theseconfigs had waited ten), training trials included, unless its cause does not run again (a host failure but its
staging's, the disk gate's, a refusal of the run's configuration) or it is a session the provider could not
serve, which these configs' logins run again under
busy_retriesinstead; one still infra is a failed run, 0 inhermit eval'smean_scoreand among itserrors.python -m hermit.harbor.report <eval dir>gives pass@1 over the scored trials,the infra ones counted apart, and AlgoTune's
utils/judge.pyand LAB-Bench'sutils/figures.pyread an eval's rowsthrough it (an infra trial's row is now a
judge_errorone) and say, as it does, when an eval did not finish. The READMEs and the run sheet report that pass@1.main's configuration asks of every config:data.train(the smoke split),template: prompt-only@1.0andevolver: {name: eval-only}, placeholders thathermit evalreads but trains nothingwith; no
Evolver has that name, so
hermit trainrefuses a baseline before any trial. They name the benchmark'stask_infotoo, which
hermit checkasks of a config with a training split.LoginFailed): there is no<jobs_dir>/HALTto remove. Sign in again and run thecommand again.
main(the earlier Harbor foundation: every CLI in a task's container, through the existing commands and configs #105 started them with the CLI): ahold longer than a Debugger attempt's 600 s or the Evolve Agent's 7,200 s ends that session, and Terminal-Bench 2.0's
README says what the step then keeps.
examples/conftest.pyandexamples/.gitignoredo for the examples what Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's rootconftest.pyand.gitignoredid (the root files aremain's again):python -m pytestcollects nothing under a run'sruns/or aprepared task set, and git ignores the task sets' links.
CHANGELOG.mdandtests/core/test_harbor_examples.py, which now also builds Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's runner from every config's settings, its startupchecks included (this machine's sign-in and bubblewrap stood in for), so a setting the runner refuses (a trial cache,
a login for another CLI, no
web_search) fails there.main's616e818(Add Hermes Agent as a CLI Base Agent (acting agent and hermes Evolver) #107, Hermes Agent): the same change asa5ca0d4, pickedonto Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's new head without a conflict, then onto Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's thirteenth and fourteenth commits (
6a79375,849f5a2), whose new refusals none of these configs meets (hermit checkreports the same on all 26). Its texts name no Hermes run (a Harbor trial does not run Hermes Agent),and the AHE seed some configs test is the template's directory, Add Hermes Agent as a CLI Base Agent (acting agent and hermes Evolver) #107's version of it.
cb7184efound no high or medium issue and two low ones, in the run sheet's sentence on a lostsign-in, now fixed: a Codex learner that meets it fails its step only as AHE's Evolve session, while SkillOpt's
optimizer skips a call that failed, as it skips any, so its step goes on without that call's edit (after the
run's last trials its last slow update and meta skill then come out empty, with no error); and AHE's history
can hold its first iteration twice only when the run stopped after that step's Evolver call began. The token
sentence it asked about is Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's (
docs/framework/task.md), fixed there.d749198found no high or medium issue and two low ones, now fixed: the run sheet's rule for aninfra trial's runs again left out the causes that do not run again and the login's
busy_retries(examples/README.md), and this description's list of what
hermit checkreports left out two warnings(Validation). For its questions, the run sheet now names a provider that does not bill the account (that ends
the run) and a bubblewrap that cannot start the strict sandbox (refused at startup, as a missing one is), and
LAB-Bench's README says that 15 of the new-figure questions share their figure with a validation question,
whose output SkillOpt never reads. The disk gate's verdict it asked about is Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's, fixed there.
d647693found no high or medium issue and two low ones, now fixed:hermit checkof a Claude Codeconfig, a baseline's too, needs
claudeon this machine (main's check of alogin: clauderun wants it on PATH,though
hermit evalmakes no such check: Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's candidate 7), which the run sheet now says; Terminal-Bench 2.0'sprotocol table gives the paper's 3,600 s sandbox lifetime (Table 4, the released code's
e2b_sandbox_timeout), mostlikely the start's, the agent's and the tests' together, where these configs give the agent alone 3,600 s. Its nits:
the run sheet says what
hermit checkwarns of a SkillOpt config (the validation data given to the Evolver), what aClaude Code learner does on a lost sign-in, and that
main's Claude warning describes a session on this machine;LAB-Bench's protocol table cites SkillOpt's code for
task_description, not the paper; Terminal-Bench 2.0's saysthat
allow_early_stopis Hermit's and the releasedmax_iterations100, and that Table 4 lists no effort for theDebugger. From its questions: RRSI's cost counts as Hermit's port does (about 61 x 178 if the incumbent ran again
each round), and a run stopped in its first step starts over in its folder, as on
main. With Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's eleventh commit:the run sheet says that
busy_retriescounts over all of a trial's runs, and the test stands in the runner's newstartup check that bubblewrap starts the strict adapter sandbox.
46162ecfound no high or medium issue and four low ones, in the texts and the test's hygiene, nowfixed: a stopped eval writes no row of the repeat it stopped in (the run sheet and AlgoTune's judge said its finished
trials stayed in
results.jsonl; Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's report said so too, fixed there); a finished eval handed back with its files'times changed read as unfinished (Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's report now reads the summary's content, never the files' times); the run
sheet's trial counts say that AHE's runs count more when resumed mid-step, and that a trial on a login runs again
after a plan refusal and up to
busy_retriestimes when the provider could not serve it (a row's tokens are all itsruns'); the test's unused import is gone. Its nits too: the run sheet says that a smoke's
hermit checkreports itsshared rows and that LAB-Bench FigQA's smoke ran on the reworked core before its last review fixes, and Terminal-Bench
2.0's README that AHE's own subprocess timeout is its Debugger's.
cc9759f) found no high or medium issue and three low ones, all in the texts, now fixed:every run needs bubblewrap, a baseline's
--adapter nonetoo, as the runner cannot tell a run that deploys none (therun sheet said only a run that deploys an adapter; Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's docs said so too, fixed there); AHE's config comments and
the test said a learner waits out any plan hold, where AHE's clocks count the wait (they say so now, and
Terminal-Bench-Science's README too); SWE-bench Verified's tokens recipe says that a trial the runner ran again holds
all its runs' tokens. From its questions: the test runs Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's real startup checks on every config; the baselines'
placeholders say that
hermit evalreads them; the run sheet says that its trial counts leave out the runner's runsagain, and that an eval a lost sign-in stopped writes no row of the repeat it stopped in (its finished trials are
only in their job folders), beside the summary of the eval before, which the report and the two scripts now flag.
c7f0f25before it: its three low findings, all in the texts, are fixed: the changelog names AHE's owntraining on Terminal-Bench-Science; SWE-bench Verified's image names; the configs' citations name the papers'
versions the READMEs cite. Its questions are answered in the READMEs: the released code's limits of the tests and
the start, what SkillOpt's analysts read of a LAB-Bench question, SWE-bench Verified's smoke as a command.
The PR is one commit, on #105's head.
Decisions:
hermit eval --adapter none,on exactly the rows the method's final adapter is tested on. The method's starting point is tested on them too, so
that what the start gives and what the search adds are read apart:
--adapter rootafter the method's training(Terminal-Bench 2.0's AHE seed, SkillOpt's empty skill), or AHE's template's directory with the baseline's config on
the benchmarks a transfer is tested on (SWE-bench Verified, Terminal-Bench-Science).
tests/core/test_harbor_examples.pyholds the configs to it.iterations, the best by pass@1: in sample, its §4.1).
<task>#1to#4. The training steps run feat(tasks): package OfficeQA Pro paired GLM evaluation #1 and feat(evolvers): GEPA and SkillOpt as built-in Evolvers, with the SkillOpt paper's OfficeQA setting #2, and every adapter is tested on feat(tasks/OfficeQA): OfficeQA Pro as a harnessadapter Environment (stacked on #2) #3 and examples: a folder per method, tasks shared under examples/tasks (old folders kept) #4, whichno step ran. The paper's own in-sample number is the run's
best_ever.json.rollback: auto: an edit the next step judges HARMFUL), where the paper's text revertsthe edits whose predicted fixes do not materialize. The README's protocol table says so.
and the start's limits are 5 and 3 times the tasks' own: the protocol table lists both.
change
/testbed.psf__requests-1142in text and changed nothing (score 0). With AHE's seed, whoseADAPTER.mdsays to edit files and finish the work, it fixed it.Known limits).
utils/judge.py).hermit eval's means move with AlgoTune's own score. SkillOpt's gate is its soft metric (a speedup has no pass).of the task's 8 CPUs and no core files. It gives the verifier 7,200 s, a verifier timeout being the agent's result
(
verifier_timeout: agent).reference, as the verifier's own test has it (
success_score: 0.000001). At SkillOpt's default of 1.0 no speedupwould count, and every rollout went to the failure analyst.
utils/patches.py, run by prepare on every download and recorded in thelock).
/app/.letter_mapping.json, where the agent reads it.The right choice is first before the shuffle, so replaying the shuffle gives the answer, in all 181 tasks. The
patch drops the seed; the verifier reads only the letters.
/app/setup.py, a file the agent can rewrite, when themapping is missing. The mapping is always written before the agent starts, so a missing one now scores 0.
questions share a figure with a training question, whose verifier output the learner reads. So
utils/rows/test_new_figures.txtlists the other 102 (utils/figures.py), for a second score from the sametrials.
codex_trace_to_optimizer: false, in both profiles' configs).The summary reads SkillOpt's own harness (
task.md,SKILL.md,<answer>), and told the analyst that every Harborrollout, right or wrong, gave no answer. SkillOpt's own Codex runs have it on; the protocol tables list it.
(
plan_max_wait_s: null);trainer.call_timeout_min(a week) bounds a step, waits included, and AHE's learners' ownclocks count the wait (above).
tests/core/test_harbor_examples.pyholds every config to it.<task>#0, which no other run takes), with a jobsdirectory of their own.
target_pass_rate: 1.01, so that the Debugger and the Evolve Agent run when both tasks pass.Files: the five folders under
examples/;examples/README.md(the Harbor benchmarks section);examples/conftest.py;examples/.gitignore;CHANGELOG.md;tests/core/test_harbor_examples.py;examples/algotune/utils/tests/test_judge.py;examples/labbench/utils/tests/test_patches.py,test_figures.py.This PR is stacked on #105 (base
harbor-foundation); once #105 is merged it is retargeted tomain.Validation
All on one Linux host (Docker 29, bubblewrap, Harbor 0.25.0).
On this head
d8496e4, on #105's head849f5a2(mainat616e818):tests/core/test_harbor_examples.py, 25 in the examples' own files),collected with the smoke's
runs/in place beside the configs (examples/conftest.pykeeps it out).the same way on
mainhere (Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's Validation).docs/build.sh) andpre-commit run --all-filespass.hermit check --no-probeon the 26 configs, the Claude configs with the subscription token by name:no hard budget is set(their budgets are left open on purpose), and the smokes also thattheir splits share the two smoke rows, which is the smoke;
No Evolver named 'eval-only') and no hard budget.main'shermit checkchecks every config as a training one (the earlier Harbor foundation: every CLI in a task's container, through the existing commands and configs #105 took one with no training split for an eval's, andthe baselines passed);
main's of the Claude Code token (inits words for a session on this machine, which a trial's is not), and on the 8 SkillOpt configs, that the
validation data is given to the Evolver (its gate runs it; a row holds no answer).
python -m hermit.harbor.dataset prepare examples/labbench/utils/benchmark.yamlreused the patched set(
labbench@1.0+8d4c46dc85e5), which matched the committed lock under Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's digest now (a link taken as the linkitself), and changed nothing in the checkout.
cc9759f, on Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's2b2a46b, before the rebase onto Add Hermes Agent as a CLI Base Agent (acting agent and hermes Evolver) #107, which adds Hermes Agent beside the code its trials ran). Since then this PR changed texts and added the two scripts' flag of an unfinished eval, and Harbor foundation: every CLI in a task's container, through the existing commands and configs #105 changedfailure paths that none of these trials took (Codex trials whose sessions were all served, with no adapter failure,
stream, infra trial or answer agent; nor did Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's thirteenth commit change a thing on their path), and four
things on their path, tested apart in Harbor foundation: every CLI in a task's container, through the existing commands and configs #105 (the fourth, Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's fourteenth commit's copies of a trial's agent
files into its curated log): the startup check that
the strict adapter sandbox starts (its Docker smoke runs it for real),
auth.jsonremoved from the container afterits copy-back, and the log's top stream taken from the plan (the same
agent-codex.jsonl). On this head,python -m hermit.harbor.reportandutils/figures.pyread its final eval as before, and as finished. By its README'stwo commands:
hermit train --config examples/labbench/skillopt/smoke_codex.yaml, thenhermit eval ... --adapter final, each with the smoke's own runname, tree and jobs directory. Codex 0.169.0 on the ChatGPT login (installed in the container by Harbor), the host
/tmpgate at its default (1 GB; 1.8 GB was free).than the starting skill's), so the final adapter is the starting skill. 23 min.
python -m hermit.harbor.reporton its folder: 2 trials, 2 scored, 0 infra, 0failed, pass@1 50%;
utils/figures.pyran on it (none of its 102 rows is a smoke row).run_agent's 6 calls (the gate's validations, the slow update'scomparison), the final test's 2. Each had the verifier's reward, and none was infra or a failed run: 13 scored 1.0;
of the 5 that scored 0, four chose a wrong letter and one wrote the letter without the
[ANSWER]X[/ANSWER]tagsthe task asks for.
middle and their end): none in the 1,215 files of this smoke (the run's records and tree, its trials, its logs), the
hermit checkoutputs (the Claude ones run with the token by name), the diffs of this PR and Harbor foundation: every CLI in a task's container, through the existing commands and configs #105, their commitmessages and these descriptions. The same scan of the tokens' own folders found each of them.
The earlier heads' runs (with #105's earlier runner: a trial cache, infra trials left out of the mean,
HALT)Their scores say the pipeline ran on those heads; the configs' settings are the same but for the rework's keys above.
c7f0f25(on Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's418a00d): the examples' tests 83 passed, the suite with Harbor foundation: every CLI in a task's container, through the existing commands and configs #105 1991 passed (the same 4failed); LAB-Bench FigQA's SkillOpt smoke in real containers (Codex 0.169.0 on the ChatGPT login,
/tmp's gate at0.1 GB as it had 0.15 GB free): both epochs 1.0, the gate kept the starting skill, the final test 0.0 (on figqa-0001
Codex wrote only the letter into
/app/answer.txt, without the[ANSWER]X[/ANSWER]tags, and on figqa-0002 chose awrong letter); 18 trials, no infra trial, no error. An eval with
${GH_TOKEN:-}inacting_agent.envwas refusedat its start.
dc4fe0e,b709e0c,456e382,6229196: the same tests and checks; the LAB-Bench smoke each time, 16 or 18trials, no infra trial, no error (final tests 0.5, 1.0, 1.0, 1.0); on
6229196afterdataset preparedownloadedthe patched set anew (181 tasks, the same splits, the committed lock unchanged).
3aa0cc2:test_harbor_examples.py's checks of the 11-15 rework failed on each of six broken copies (abaseline with a
run:block, with a template, with a training split; a method config without its Evolver;SWE-bench Verified's baseline with a template, then with an Evolver); the LAB-Bench smoke: 18 trials, the final test
0.5, no infra trial, no error.
f271051: LAB-Bench FigQA through its README's commands on the two smoke questions: the baseline 1.0, SkillOpt'straining (both candidate skills rejected by the gate), its final test 1.0 and its start 1.0; 14 trials, no infra
trial, no error.
b6cf47b, the version before the 11-15 rework:Prepare, each benchmark from the registry, wrote the task links,
tasks.jsonl, the splits and the lockscommitted here. LAB-Bench's lock records the patch (
setup.py: 181 patched, 0 already patched; test.sh: 181 patched, 0 already patched, on a fresh download).Oracle (Harbor's reference solutions,
acting_agent: {name: oracle}, the two smoke rows): Terminal-Bench 2.01.0, SWE-bench Verified 1.0, Terminal-Bench-Science 1.0, LAB-Bench 1.0 (with both patches), AlgoTune speedup 1x
(the reference solver: score 0, the timing verifier ran).
Smokes (2 rows each):
psf__requests-1142in text)git archiveexport of Terminal-Bench 2.0's smoke: 1.0 / 1.0; AHE's seed ashermit/adapter/templates/ahe, Codex: 1.0No smoke had an infra trial or an error.
Claude tokens or the ChatGPT sign-in's tokens.
Not verified:
the tests and get only what is listed above from
hermit check, and their earlier smokes ran (above).holds trials below 25 GB free.
Review
hermit eval --adapter none, withdata.test=and a run name fora whole benchmark;
hermit train, thenhermit eval --adapter finaland--adapter root;--adapter <a directory>; the adapter export; the oracle's command;python -m hermit.harbor.reportandutils/figures.pyonan eval's folder.
hermit trainandhermit eval --adapter finalin real containers oncc9759f, ahead before this one (Validation); on this head
hermit check --no-probereports on every config only whatValidation lists; on the earlier heads every form ran on the smoke rows.
runs/and the task links are git-ignored.General checklist:
Core changes. None: no file under
hermit/changes.Implementation correctness and failures. The configs go through the real entry points (
hermit train,hermit eval) in the smokes, with their failure paths:hermit.harbor.reportgives pass@1 without it);plan_max_wait_s: null), AHE's within its clock;hermit trainbefore any trial.Real execution paths and tests.
Config.loadas its command does, prepared or not, andbuild Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's runner from each config's settings, running its startup checks.
Documentation. Five READMEs, five
task-info/README.md(what the learners read: the task, the CLI, how theadapter is deployed; no answer or task-specific guidance), examples/README.md, CHANGELOG.
This description. Read against the files and the run records.
Independent review (post-PR audit): of this head
d8496e4: no high or medium issue. An agent that did notwrite the PR (Opus 5.5, at max effort) audits it against the general, test and method checklists. Its two low
findings, in the run sheet's texts, are not fixed in this head: examples/README.md says a subscription should not
meet a refusal that ends the run, which a Codex plan that refuses every session until someone acts (a workspace's
credits spent or its spend cap reached, a member's limit, a ChatGPT plan without Codex) now does (Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's
fourteenth commit); and it says the Claude Code token is in no process's environment, where it is in neither the
launch script's nor the CLI's (the exec's shell holds it a moment). Its questions: four AHE Codex configs set the
learners' ChatGPT hosts that
main's Trainer adds anyway,hermit checkexits 1 on every config (main'sbudget warning), SkillOpt's skipped optimizer call after the last trials, LAB-Bench's letter shuffle seed kept
only in Docker's log, and
model_rejectedcounted among the infra trials in the report. The audits ofcb7184eandd749198found no high or medium issue; their low ones are fixed (Change), asare those of
d647693,46162ec,cc9759fandc7f0f25.The audits before
Thirteen audits, of
c780fde,f271051,3aa0cc2,6229196,456e382,b709e0c,dc4fe0e,c7f0f25,cc9759f,46162ec,d647693,d749198andcb7184e, found no high issue. Their medium ones, each fixed:c780fde, the version before the 11-15 rework: AlgoTune's SkillOpt success (no speedup counted at SkillOpt'sdefault), SkillOpt's Codex trace summary (off), the tests' hold on the rows, the sandbox and web search (with no
skip in CI), LAB-Bench's test questions on a training question's figure (listed apart). The fixes are kept.
f271051:hermit eval --adapter finalrun again ran every trial anew, as the adapter's card counted in thetrial cache's key. Fixed in Harbor foundation: every CLI in a task's container, through the existing commands and configs #105 then; with no trial cache since the rework, every eval runs its trials, which the
run sheet says.
3aa0cc2: neither AHE learner waited out a plan hold, though the README and configs said so. Fixed in Harbor foundation: every CLI in a task's container, through the existing commands and configs #105then (both clocks from the CLI's start); since the rework the clocks are
main's, which count the wait, andTerminal-Bench 2.0's README says so.
b709e0c:python -m pytestcollected the files of a run's folder (examples/*/runs), where a learner or atask container may have written a
test_*.py, and ran them outside any sandbox. Fixed in Harbor foundation: every CLI in a task's container, through the existing commands and configs #105's root conftestthen;
examples/conftest.pydoes it since the rework.Their low ones, fixed or documented then and kept: the papers' statements (AHE's protocol, efforts, k, early stop and
rollback; Meta-Harness's search; SkillOpt's authors; the arXiv versions); SWE-bench Verified's images and its smoke's
own run and jobs directory; AlgoTune's success and its gate's noise; LAB-Bench's answer format, its verifier in the
agent's container and its shared figures; bubblewrap for every run, a baseline's too; the host
/tmpgate;the redaction of keys (not of a ChatGPT sign-in's tokens); SkillOpt's analysts without the Codex trace summary.
Still open, disclosed in the READMEs: the agents' network is public in all five task sets as Harbor publishes them
(whether to patch them offline is not decided); the verifiers of Terminal-Bench 2.0, SWE-bench Verified, AlgoTune
and LAB-Bench run in the agent's container;
trainer.call_timeout_min(a week) fails a step whose plan holds most ofa week; SWE-bench's images accumulate in Docker's build cache.
Test checklist:
tests/core/(they read five examples' files: core runs for every change) and in the examples'own
utils/tests/.tmp_pathand use no network, sign-in or CLI. None skips: a config loads without its benchmark'sdownload.
Method checklist:
ahe@1.0,prompt-only@1.0) and Evolvers (ahe_adapter,skillopt) are the existing ones, asmainruns them.CLI the adapter is deployed into; concurrency 6 against the AHE paper's 96; no Explore Agent; the port's rollback;
the Evolve Agent's 7,200 s clock where the paper gives 500 turns; SkillOpt's starting skill a placeholder with no
instructions, and its analysts without the Codex trace summary.
sandbox.enabled: true,enforceat its defaultrequired) andweb_search: falsefor the acting agent and the learners.Sandbox checklist: every process runs through #105's and
main's paths (the learners in the evolver sandbox, theacting agent in the task's container); this PR adds none.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FcJCJanVqQuJyChDevJNYP