# Test ledger

Branch: dhruvi/python-venv-version-change - Commit: d60beab945

## Environment
- Positron 2026.10.0 build 0, dev build of d60beab945 (Code - OSS 1.134.0), on Ubuntu 24.04.4 LTS (Linux x86_64).
- Python 3.12.3 (`/usr/bin/python3.12`), Python 3.13.0 (pyenv, `/root/.pyenv/versions/3.13.0`), Python 3.10.12 (uv-managed, `/root/.venv`), uv 0.12.9. Workspace venvs are made with `uv venv` in the app's terminal, and consoles use Positron's bundled ipykernel.
- Two instances. The pre-launched one (CDP 36561) is opened on `/tmp/exploratory-workspace`, which had no venv at launch, so the Python 3.10.12 (uv: root) console it started by itself stayed open all run. A second, fresh one (CDP 34317, Playwright session `replay`) from the CI seed profile, opened on `/tmp/replay-ws`, was the cold replay.

## Logs
- logs/36561-renderer.log | Renderer process, pre-launched instance | 9 errors, none tied to a check (extension manifest warnings, GitHub sign-in, one exited-session message at 00:09:50 when a console was deleted)
- logs/36561-exthost.log | Extension host, pre-launched instance | 2 errors, neither tied to a check (GitHubLoginFailed, a PET resolve of a `site-packages/parso/python` folder)
- logs/36561-code.log | Main process, pre-launched instance | no errors
- logs/36561-console.log | Browser console, pre-launched instance | 4 errors, none tied to a check
- logs/36561-python-language-pack.log | Python extension output, pre-launched instance | 3 errors, 2 "Unable to find workspace for given file" at start-up and 1 "Failed to clean up sessions" (Noticed O02)
- logs/36561-python-locator.log | Python Locator (PET) output, pre-launched instance | 23 error lines, the PET resolve of `site-packages/parso/python` (Noticed O01) and conda package warnings
- logs/36561-python-kernel.log | Python kernels, pre-launched instance | 9 errors, `asyncio` "Unhandled exception in client_connected_cb" once per console, none tied to a check
- logs/36561-python-1cdb5601-console.log | Python 3.10.12 (uv: root) console | no errors
- logs/36561-python-2a393b29-console.log | Python 3.13.0 (uv: exploratory-workspace) console | no errors
- logs/36561-python-aced0d4d-console.log | Python 3.12.3 (Venv: exploratory-workspace) console | no errors
- logs/all/36561/ | full log tree of the pre-launched instance | see the files above
- logs/34317-renderer.log | Renderer process, replay instance | 7 errors, none tied to a check
- logs/34317-exthost.log | Extension host, replay instance | 1 error (GitHubLoginFailed)
- logs/34317-code.log | Main process, replay instance | no errors
- logs/34317-console.log | Browser console, replay instance | 10 errors, none tied to a check
- logs/34317-python-language-pack.log | Python extension output, replay instance | 4 errors, 2 at start-up and 2 "Failed to clean up sessions" (Noticed O02)
- logs/34317-python-kernel.log | Python kernels, replay instance | 2 errors, the same `asyncio` line, none tied to a check
- logs/34317-python-0e44a651-console.log | Python 3.12.3 (uv: replay-ws) console | no errors
- logs/34317-python-62b1472c-console.log | Python 3.12.3 (System) console | no errors
- logs/all/34317/ | full log tree of the replay instance | see the files above

## Files
- files/pick-rows.sh | the run's helper that opens `Interpreter: Start New Console Session`, saves every row to `logs/` and logs the workspace row | S02, S03, S04, S05, S06, S07, S08, S09, S10; Finding 1

---

## S01 - Recreate the workspace venv with a newer Python while its console runs
Status: pass
Result: The 3.12 console shut down and a new console for the venv started as 3.13.0.
Issue: #4556 fix held

Preconditions:
- 3.12 workspace venv | | `/tmp/exploratory-workspace/.venv` made with `uv venv --python /usr/bin/python3.12 .venv` (with ipykernel installed by `uv pip install ipykernel`)

