Skip to content

hack: repair unusable Python venvs instead of trusting the directory - #1316

Open
Benjamin Elder (BenTheElder) wants to merge 1 commit into
agent-substrate:mainfrom
BenTheElder:fix-stale-venv
Open

hack: repair unusable Python venvs instead of trusting the directory#1316
Benjamin Elder (BenTheElder) wants to merge 1 commit into
agent-substrate:mainfrom
BenTheElder:fix-stale-venv

Conversation

@BenTheElder

Copy link
Copy Markdown
Collaborator

Guarding on [ ! -d "$VENV_DIR" ] treats an interrupted create (no bin/activate) and an interpreter upgrade (dangling bin/python3) as a good venv, so the script dies in source venv/bin/activate and the only fix is knowing to delete the directory. Probe that the venv runs, and rebuild with --clear to relink the interpreter.

Also install requirements unconditionally, which is cheap. The license verifier skipped the install whenever the venv already existed, so it passed without ever seeing a newly added dependency.

Fixes failure encountered by Taahir Ahmed (@ahmedtd). Not filing an issue because this is pretty trivial.

AI-assisted.

Guarding on `[ ! -d "$VENV_DIR" ]` treats an interrupted create (no
bin/activate) and an interpreter upgrade (dangling bin/python3) as a good
venv, so the script dies in `source venv/bin/activate` and the only fix is
knowing to delete the directory. Probe that the venv runs, and rebuild with
--clear to relink the interpreter.

Also install requirements unconditionally, which is cheap. The license
verifier skipped the install whenever the venv already existed, so it passed
without ever seeing a newly added dependency.
@BenTheElder Benjamin Elder (BenTheElder) added kind/bug Something isn't working / bugfixes area/tests Enhancing / fixing test coverage. area/dev-infra labels Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dev-infra area/tests Enhancing / fixing test coverage. kind/bug Something isn't working / bugfixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant