Conversation
…ands Point the command-authoring and CI-setup skills at the new venv-run one-liner instead of hand-built pytest invocations, and queue the release note.
venv-run has shipped; move its design and plan to the 2026 archive as the final implementation step.
Split the fake-venv fixture into a Unix-only runnable-interpreter builder (kept for tests that actually execute the interpreter) and a new cross-platform builder that writes an interpreter placeholder plus the toolr package at the OS-correct site-packages layout. De-gate not_found_command_gets_nudge and mark_fresh so the command-not-found nudge + exit code 127 assertion runs on Windows too. Note on the ignored runs_in_a_real_synced_venv test that it remains the vehicle for real .exe/PATHEXT resolution and exit-code passthrough on Windows CI.
Owner
Author
|
This change is part of the following stack: Change managed by git-spice. |
…t, runner-path-hygiene, remove-editable-install)
s0undt3ch
marked this pull request as ready for review
July 13, 2026 17:17
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #378 +/- ##
=====================================
Coverage 93.8% 93.8%
=====================================
Files 96 96
Lines 15939 16023 +84
Branches 118 118
=====================================
+ Hits 14958 15039 +81
- Misses 971 974 +3
Partials 10 10
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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
Adds
toolr project venv run [--no-sync] [--quiet] -- <CMD> [ARGS...]— a first-class way to run any command inside the project's managed tools venv. Resolves #373.The one-liner for running a command-package's tests becomes:
Rather than the issue's pytest-specific
toolr test, this is a general runner:testis just one call of it, CI uses it verbatim, and there's zero runner lock-in because there is no runner concept. It lives under the reservedproject venvgroup (nevertoolr run, which would collide with user-defined commands).Behavior
ensure_venv_ready, exactly likevenv shellanduv run), then runs the command with$VIRTUAL_ENV/$TOOLR_VENV/$PATHset so entry points resolve from the venv. Self-healing past the mtime freshness heuristic.--no-sync: pure, uv-free path for deterministic CI — never touches the venv, errors fatally if it is missing or stale.uv run/poetry run/cargo run); child owns stdout/stderr; exit code passes straight through; caller's cwd preserved.argv[0];python -m missingmoduleerrors pass through untouched.--quietforwards to the auto-sync step only;--quietonly, no short-q.Discoverability
project initnext-steps andvenv syncsuccess output now advertise the one-liner.Docs & skills
docs/cli.mdsection + generated--helpsnippet.toolr-command-authoringandtoolr-ci-setupskills teach the new command (authoring for local test runs, CI for--no-syncdeterministic runs).Tests
crates/toolr/tests/project_venv_run.rs: missing-venv / stale errors, exit-code passthrough, arg pass-through via--, command-not-found nudge,--no-syncgating. The not-found nudge runs on all platforms; an ignored real-venv test covers realScripts\*.exePATHEXT resolution + exit-code passthrough on the Windows CI leg.mise run testandprek run --all-filesgreen.Design + plan archived under
specs/archive/2026/.