Repository navigation
Refactor: fixes from the final review (verifier script's own environment, host faults, usage) - #116
Merged
Conversation
…sage - A task's own verifier script (hermit.task.verify:script, shared or separate) runs in a sandbox built from the task's environment only: never the acting model's key variable, provider hosts or forwarded ports. - The strict adapter sandbox is preflighted at startup for a Harbor task set (the runner's sandbox_fault), and a deployment or context that fails because it stopped starting is staging_failed (infra, run again), not a scored 0. - The answer agent counts the usage an HTTP error response reports, on the scored result and on the infra end. - A ledger of only unreported sessions or calls has unknown tokens, not 0. - data.view must keep each task's id. - An unreadable optional feedback.txt leaves the verifier's reward. - AgentDyn/AgentDojo snapshots freeze data.view like the agent and judge. - Docs: Hermit's Harbor judge on the host; the verifier script's sandbox. - Minor: the RRSI trials judge loads its score module once; a dead fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- sandbox_fault: bubblewrap missing under a required sandbox is a fault (the runner refused it at startup), at startup and at run time. - The answer agent's session construction (its context tool's server) is inside the guard: a sandbox that stopped starting there is infra too. - A staging failure on this machine (the strict sandbox not starting, an OSError such as a full disk) is an infra output, staging_failed: run again, nothing spent, so a later passing run keeps a known cost. - data.view reads a copy of the row: a view that rewrites its input cannot change the task or merge two tasks. - The verifier script's sandbox does not apply sandbox.hide (the agent's), as a trusted judge's never did; the model key, hosts and ports stay out. - What a failed call billed (its error's usage) is counted on the failed record outside Harbor too, across the task sandbox's worker. - Snapshots refuse a module-form data.view (read live where it is installed). - Docs: the verifier script's boundary stated as the grants it lacks. - Minor: the RRSI judge loads under a lock; the 503 test asserts its attempts and their combined cost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A CLI agent's staging folders that cannot be made (a full disk) in a task's own environment are staging_failed (run again, nothing spent), as the runner guarded its job's folders with the staging; an answer agent whose context server's files cannot be made (OSError) is staging_failed too. - A pipeline's own failure after an infra run again sums every attempt's spend through Attempts, the failed one's included when it said. - An error body's all-zero usage (a session's placeholder) is no report, as hermit.tools.failed_usage reads it. - Docs: a shared judge's verifier script runs in a sandbox of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Fixes from the final review of the whole refactor (the integration branch
task-environment-refactoragainstmain,Codex gpt-6.2-sol), before the branch goes to
main. Intotask-environment-refactor.judge: hermit.task.verify:script, shared or separate)inherited the acting agent's sandbox environment, so
tests/test.shcould read the agent model's API key and reachits provider. Its sandbox is now built only from the task's environment (
environment.read/write/env/network/ allowed_hosts, with a proxy for those hosts only); the model's key, provider hosts, forwarded ports, the login's planand the CLI's install stay out. A trusted
judge.pykeeps the agent sandbox's copy, as on main.staging_failed, run again), not a scored adapter failure (theold runner's
sandbox_faultpreflight, ported); usage in an answer agent's HTTP error body is counted; an unreportedCLI token count stays unknown, not 0; a
data.viewthat changes a task's id is refused; an unreadable optionalfeedback.txtkeeps the reward; AgentDyn/AgentDojo snapshots copydata.viewlike their other entry points.sandbox not starting, ENOSPC) are
staging_failedinfra, retried, cost kept; a terminal error after a retry keepsevery attempt's spend;
data.viewgets a deep copy of the row; the script verifier's sandbox keepshide=[]like atrusted judge (key, model hosts and ports still out); billed HTTP-error usage counted outside Harbor too; all-zero
usage in an error body counts as no report; module-form
data.viewrefused in snapshots.reading
output.status; a billed quota refusal that stops the run is not counted in its spend(
fe4c071f:hermit/harbor/runner.py:1745-1747).Validation
pytest --changed --base origin/mainin a clean worktree on the final head25daedcb: 1932 passed, 118skipped, 0 failed. CI: pass. (Under two parallel full suites, two reharness tests once saw retrieved reflections in
reversed order; the test and its code are unchanged since main, and alone they pass.) Earlier: the real Docker + Harbor test and the Debian
kill_groupstest pass. Each fix has a test that fails withoutit (the P1's under real bubblewrap, shared and separate: the agent sees the key, the script neither the key nor a
proxy).
Review
P2/P3 edges of the fixes (all fixed), round 2 found 5 (no P1; 4 fixed, 1 out of scope as the old runner's).
🤖 Generated with Claude Code