Repository navigation
loopguard: count a test run in a conda environment as a verification - #255
Merged
Saksham Uboweja (SakshamUboweja) merged 1 commit intoNov 18, 2026
Conversation
`conda run -n ml pytest`, `mamba run -p ./env python -m pytest` and `micromamba run -n ml pytest` run the tests in a named or prefixed environment, as `uv run` and `poetry run` do in theirs. The prefix pattern knew those launchers but not conda's, so the run was not a verification, and a failing run after the last edit left the turn counted as ended green. The micro-skills observer already learns and injects the `conda run -n <env>` form, so an agent following that fact ran a command the loop guard did not read. conda, mamba and micromamba `run` are now passed over with their options; `-n`, `-p`, `-r`, `--name`, `--prefix`, `--root-prefix` and `--cwd` take a value. `conda run -n ml python train.py` and `conda install pytest` are still not test runs.
Saksham Uboweja (SakshamUboweja)
merged commit Nov 18, 2026
ec13f5a
into
microsoft:main
10 checks passed
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.
conda run -n ml pytest,mamba run -p ./env python -m pytestandmicromamba run -n ml pytestrun the tests in a named or prefixed environment, asuv runandpoetry rundo in theirs. The prefix pattern knew those launchers but not conda's, so the run was not a verification, and a failing run after the last edit left the turn counted as ended green. The micro-skills observer already learns and injects theconda run -n <env>form, so an agent following that fact ran a command the loop guard did not read.Fix: conda, mamba and micromamba
runare passed over with their options in_PREFIX_RE;-n,-p,-r,--name,--prefix,--root-prefixand--cwdtake a value.conda run -n ml python train.py,conda install pytestandconda run -n ml pytest --collect-onlyare still not test runs. The new alternative sits apart from the lines #240 and #247 change, and the branch merges with both.Tests, in a new
tests/test_loopguard_conda_run.py:test_a_runner_in_a_conda_environment_counts_as_a_verification: 11 commands. Each is a verification, and a failing run after an edit is not ended green. All 11 fail on main (assert None == 'own') and pass with the fix.test_conda_leaves_what_it_runs_to_decide: 4 commands that stay non-runs.The skips need Windows, a real agent CLI (Codex, Hermes, opencode) or aider, or a non-root user.
Fixes #251