Steps:
1. Run `Interpreter: Discover All Interpreters`, and wait 20 s.
2. Run `Interpreter: Start New Console Session` and pick `Python 3.12.3 (uv: exploratory-workspace)`.
3. VERIFY Running `import sys; print(sys.version)` in that console prints 3.12.3 -> PASS
   Evidence: S01-01.png
4. Run `rm -rf .venv && uv venv -q --python /root/.pyenv/versions/3.13.0/bin/python3.13 .venv && .venv/bin/python --version` in the terminal, and wait 20 s.
5. VERIFY The 3.12.3 console ends with "shut down successfully" -> PASS
   Evidence: S01-02.png, actions.log:26
6. Run `Interpreter: Start New Console Session` and pick `Python 3.13.0 (uv: exploratory-workspace)`.
7. VERIFY Running `import sys; print(sys.version)` in the new console prints 3.13.0 -> PASS
   Evidence: S01-03.png

## S02 - Recreate the workspace venv and install ipykernel with no console on it
Status: fail - Finding 1
Result: Fails 2/2

Preconditions:
- 3.13 workspace venv listed | S01 | `/tmp/exploratory-workspace/.venv` is Python 3.13.0 and listed as `Python 3.13.0 (uv: exploratory-workspace)`
- root console | | The Python 3.10.12 (uv: root) console the window started at launch is open

Steps:
1. Delete the `Python 3.13.0 (uv: exploratory-workspace)` console from the console's session list.
2. Delete the `Python 3.12.3 (uv: exploratory-workspace)` console from the console's session list.
3. Run `rm -rf .venv && uv venv -q --python /usr/bin/python3.12 .venv && VIRTUAL_ENV=.venv uv pip install -q ipykernel && .venv/bin/python --version` in the terminal, and wait 25 s.
4. Run `Interpreter: Start New Console Session`.
5. VERIFY The picker lists `Python 3.12.3 (uv: exploratory-workspace)` -> FAIL - Finding 1
   Observed: The picker has no row for the workspace venv while the Explorer shows `.venv`.
   Evidence: S02-02.png, logs/S02-picker-rows.txt
   Log: logs/36561-python-language-pack.log:737 | Extension host | 1x (00:09:59, no "add" for the path after it)
     2026-10-06 00:09:59.347 [debug] Python API env change detected /tmp/exploratory-workspace/.venv/bin/python remove
6. Run `Python: Select Interpreter`.
7. VERIFY The Select Interpreter list has a row for `/tmp/exploratory-workspace/.venv/bin/python` -> FAIL - Finding 1
   Observed: The list has no row for the workspace venv.
   Evidence: S02-03.png, logs/S02-select-interpreter-rows.txt
8. Run `Interpreter: Discover All Interpreters`, and wait 20 s.
9. Run `Interpreter: Start New Console Session`.
10. VERIFY The picker lists `Python 3.12.3 (uv: exploratory-workspace)` again -> PASS
    Evidence: S02-04.png, logs/S02-picker-rows-try2-before.txt
11. Run `Interpreter: Start New Console Session`.
12. VERIFY The picker lists `Python 3.12.3 (uv: exploratory-workspace)` -> PASS
    Evidence: S02-05.png, logs/S02-try2-before.txt
13. Run `rm -rf .venv && uv venv -q --python /usr/bin/python3.12 .venv && VIRTUAL_ENV=.venv uv pip install -q ipykernel && .venv/bin/python --version` in the terminal, and wait 25 s.
14. Run `Interpreter: Start New Console Session`.
15. VERIFY The picker lists `Python 3.12.3 (uv: exploratory-workspace)` -> FAIL - Finding 1
    Observed: The picker again has no row for the workspace venv.
    Evidence: S02-06.png, logs/S02-try2-after.txt

## S03 - Recreate the workspace venv with no console on it and no install
Status: fail - Finding 1
Result: Fails 2/3

Preconditions:
- 3.12 workspace venv listed | S02 | `/tmp/exploratory-workspace/.venv` is Python 3.12.3 and listed as `Python 3.12.3 (uv: exploratory-workspace)`, with no console using it
- root console | | The Python 3.10.12 (uv: root) console the window started at launch is open

