Harness² verification: upstream workflow and real OpenCode
Date: 25 October 2026. This is a bounded integration study, not a benchmark, security certification, or evidence that recursive harness optimization improves a real application.
Decision
Section titled “Decision”Partially verified. Evals.si can read the pinned upstream deterministic workflow’s actual files, preserve missing/error grades, compare its results, and attribute a physically executed script ablation. Real OpenCode 1.19.3 with Sonnet also completed a synthetic tool/file task through Evals.si’s bwrap sandbox, model-host allowlist and hidden checker.
Do not mark the complete Harness² guide or its WorkBuddy/Codex examples verified. The real-model executor smoke and deterministic upstream refinement are separate experiments. No paid model ran the upstream refinement loop, no real benchmark was downloaded, and no benchmark judge or human calibration ran.
Versions and environment
Section titled “Versions and environment”- Upstream
google-research/harness2:1cfe254e8d25b15f37048c3730134686abe60335. - Evals.si source: application-first candidate on PR #162, SDK/harness
0.3.1.dev0; matching current-source Linux arm64 daemon built for this study. - macOS host; Docker Linux arm64. Upstream deterministic workflow ran on Python 3.12.13; the Linux executor image used Python 3.13.17.
- OpenCode
1.19.3, bundled Bun1.3.14. - Model route alias
claude-sonnet-5-5, using the user’s existing Anthropic configuration. Alias names do not establish the provider’s immutable snapshot. - A host-side request guard held real provider credentials. Executors received only a temporary local transport token, never the upstream credential.
- Tests mounted only owned synthetic workspaces and the needed source/binary paths. No kubeconfig, home directory, application repository or provider credential directory was mounted into an executor.
Results
Section titled “Results”| Control | Observed result | Limit |
|---|---|---|
| Upstream workflow regression suite | 5 unittest tests passed | Upstream’s own tests, not benchmark quality |
| Real upstream deterministic demo | 2 tasks; k=2; parallel and sequential; 28 executor runs | Scripted proposer/selector and deterministic Python executor, no model |
| Resume | Zero additional executor runs; both completed tasks skipped | Same local workspace |
| Independent arithmetic grades through upstream judge writer | Four baseline executions score 0; both adopted modes score 1 on each task | Two invented ledgers, one exact arithmetic criterion |
| Actual namespace import | base, agg2, seq2; correct record counts and means |
Demo namespace only, not a real benchmark namespace |
| Missing grades / verifier failure | Missing selections’ grades become skipped, explicit verifier failure becomes error; neither has a score | Deliberate fault controls |
| Comparison gates | Base to adopted exits 0; reversed baseline/candidate exits 1 | Two deterministic records, not general statistical power |
| Selection calibration command | Four recorded mode/task selections agree with deterministic grades | No human labels or full real-model candidate calibration |
| Unit ablation | Real script-revert executions on both tasks restore the bug: effect +1; reverting added README stubs has effect 0 | Four extra deterministic executions; synthetic causal control only |
| Real pinned OpenCode against scripted model | Bash tool creates exact 57599\n result; reader sees model/tool/model |
Synthetic model responses; reported SDK costs are not real spend |
| Real pinned OpenCode against Sonnet | Same exact file check passes; reader sees model/tool/model | One bounded standalone task |
| Current-source Evals.si + bwrap + scripted model | Hidden checker passes, exit 0; actual namespace/allowlist enforcement recorded | One synthetic task |
| Current-source Evals.si + bwrap + Sonnet | Hidden checker passes, exit 0; model/tool/model trajectory; no tool error | One synthetic task, not upstream refinement |
| Deliberately wrong workspace result | Hidden checker fails, task-success 0, run exits 3 | Deterministic negative CLI agent, no paid model |
| Denied non-model network request | Both sandboxed OpenCode runs record egress_denied for registry.npmjs.org:443; policy-clean is 0 |
Task-success alone passes; these are not policy-clean runs |
| Follower to actual daemon | Actual Sonnet log replayed in two batches: 2 steps then 1, plus root; persisted trace fetched successfully | Recorded-log replay, not simultaneous observation of an active model |
| Actual online policy | One trace seen/matched/sampled/evaluated by builtin/latency; one metric stored |
Local development daemon, no authenticated deployment or external sink write-back |
The sandbox reports driver: bwrap, level: namespaced, network allowlist
through its logging proxy, and a read-only system root. It explicitly reports
rlimits, no cgroup. The outer Docker container had a 4-GiB RAM cap. Enabling
namespaces in this development container required Docker’s --privileged;
that is not a production deployment recommendation or a claim that a normal
container has the needed namespace privileges.
The synthetic task gate was only task-success >= 1. A successful task with
an egress denial must not be described as a clean policy pass. Production specs
that require both must also gate policy-violations.policy-clean.
Actual startup failure and correction
Section titled “Actual startup failure and correction”The original OpenCode example declared memory_mb: 4096. Measured independently
of Evals.si inside the same Linux image:
prlimit --as=2147483648 -- opencode --version# exit 133, Trace/breakpoint trapprlimit --as=4294967296 -- opencode --version# exit 134, JavaScriptCore MemoryExhaustion assertionprlimit --as=8589934592 -- opencode --version# exit 0, 1.19.3The actual Evals.si OpenCode task also exited 133 at 2 GiB, before any usable agent trajectory. Raising the sandbox allowance to 8192 MiB allowed the scripted and real Sonnet tasks to finish. The example is corrected and a regression test first failed against its original 4096-MiB value, then passed after the fix.
On this bwrap fallback the memory limit is virtual address space
(RLIMIT_AS), not an RSS promise. Bun’s reservations are not the same as
resident consumption. This study kept a separate outer 4-GiB RAM cap; it does
not weaken sandbox limits, remove the namespaced floor or change Go’s resource
enforcement. Different runtime versions/architectures can require different
measurements, and the template is not a universal sizing recommendation.
The runtime still attempted a denied npm registry request despite disabling model fetching/default plugins and supplying explicit model configuration. Do not silently broaden the runtime allowlist to make policy checks green. Pre-seed required artifacts or explicitly review the additional host access.
Reproduce the no-cost upstream acceptance
Section titled “Reproduce the no-cost upstream acceptance”Use a separate upstream checkout, not a guessed hand-written namespace:
git clone https://github.com/google-research/harness2.git /tmp/harness2-upstreamgit -C /tmp/harness2-upstream checkout 1cfe254e8d25b15f37048c3730134686abe60335
# From this repository, with Python 3.12 and uv:cd pythonuv sync --locked --all-packages --python 3.12cd ..python/.venv/bin/python scripts/check-harness2-upstream.py \ --upstream /tmp/harness2-upstream \ --output /tmp/harness2-verification-newThe output must not exist. The script verifies the exact upstream revision, executes its deterministic workflow and independent checker, checks resume, missing/error grades, physically executes both revert variants, and invokes the actual matrix/calibration CLI. It writes local evidence and makes zero provider calls. It executes code from the supplied checkout; review/trust that pinned upstream revision before running it.
CI runs the same command using a separately checked-out pinned upstream tree. That automated job does not install OpenCode, use paid credentials or claim a live-model pass.
Validation commands
Section titled “Validation commands”Commands were run from the verification worktree with its SDK and harness source
on PYTHONPATH, using the application-first worktree’s locked Python environment.
python -m unittest discover -s tests -qin the pinned upstream checkout: 5 passed.- Focused importer/CLI/calibration tests: 32 passed.
- Related matrix/ablation/readers/benchmark/follower tests: 91 passed before adding the memory regression.
- Combined focused suite after the example correction: 124 passed.
scripts/check-harness2-upstream.py --upstream ... --output ...: real workflow, judge files, grade fault controls and executed ablations passed.- Actual
evalsi matrix ... --gate --format json: positive exit 0, reversed negative exit 1. - Actual
evalsi run -f run.json --output results.jsoninside the owned privileged development container: scripted/real Sonnet exit 0; deliberately wrong file exit 3. No fabricated success fallback was used for failures. - Real
Follower.flush()against current-sourceevalsid, thenevalsi policy stats harness2-follow-latency --server ...: persisted trace and one evaluated trace verified after ingest grace. An immediate trace fetch initially returned 404 before grace elapsed, then returned 200.
Carried budget and cleanup
Section titled “Carried budget and cleanup”The user authorized reusing the previous campaign’s $10 total allowance, not resetting it:
| Item | Conservative estimate |
|---|---|
| Carried prior spend, 184 attempts | $2.12206730 |
| New six successful HTTP attempts, including ancillary executor calls | $0.12465860 |
| Cumulative, 190 attempts | $2.24672590 |
| Remaining against the same $10 cap | $7.75327410 |
Two new responses contained real tool calls. The guard reserved input/output allowance before dispatch, capped responses at 1024 output tokens, limited attempt count, and included cache tokens at the conservative input rate. No reservation was exceeded. These are estimates using the carried rates, not a guarantee of the gateway invoice.
The transport adapted real complete model responses into executor-compatible SSE events; it did not measure native provider streaming latency or thinking tokens. Executor-reported cost is separate from the conservative campaign ledger and excludes ancillary calls.
Both model endpoints and the online daemon were stopped; ports 18765, 18766
and 18484 were verified closed. The temporary transport token was removed.
The owned Docker run containers used --rm; no AKS or other Kubernetes workload
was created. The user’s website on port 4321 was left running.
Still not verified
Section titled “Still not verified”- Model-driven upstream refinement/proposal/selection and its patched OpenCode source/Bun installation, rather than the standalone published executor.
- Any real LAB, JobBench or WorkBuddy task, benchmark-specific grader, document renderer, license acceptance or anti-contamination effectiveness.
- Live Codex, authentication, Responses bridge or its sandboxed example.
- Human evaluator calibration, real-model optimization gains, held-out generalization, multi-trial reliability or meaningful quality comparisons.
- Concurrent model/log following through to online evaluation, authenticated ingestion, downstream score write-back, or restart/recovery of the follower.
- ARM64/amd64 equivalence, RSS/cgroup enforcement, production isolation, and publishing the fixes in an installable release.