Repository navigation
loopguard: pass over env and nice options before a test run - #213
Open
KVR Vishnu (VISHNU0906) wants to merge 1 commit into
Open
KVR Vishnu (VISHNU0906) wants to merge 1 commit into
KVR Vishnu (VISHNU0906) wants to merge 1 commit into
Conversation
env -u VAR pytest and nice -n 10 pytest put options between the wrapper and the runner. The prefix pattern passed over only the bare word, so the run was not a verification, and a failing run after the last edit left the turn counted as ended green. Signed-off-by: KVR Vishnu <46535652+VISHNU0906@users.noreply.github.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.
Hi Aaron Li (@aaron-jx-li), a small one in the loop guard's test-run detection (
loopguard/turn.py)._PREFIX_REpasses overenvandniceonly as bare words. When they take options, the runner after them was not seen:env -u CURSOR_AGENT python -m pytest testsenv -i PATH=/usr/bin go test ./...,env --unset=CI npm test,env -C web npx vitest runnice -n 10 pytest -q,nice -5 go test ./...status_of_testsreturnedNonefor all of these, so the run was not a verification. A failing run after the last edit then leftresolved_proxy()true, and that turn was recorded as ended green.The prefix pattern now also passes over env's options (
-u,-Cand their long forms with their value, flags like-ior a lone-) and nice's adjustment (-n 10,-n10,-5,--adjustment=5). The same pattern is used by_quiet, soenv -u X git status; ...is now read the same way asgit status; ....Tests: one case through
TurnGuard.foldper form above (edit, failing run, thenverifications == 1and not green), and a few that must stay as they were (env -u CI python -m pytest --collect-only,env -u CI echo pytest,nice -n 10 make). With the fix reverted, the 8 new verification cases fail.python -m pytest testspasses on Python 3.10 and 3.13 (908 passed, 16 skipped),experiments/testspasses, andscripts/dead_code.pyoutput is the same as on main.This is independent of #212 (different file).