Steps:
1. Run `rm -rf .venv && uv venv -q --python /usr/bin/python3.12 .venv && .venv/bin/python --version` in the terminal, and wait 20 s.
2. Run `Interpreter: Start New Console Session`.
3. VERIFY The picker lists `Python 3.12.3 (uv: exploratory-workspace)` -> PASS
   Evidence: S03-01.png, logs/S03-picker-rows.txt
4. Run `Interpreter: Discover All Interpreters`, and wait 20 s.
5. Run `rm -rf .venv && uv venv -q --python /usr/bin/python3.12 .venv && .venv/bin/python --version` in the terminal, and wait 20 s.
6. Run `Interpreter: Start New Console Session`.
7. VERIFY The picker lists `Python 3.12.3 (uv: exploratory-workspace)` -> FAIL - Finding 1
   Observed: The picker has no row for the workspace venv.
   Evidence: S03-02.png, logs/S03-try2-after.txt
   Log: logs/36561-python-language-pack.log:1089 | Extension host | 1x (00:14:35, no "add" for the path after it)
     2026-10-06 00:14:35.515 [debug] Python API env change detected /tmp/exploratory-workspace/.venv/bin/python remove
8. Run `Interpreter: Discover All Interpreters`, and wait 20 s.
9. Run `rm -rf .venv && uv venv -q --python /usr/bin/python3.12 .venv && .venv/bin/python --version` in the terminal, and wait 20 s.
10. Run `Interpreter: Start New Console Session`.
11. VERIFY The picker lists `Python 3.12.3 (uv: exploratory-workspace)` -> FAIL - Finding 1
    Observed: The picker has no row for the workspace venv.
    Evidence: S03-03.png, logs/S03-try3-after.txt

## S04 - Switch the venv's Python with `uv venv --clear` while its console runs
Status: pass
Result: The 3.12 console shut down and the picker lists the venv as Python 3.13.0.
Issue: #4556 fix held

Preconditions:
- 3.12 workspace venv | S03 | `/tmp/exploratory-workspace/.venv` is Python 3.12.3
- root console | | The Python 3.10.12 (uv: root) console the window started at launch is open

Steps:
1. Run `Interpreter: Discover All Interpreters`, and wait 20 s.
2. Run `Interpreter: Start New Console Session` and pick `Python 3.12.3 (uv: exploratory-workspace)`.
3. VERIFY Running `import sys; print(sys.version)` in that console prints 3.12.3 -> PASS
   Evidence: S04-01.png
4. Run `uv venv -q --clear --python /root/.pyenv/versions/3.13.0/bin/python3.13 .venv && .venv/bin/python --version` in the terminal, and wait 20 s.
5. VERIFY The 3.12.3 console ends with "shut down successfully" -> PASS
   Evidence: S04-02.png, actions.log:100
6. Run `Interpreter: Start New Console Session`.
7. VERIFY The picker lists `Python 3.13.0 (uv: exploratory-workspace)` -> PASS
   Evidence: S04-03.png, logs/S04-picker-rows.txt

## S05 - Change the venv's Python version with no console on it
Status: fail - Finding 1
Result: Fails 2/2

Preconditions:
- 3.13 workspace venv | S04 | `/tmp/exploratory-workspace/.venv` is Python 3.13.0
- root console | | The Python 3.10.12 (uv: root) console the window started at launch is open

Steps:
1. Delete the `Python 3.12.3 (uv: exploratory-workspace)` console from the console's session list.
2. Run `Interpreter: Start New Console Session`.
3. VERIFY The picker lists `Python 3.13.0 (uv: exploratory-workspace)` -> PASS
   Evidence: S05-01.png, logs/S05-before.txt
4. Run `rm -rf .venv && uv venv -q --python /usr/bin/python3.12 .venv && .venv/bin/python --version` in the terminal, and wait 20 s.
5. Run `Interpreter: Start New Console Session`.
6. VERIFY The picker lists `Python 3.12.3 (uv: exploratory-workspace)` -> FAIL - Finding 1
   Observed: The picker has no row for the workspace venv at either version, while the Explorer shows `.venv`.
   Evidence: S05-02.png, logs/S05-after.txt
   Log: logs/36561-python-language-pack.log:1489 | Extension host | 1x (00:18:39, no "add" for the path after it)
     2026-10-06 00:18:39.958 [debug] Python API env change detected /tmp/exploratory-workspace/.venv/bin/python remove
7. Run `Interpreter: Discover All Interpreters`, and wait 20 s.
8. Run `rm -rf .venv && uv venv -q --python /root/.pyenv/versions/3.13.0/bin/python3.13 .venv && .venv/bin/python --version` in the terminal, and wait 20 s.
9. Run `Interpreter: Start New Console Session`.
10. VERIFY The picker lists `Python 3.13.0 (uv: exploratory-workspace)` -> FAIL - Finding 1
    Observed: The picker has no row for the workspace venv.
    Evidence: S05-03.png, logs/S05-try2-after.txt

## S06 - Cold instance: recreate the venv with a newer Python while its console runs
Status: pass
Result: In a fresh instance the venv's console shut down and the picker lists the venv as Python 3.13.0.
Issue: #4556 fix held

Preconditions:
- 3.12 replay venv | | `/tmp/replay-ws/.venv` made with `uv venv --python /usr/bin/python3.12 .venv` before launch
- fresh instance | | A new instance from the CI seed profile, opened on `/tmp/replay-ws`

Steps:
1. Wait for the window to start the `Python 3.12.3 (uv: replay-ws)` console by itself.
2. Run `Terminal: Create New Terminal`.
3. Run `rm -rf .venv && uv venv -q --python /root/.pyenv/versions/3.13.0/bin/python3.13 .venv && .venv/bin/python --version` in the terminal, and wait 20 s.
4. Run `Interpreter: Start New Console Session`.
5. VERIFY The picker lists `Python 3.13.0 (uv: replay-ws)` -> PASS
   Evidence: S06-02.png, logs/S06-after.txt
6. VERIFY The 3.12.3 console ends with "shut down successfully" -> PASS
   Evidence: S06-03.png, actions.log:143

## S07 - Cold instance: recreate the venv while it is still the selected interpreter
Status: pass
Result: With the venv still the selected interpreter and its console exited, the picker lists it at its new version, 3.12.3.

Preconditions:
- 3.13 replay venv, selected | S06 | `/tmp/replay-ws/.venv` is Python 3.13.0 and is still the workspace's selected interpreter, its console exited

Steps:
1. Run `Interpreter: Start New Console Session`.
2. VERIFY The picker lists `Python 3.13.0 (uv: replay-ws)` -> PASS
   Evidence: S07-01.png, logs/S07-before.txt
3. Run `rm -rf .venv && uv venv -q --python /usr/bin/python3.12 .venv && .venv/bin/python --version` in the terminal, and wait 20 s.
4. Run `Interpreter: Start New Console Session`.
5. VERIFY The picker lists `Python 3.12.3 (uv: replay-ws)` -> PASS
   Evidence: S07-02.png, logs/S07-after.txt

## S08 - Cold instance: change the venv's Python with another interpreter selected
Status: fail - Finding 1
Result: Fails 2/2

Preconditions:
- 3.12 replay venv | S07 | `/tmp/replay-ws/.venv` is Python 3.12.3, with no live console on it

Steps:
1. Run `Python: Select Interpreter`.
2. Pick `Python 3.12.3` (`/usr/bin/python`), and wait for the `Python 3.12.3 (System)` console to start.
3. Run `Interpreter: Start New Console Session`.
4. VERIFY The picker lists `Python 3.12.3 (uv: replay-ws)` -> PASS
   Evidence: S08-01.png, logs/S08-before.txt
5. Run `rm -rf .venv && uv venv -q --python /root/.pyenv/versions/3.13.0/bin/python3.13 .venv && .venv/bin/python --version` in the terminal, and wait 20 s.
6. Run `Interpreter: Start New Console Session`.
7. VERIFY The picker lists `Python 3.13.0 (uv: replay-ws)` -> FAIL - Finding 1
   Observed: The picker has no row for the workspace venv.
   Evidence: S08-02.png, logs/S08-after.txt
   Log: logs/34317-python-language-pack.log:654 | Extension host | 1x (00:23:53, no "add" for the path after it)
     2026-10-06 00:23:53.315 [debug] Python API env change detected /tmp/replay-ws/.venv/bin/python remove
