Repository navigation
feat(flow): Harness² benchmark adapter scored by read-back - #1299
Merged
Merged
Conversation
Adds openadapt_flow.integrations.harness2, an optional integration that makes OpenAdapt the scorer for Harness² harness search on GUI tasks. - Each rollout starts a fresh MockMed copy, registers the episode with the reward worker, lets an agent drive the copy under the harness being tested, then reads the store and signs a tier-2 receipt. - The search reward: verified 1, safe stop 0, wrong value -0.5, wrong record or duplicate -1, and no number for outcomes a person must settle. - A MockMed task family with six traps: plain, lookalike, sort, typelabel, timeout (save lands, client errors), and missing (the right answer is to stop). - OpenAdaptGuiAdapter implements Harness²'s BenchmarkAdapter. It imports Harness² and copies none of its code. It runs in two evidence modes: screen only (Harness² as published) and with the read-back in each trajectory. - reward_selection picks the final by read-back reward. run_task runs one task through Harness²'s own recursion code. - Scripted agent and proposer for tests; a model agent and a single-call model proposer behind a capped, privacy-gated HTTP client for measured runs. - CI installs Harness² at a pinned commit; the extra is openadapt-flow[harness2]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 18, 2026
A rollout that wrote the requested patient's one record with the wrong values and then reported stopping was left unscored, like a correct write a person must reconcile. The read shows it is wrong, so it now ranks with the wrong-effect penalty. EpisodeScore gains wrong_value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p rollout keys - EpisodeScore.passed is false whenever the read shows a wrong-record, duplicate or wrong-value write, even for a task that accepts reconciliation_required (the timeout trap with a second click). - Each rollout deletes its reward worker's private key and token after scoring; receipts stay verifiable with the public key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A finished rollout is reused only for the same task and harness, and never when it crashed or ended failed_platform. - reward_selection ranks a run that did the task right before raw reward, so a single save a person reconciles beats never saving on the timeout task. - The reward contract and wrong-value check use the task's declared record fields and its identity key, not MockMed's names. - ModelProposer skips only the context's own library directory. - drop_worker_secrets is public, for other scorers of a rollout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # .github/workflows/packages.yml
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.
What this adds
openadapt_flow.integrations.harness2lets OpenAdapt act as the scorer for Harness² harness search on GUI tasks. Harness² handles the search: proposers edit the agent's instructions from full trajectories. OpenAdapt supplies the task environment and the score. The score comes from the reward worker reading the system of record of a fresh app copy after each rollout./api/dbagain and signs a tier-2 receipt. Production is never involved.verified1, safe stop 0, wrong value -0.5, wrong record or duplicate -1. Outcomes that a person must settle get no number.plain,lookalike,sort,typelabel,timeout(the save lands, then the client shows an error) andmissing(the right outcome is to stop).OpenAdaptGuiAdapterimplements Harness²'sBenchmarkAdapter. It imports Harness² and copies no Harness² code. It has two evidence modes:screen: Harness² as published, with no scorer.readback: each trajectory ends with what the store shows.reward_selectionpicks the final by read-back reward.run_taskruns one task through Harness²'s ownrecursion.run_mode.ModelGuiAgentandModelProposerfor measured runs. They call models through a small HTTP client with a hard cost cap. Every request first passesprivacy.prepare_outbound.packages/flow/docs/HARNESS2.md.Install and CI
Harness² is not on PyPI, and a published wheel cannot name a git URL. So the extra
openadapt-flow[harness2]brings Playwright only, and the docs give the pinnedpip installcommand for Harness².flow-unitinstalls Harness² at commit1cfe254e. It has no dependencies.One integration point uses Harness² internals. Harness² builds proposer prompts per surface name and knows only
opencodeandcodex. The adapter registers a third surface text, built from Harness²'s own INV and DOM templates.Tests
tests/test_harness2_adapter.py: 22 tests, about 60 s locally.lookalikefrom a wrong-record base to a verified final.Follow-ups (separate PRs)
🤖 Generated with Claude Code