Repository navigation
tests: pin the loop guard's stuck rule and abort cascade - #342
Open
Lanre Shittu (Shizoqua) wants to merge 1 commit into
Open
Lanre Shittu (Shizoqua) wants to merge 1 commit into
Lanre Shittu (Shizoqua) wants to merge 1 commit into
Conversation
`rules.is_stuck` and `rules.assess_abort` decide when the loop guard redirects or stops a turn, but no test calls them directly: they are exercised through `TurnGuard` and the experiments' controllers. These tests pin their rules with the default thresholds: - stuck needs every condition, each threshold inclusive: run 20 turns, churn on one file (4) or scatter over several (3), 6 error outputs, and stagnation 0.20; any one missing is not stuck; - with no judge, a stuck turn aborts only past the envelope; - the backstop (2.5x the envelope, or a cap-aware `backstop_turns`) aborts a stuck turn before the judge is asked, and a turn that is not stuck goes on past it; - the gate spends nothing below 18 turns or without a repeated failure, 8 errors or a turn past the envelope (unless `gate_over_envelope` is off); - only a stuck verdict at 0.7 confidence or more aborts; a productive, unsure, missing or failed verdict spares the turn, also past the envelope. No behavior changes.
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.
rules.is_stuckandrules.assess_abortdecide when the loop guard redirects or stops a turn, but no test calls them directly: they are exercised throughTurnGuardand the experiments' controllers. This addstests/test_loopguard_rules.py, 21 tests that pin their rules with the default thresholds:backstop_turns) aborts a stuck turn before the judge is asked, and a turn that is not stuck goes on past it;gate_over_envelopeis off;No code changes. All 21 pass on main. To check they guard something, I broke
rules.pysix ways (the repeated-failure condition dropped, the confidence threshold made exclusive, the backstop ignoring the heuristic, the envelope no longer opening the gate, the cap-aware backstop ignored, an unsure verdict aborting), and each one fails at least one of these tests.The skips need Windows, a real agent CLI (Codex, Hermes, opencode) or aider, or a non-root user.