Skip to content

✨ Venv recovery, requires-python reuse, --venv-dir, and logging#20

Open
ThatXliner wants to merge 5 commits into
mainfrom
feat/venv-improvements-logging
Open

✨ Venv recovery, requires-python reuse, --venv-dir, and logging#20
ThatXliner wants to merge 5 commits into
mainfrom
feat/venv-improvements-logging

Conversation

@ThatXliner

Copy link
Copy Markdown
Owner

Implements five open issues around venv handling and observability.

Changes

Tests

Added coverage for broken-venv recreation, `--venv-dir`, and `-v` logging. Full suite green (20 passed); ruff + black + isort + mypy --strict clean.

🤖 Generated with Claude Code

ThatXliner and others added 5 commits June 2, 2026 00:36
Reuse of a cached venv assumed the directory was intact. A venv left
half-built by an interrupted dependency install, or one whose interpreter
later went missing, was returned as-is and broke every later run.

Validate bin/python before reusing a cached venv and rebuild it when
missing. Wrap creation and install so a failure or KeyboardInterrupt
removes the partial venv instead of leaving a broken cache entry.

Closes #11
Closes #16

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
requires-python resolution always picked the newest installed Python
matching the clause, so loosening a clause (e.g. >=3.11,<3.12 to >=3.11)
spawned a fresh newer venv even though an existing venv still satisfied it.

Pass the dependency hash into resolution and, before selecting the newest
match, prefer any Python that satisfies the clause and already has a usable
cached venv for those dependencies.

Closes #14

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Venvs always lived in the global platformdirs cache, so a script could not
keep its environment alongside itself or in a project-local directory.

Add --venv-dir to create and reuse the venv at an explicit location instead
of the cache.

Closes #15

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
idae was silent about which Python it picked and hid all pip and venv
output, leaving no way to diagnose a slow or failing setup.

Add -v/--verbose: -v reports the resolved run at info level, -vv enables
debug and streams pip/venv output instead of capturing it. Output stays
quiet by default.

Closes #10

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closes #11 #15 #10 paths had no coverage; add tests for broken-venv
recreation, placing a venv via --venv-dir, and -v info logging. Allow S603
in tests since the verbose test shells out to idae as a subprocess.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REQUEST]: in-directory venv creation [REQUEST]: Improve requires-python resolution [REQUEST]: Check for broken venv [REQUEST]: Logging

1 participant