The plugin lifecycle tests stub `python -m venv` with a runner that
always creates bin/python and lib/python3.13/site-packages. On Windows
the installer looks for Scripts/python.exe and Lib/site-packages
(_venv_python, _installed_package_path), so six lifecycle and recovery
tests failed there with "installed plugin package root is missing"
before reaching what they test.
Build the stub with the installer's own _venv_python and the
platform's site-packages path. No assertion changes.
The plugin installer and the plugin worker run their children with a
POSIX-only allowlist (PATH, HOME, LANG, TMPDIR, ...). On Windows that
drops SYSTEMROOT, which Winsock and the TLS providers need: pip fails
to build its SSL context, so every plugin install exited 2, and a worker
cannot open a socket (WinError 10106), so asyncio and HTTP clients fail
before plugin code runs.
Keep SYSTEMROOT, WINDIR, TEMP, TMP, USERPROFILE and PATHEXT when present.
They carry no credentials; provider keys are still dropped.
Adapt the Phase 1 foundation from PR #1309 and complete scoped API lifecycle, pre-import approval, artifact-bound revocation, recovery, bounded workers and frontend isolation. Keep the stronger ecosystem roadmap explicit in the RFC.
Co-authored-by: XZH <cto@xzh.ai>