Repository navigation
microskills: read conda run -p and micromamba run as the command they run - #256
Merged
Saksham Uboweja (SakshamUboweja) merged 1 commit intoNov 18, 2026
Conversation
… run `conda run` names its environment by name (`-n ml`) or by path (`-p ./env`, `--prefix`), and micromamba takes the same options. The observer read only `conda|mamba run -n NAME`, so `conda run -p ./env pytest` was observed as a call to the package tool `conda`, and `micromamba run -n ml pytest` was not observed at all. A repository that keeps its environment under a path, or uses micromamba, never got a fact naming the command that works there. The form now keeps the environment as typed (`conda run -p ./env pytest`, `micromamba run -n ml pytest`); `--prefix=` and `--name=` are read too. `mamba run` is still written as `conda run`, as before.
Saksham Uboweja (SakshamUboweja)
merged commit Nov 18, 2026
49394f1
into
microsoft:main
11 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 runnames its environment by name (-n ml) or by path (-p ./env,--prefix), and micromamba takes the same options. The observer read onlyconda|mamba run -n NAME, soconda run -p ./env pytestwas observed as a call to the package toolconda, andmicromamba run -n ml pytestwas not observed at all. A repository that keeps its environment under a path, or uses micromamba, never got a fact naming the command that works there.Fix:
_CONDA_RUN_REreads-n/--nameand-p/--prefix(with a space or=), and the form keeps the environment as typed (conda run -p ./env pytest,micromamba run -n ml pytest).mamba runis still written asconda run, as before.micromambajoinscondainenvfacts._RUN_WORDS, the launcher words that do not name the tool itself.Tests, in a new
tests/test_observe_conda_run.py:-nones pass on both;conda run -p ./env pytestis a test run andconda install -n ml pytestis still a package-tool call;EnvFactsDistilleron four made-up Codex sessions wherepython -m pytestfails andconda run -p ./env python -m pytestpasses: the rendered block names the conda form. It fails on main and passes with the fix.The skips need Windows, a real agent CLI (Codex, Hermes, opencode) or aider, or a non-root user.
Fixes #252