# google-research/harness2 — AlpLab Radar Static Code Audit

- Ring: `trial`
- Category: `agents`
- Overall score: `3.3/5`
- Implementation check: `verified`
- Maturity: `early`
- Audited commit: `686881751887` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-12-02T11:15:53Z
- Repository: https://github.com/google-research/harness2
- Radar entry: https://radar.alplab.co/#repo/google-research/harness2
- License: `Apache-2.0`
- Tags: `agents`, `benchmarking`, `harnessing`, `codex`, `opencode`, `evaluation`

## Summary

A Python framework that recursively proposes, executes, selects, and retains agent-harness edits across JobBench, LAB, and WorkBuddy-Bench.

## Implementation Check

README.md's parallel and sequential recursion claims are implemented by `run_parallel` and `run_sequential` in harness2/core/recursion.py.

## When to Use

Use for bounded, credentialed experiments on supported benchmarks when you can isolate agent execution and absorb model costs. Do not use it for untrusted tasks without network and host controls.

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 4.0/5 |
| usability | 3.0/5 |
| reliability | 3.0/5 |
| security | 2.5/5 |
| integration | 4.0/5 |

## Code Evidence

- harness2/core/recursion.py `run_parallel` creates 2k proposals, k compositions, and rollout evidence for each task.
- harness2/core/recursion.py `run_sequential` carries a selected harness through successive INV, DOM, and composition stages.
- harness2/cli/run_sweep.py `main` validates readiness, preserves run identity, runs domain sweeps, and records results.
- harness2/core/schedule.py `_write_summary` atomically merges per-mode results under an `flock` and invalidates stale task inputs.
- harness2/config.py `scrub_env` removes judge, bridge, provider, cloud, and host secrets from agent environments.
- tests/test_workflow.py `WorkflowTests` covers resume, invalid proposal retries, selection failures, grading, and library failures.

## Issues Found

- harness2/substrate/codex.py `CodexSubstrate.exec_argv` passes `--dangerously-bypass-approvals-and-sandbox` for Codex executions.
- README.md states executor network access is unrestricted, risking benchmark leakage unless operators impose network restrictions.

## Key Risks

- README.md requires Linux, Python 3.12, Node.js, Google Cloud CLI, and benchmark-specific dependencies.
- Model-backed runs require configured models and can incur costs; `run_sweep.py` documents 4k executor rollouts and 3k improver sessions.
- No CI workflow is present in the audited tree, so test execution and release checks are not independently evidenced.
- WorkBuddy requires Docker, and benchmark setup clones pinned external repositories and downloads task data.

## Reviewed Files

- `README.md`
- `pyproject.toml`
- `harness2/cli/run_sweep.py`
- `harness2/core/schedule.py`
- `harness2/substrate/codex.py`
- `tests/test_workflow.py`
- `harness2/config.py`
- `harness2/core/recursion.py`
- `harness2/substrate/opencode.py`
- `harness2/install.py`
- `docs/SETUP.md`
- `harness2/cli/bridge.py`
- `harness2/preflight.py`
- `harness2/core/proposer.py`
- `tests/test_subprocess_env.py`
