Repository navigation
loopguard: ignore dry-run, compile-only, and list commands across test runners - #311
Open
Xinghan Pan (PStarH) wants to merge 1 commit into
Open
Xinghan Pan (PStarH) wants to merge 1 commit into
Xinghan Pan (PStarH) wants to merge 1 commit into
Conversation
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.
Summary
A test runner asked only to list tests, print configuration, or compile/dry-run does not execute any tests and should not count as a verification run:
cargo test --no-run(compiles test binaries without execution);go test -list <pattern>(lists tests matching pattern);ctest --show-only(shows available CTest targets without running);jest --showConfig/vitest --show-config(dumps test configuration);playwright test --dry-run(dry-run without running test specs).Previously, because
_NOT_A_RUN_REonly matched--help,--version,--collect-only,--co, and--list\S*, commands likecargo test --no-runorgo test -listreturnedstatus_of_tests(...) -> "own". When an agent ran one of these commands after a failing test run, the 0 exit code causedresolved_proxy()to falsely mark the failing turn as "ended green", feeding false resolutions into the envelope tracker.Changes
_NOT_A_RUN_REintokeneconomizer/loopguard/turn.pyto match(?i)\s(?:-h|--help|--version|--collect-only|--co|-{1,2}list\S*|--no-run|--dry-run|--show-only\S*|--show-?config)(?!\S).tests/test_loopguard_dry_run_and_list.pyverifying status and ensuring failed turns are not falsely turned green.Verification
pytest tests/test_loopguard_dry_run_and_list.py tests/test_loopguard*.pypassed (136 passed in 2.83s).pytest tests/test_live_core.pypassed (316 passed in 8.32s).