Skip to content

Make installer recover safely from stale virtualenvs - #32

Merged
MarcelT87 merged 3 commits into
mainfrom
fix/installer-existing-venv
Oct 5, 2026
Merged

MarcelT87 merged 3 commits into
mainfrom
fix/installer-existing-venv

Conversation

@MarcelT87

Copy link
Copy Markdown
Owner

Summary

Make repeated beginner installations/upgrades safer when a checkout already contains a stale or broken .venv.

Previously, install.sh reused any existing .venv directory without validating the interpreter or pip inside it. That could turn an otherwise valid host Python setup into a confusing pip/bootstrap failure.

Behaviour

The installer now:

  • validates the host Python as before;
  • reuses a healthy existing project-local virtual environment;
  • detects a recognizable but unusable/unsupported virtual environment and recreates only .venv;
  • verifies the recreated environment provides Python 3.11+ and pip;
  • refuses to modify:
    • a symbolic link named .venv;
    • a non-directory named .venv;
    • an ordinary directory named .venv that does not contain pyvenv.cfg.

Unknown files are therefore never deleted automatically.

Runtime data such as data/, collected Evidence and contexts is not part of the repair path.

Beginner-flow coverage

CI now verifies that:

  • rerunning the installer reuses a healthy virtual environment;
  • a recognizable broken virtual environment is recreated automatically;
  • existing data/ content survives that repair;
  • an unknown .venv directory is rejected and its marker file remains untouched;
  • removing that unknown directory and rerunning the normal installer succeeds.

Documentation

The install guide now explains safe reinstall/upgrade behaviour and what happens when .venv is damaged or unexpected.

Scope

Installer and beginner UX only.

No parser, Evidence, profile, bundle, submission or heating-system behaviour changes.

@MarcelT87
MarcelT87 merged commit 9d22b11 into main Oct 5, 2026
5 checks passed
@MarcelT87
MarcelT87 deleted the fix/installer-existing-venv branch October 5, 2026 14:25
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.

1 participant