Repository navigation
fix: a borderline satisfied score no longer ends the browser run early (#57) - #62
Open
bluzername wants to merge 1 commit into
Open
bluzername wants to merge 1 commit into
bluzername wants to merge 1 commit into
Conversation
browser/runner.py stopped the run as done on kind == "done" OR decision.satisfied.noul >= 0.5. 0.5 is a coin flip, and it could override a step where the classifier chose a confident action like click: the run ended right after that action, with no second look, before the chosen action's own next step could run. The desktop loop does not have this problem, it stops only on done/none and every stop goes to the writer to check; the browser loop has no writer review, so this coin flip was the only thing deciding it. Now only kind == "done" ends the run as done. satisfied is still recorded on the Step for the run log, it just cannot override the classifier's own choice of action any more. New test in tests/test_browser_loop.py (FakeTypeSafe steps can now carry a per-step satisfied value): a confident click at satisfied=0.5 runs to completion over 2 steps instead of stopping after step 1. RED confirmed against the old code (it stopped after the click, 1 step not 2), then GREEN. Full suite 731 passed (730 + 1 new), ruff clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Fixes the first part of #57 (the stop-rule bug; the type_text insertText/select note in the same issue is a separate concern, left out so this stays one fix).
browser/runner.pystopped the run as done onkind == "done" or decision.satisfied.noul >= 0.5. A noul of 0.5 is a coin flip, and it could override a step where the classifier had already chosen a confident action, likeclick: the run ended right after that action ran, with no second look, before the step the classifier actually meant to take next could happen. The desktop loop does not have this problem - it stops only ondone/none, and every stop goes to the writer for a check - but the browser loop has no writer review of a stop, so this coin flip alone decided it.What changed:
run_goal(browser/runner.py): onlykind == "done"ends the run asdonenow.decision.satisfied.noulis still recorded on theStepfor the run log, it just cannot override the classifier's own choice of action.Test evidence:
FakeTypeSafeintests/test_browser_loop.pycan now take an optional per-stepsatisfiedvalue (third item of the step tuple, defaults to 0.0 like before, so every existing test is unaffected). New test: a confidentclickatsatisfied=0.5now runs both steps (clickthendone) instead of stopping after the click alone. RED confirmed against the old code (["click"]instead of["click", "done"]), then GREEN. Full suite: 731 passed (730 + 1 new), 2 skipped, 1 xfailed, unchanged otherwise.ruff checkandruff format --checkboth clean.I not a maintainer here, just opening this for review.