8. Run `Interpreter: Discover All Interpreters`, and wait 20 s.
9. Run `rm -rf .venv && uv venv -q --python /usr/bin/python3.12 .venv && .venv/bin/python --version` in the terminal, and wait 20 s.
10. Run `Interpreter: Start New Console Session`.
11. VERIFY The picker lists `Python 3.12.3 (uv: replay-ws)` -> FAIL - Finding 1
    Observed: The picker has no row for the workspace venv.
    Evidence: S08-03.png, logs/S08-try2-after.txt

## S09 - Change the venv's Python in place, without deleting the folder, while its console runs
Status: pass
Result: Repointing `.venv/bin/python` from 3.13 to 3.12 shut down the 3.13 console, and a new console started as 3.12.3.

Preconditions:
- 3.13 workspace venv | S05 | `/tmp/exploratory-workspace/.venv` is Python 3.13.0
- root console | | The Python 3.10.12 (uv: root) console the window started at launch is open

Steps:
1. Run `Interpreter: Discover All Interpreters`, and wait 20 s.
2. Run `Interpreter: Start New Console Session` and pick `Python 3.13.0 (uv: exploratory-workspace)`.
3. VERIFY Running `import sys; print(sys.version)` in that console prints 3.13.0 -> PASS
   Evidence: S09-01.png
4. Run `/usr/bin/python3.12 -m venv --upgrade --without-pip .venv && .venv/bin/python --version && grep version .venv/pyvenv.cfg` in the terminal, and wait 20 s.
5. VERIFY The 3.13.0 console keeps running, since `.venv/bin/python` still points at 3.13 -> PASS
   Evidence: S09-02.png, actions.log:187
6. Run `ln -sfn /usr/bin/python3.12 .venv/bin/python && .venv/bin/python --version` in the terminal, and wait 20 s.
7. VERIFY The 3.13.0 console ends with "shut down successfully" -> PASS
   Evidence: S09-03.png, actions.log:192
8. Run `Interpreter: Start New Console Session`.
9. VERIFY The picker lists `Python 3.12.3 (Venv: exploratory-workspace)` -> PASS
   Evidence: S09-04.png, logs/S09-after.txt
10. Pick `Python 3.12.3 (Venv: exploratory-workspace)`.
11. VERIFY Running `import sys; print(sys.version)` in the new console prints 3.12.3 -> PASS
    Evidence: S09-05.png

## S10 - Delete the venv folder while its console runs
Status: pass
Result: The venv's console shut down and the venv left the picker.

Preconditions:
- 3.12 workspace venv with console | S09 | The `Python 3.12.3 (Venv: exploratory-workspace)` console is running

Steps:
1. Run `rm -rf .venv` in the terminal, and wait 15 s.
2. VERIFY The 3.12.3 console ends with "shut down successfully" -> PASS
   Evidence: S10-01.png, actions.log:205
3. Run `Interpreter: Start New Console Session`.
4. VERIFY The picker has no row for the workspace venv -> PASS
   Evidence: S10-02.png, logs/S10-after.txt

---

## Noticed
- O01 - While `uv pip install ipykernel` ran into the workspace venv, the Python Locator tried to resolve the folder `.venv/lib/python3.12/site-packages/parso/python` as an interpreter and logged "Permission denied" errors (logs/36561-python-locator.log:20) - seen in the log only, the watcher pattern that matches it predates the change, not checked further
- O02 - Deleting a venv logs "Failed to clean up sessions for deleted interpreter ... Cannot send message to session ...: the kernel has exited" for a console that had already shut down (logs/36561-python-language-pack.log:1877), the live console on the venv still shut down - no user-visible effect seen, not checked further

## Not run
- N01 - The same venv changes on macOS and Windows, whose file watchers report a deleted or created folder differently - environment: Linux container only
- N02 - A conda or pyenv environment whose version changes at the same path (outside the workspace watcher) - out of time, the change targets workspace envs
- N03 - Remote SSH, WSL and Posit Workbench, where the file watcher runs remotely - environment: not available in this container
