Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 3.95 KB

README.md

File metadata and controls

34 lines (25 loc) · 3.95 KB

maka-eval

简体中文

maka-eval runs containerized Harbor benchmark trials against the native Maka Host inside Docker.

Subcommands

  • maka-eval run (src/harbor.rs) — Writes the embedded MakaHostAgent adapter and Harbor job config into --out, bind-mounts a Linux binary bundle (maka, maka-python-worker, maka-eval) read-only at /opt/maka-agent, invokes harbor run (forwarding optional --thinking-level, --max-steps defaulting to unlimited, --timeout-ms defaulting to task.toml [agent].timeout_sec with separate teardown grace, and --verifier-env KEY[=${HOST_VAR}] accepting host env references only so secrets are never written to Harbor artifacts), raises MakaInfraError on non-zero guest-run exit or container exec/upload failures to block verifier grading, populates AgentContext during run() from the single-source Rust settlement in guest-result.json, writes run-summary.json (metering: complete or lower_bound on evidenced trials, plus paths to guest-result.json, transcript.json, and Harbor's result.json), and validates trial evidence completeness.
  • maka-eval batch (src/batch.rs) — Runs a (task × repeat × subject) matrix concurrently (--concurrency) from --task / --tasks-dir using either single-subject CLI flags (--bundle-dir, --provider, --model, --api-key-env, --base-url, --thinking-level, --sandbox-mode, --max-steps, --timeout-ms) or a --subjects-file JSON array, plus --repeats and --verifier-env. Each cell runs through run_trial (honoring task-native task.toml timeouts and writing logs under cells/<task>/<subject>/r<repeat>/), atomically commits plan.json and per-cell cell.json, supports --resume (pending cells only) and --retry-infra (pending + infra_failed cells, never resampling scored cells), and exports summary.json and (for 2+ subjects) paired.csv. Exits non-zero if any cell is infra_failed or pending while still persisting complete reports.
  • maka-eval guest-run (src/guest.rs) — Executed inside the trial container. Initializes a fresh State Root (maka host init --settings-stdin), starts maka host serve --root, drives the task directly over HostClient / maka-app-client, waits for terminal agent.execution state, reconciles token usage across the root session and any spawned subagents into guest-result.json, and exports the full transcript to transcript.json.

Trial settlement

GuestRunResult distinguishes harness/container/metering failures (infraFailed) from model/policy stops (subjectStopped) and clean finishes (completed). infraFailed still preserves any collected raw evidence while preventing Harbor verifier grading (override_error_policy for MakaInfraError and outer AgentTimeoutError). Unless infraFailed or AgentTimeoutError occurs, Harbor proceeds to Verifier grading (ctrf.json / reward). completed trials keep the Host and State Root alive through Verifier execution so background processes started by the agent remain testable until container teardown.