Repository navigation
Conversation
…to claude/harness2-staging-repair
Self-repair's probe stops before the save, so it cannot tell two bridges apart that reach the save the same way but write different records. openadapt_flow.repair.staging_search runs each candidate through self-repair on a resettable staging copy, then runs the patched bundle through the save there and reads the copy's store with the reward worker. The best verified candidate is the one proposal production self-repair receives; its probe, campaigns, approval, staging and canary are unchanged. The search never opens a production session. - StagingCopy, StagingBridgeSearch, StagingSearchAgent (a RepairAgent). - ScriptedBridges for tests; ModelBridges reads the halted trace and the last verified traces and answers with control labels mapped to points. - MockMed ?drift=menu2: a second save path in the menu (Submit as Consult). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Each search runs in its own directory; run paths, stores and episodes are single-use, so a second search no longer fails. - Every staging candidate's approval request is withdrawn and the staging candidate rejected, so nothing on staging can be approved. - The rollout's reward worker key and token are deleted after scoring. - The reward contract checks every field of StagingCopy.record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
The self-repair bridge branch is now #1325. This PR stays a draft on top of it: the staging search was deferred by the founder's decision on 2026-10-18. The names it uses (RepairProposal(actions=), SelfRepairResult.patched_bundle, the tests.test_self_repair helpers) are unchanged there. |
Member
Author
|
Closing as stale during PR cleanup; superseded by later work. Reopen if still needed. |
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.
Draft. It is stacked on three things:
claude/self-repair-bridge(on feat(flow): self-repair a halted run under one person's approval #1265), which is the base here;The diff against this base therefore also shows #1299 and #1300. Once those land, I'll retarget this PR to
main. This PR's own files arerepair/staging_search.py,tests/test_staging_search.py, themenu2drift inmockmed/static/app.js, and a section indocs/HARNESS2.md.Why
Self-repair probes a proposed fix up to the last point before the save, then stops. That shows the bridge reaches the save on the right record. It can't show what the save writes. Two bridges can look the same up to the save and still write different records.
What this adds
openadapt_flow.repair.staging_searchdoes the following for each candidate bridge, on a resettable staging copy of the app:SelfRepairwith that one bridge (halt, patch, probe, campaigns) and stops at the approval request, which nobody answers.StagingSearchAgentis aRepairAgent. It hands production self-repair one proposal: the best candidate that verified on staging, or none. After that the pipeline is unchanged: production probe, campaigns, one person's approval, staged, canary, active. The search never opens a production session. It uses onlySelfRepair's public API and adds nothing to self-repair itself.ScriptedBridgesfor tests.ModelBridges: reads the halted step, the controls OCR finds on the live screen, and the full traces of the halted run and the last N verified runs (traces.from_flow_run). It answers with control labels, which are mapped to screen points, so it never invents coordinates.?drift=menu2: the save moved into a menu with two save paths, Billing > Submit encounter (Triage) and Clinical > Submit as Consult. Both pass self-repair's probe.Tests
tests/test_staging_search.pyuses self-repair's own MockMed fixtures, with a separate staging server:ModelBridges: maps labels to points, and the halted trace reaches the prompt.All three pass locally (about 3 minutes, because of the tutorial recording).
Coordination: self-repair owns the bridge mechanics. Pre-approved repairs owns auto-promotion. This PR changes neither.
🤖 Generated with Claude Code