Skip to content

Fix environment extension activation with scoped settings - #26117

Open
Eleanor Boyd (eleanorjboyd) wants to merge 3 commits into
microsoft:mainfrom
eleanorjboyd:fix-environments-extension-scope-activation
Open

Fix environment extension activation with scoped settings#26117
Eleanor Boyd (eleanorjboyd) wants to merge 3 commits into
microsoft:mainfrom
eleanorjboyd:fix-environments-extension-scope-activation

Conversation

@eleanorjboyd

Copy link
Copy Markdown
Member

Summary

  • align useEnvExtension() with the Python Environments extension's window-wide explicit-disable rules
  • fall back to the legacy environment path when any configuration scope explicitly disables Python Environments
  • add regression coverage for conflicting global/workspace values and the enabled path
  • isolate the memoized activation decision between tests

Fixes #26068

Validation

  • ./node_modules/.bin/tsc -p ./
  • ESLint on the changed source and test files
  • focused affected suites: 32 passing, 3 pending
  • full unit suite: 5,170 passing, 36 pending, with 2 unrelated existing Posix Known Path Locator failures

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bschnurr

Bill Schnurr (bschnurr) commented Aug 28, 2026

Copy link
Copy Markdown
Member

🔒 Automated review in progress — Bill Schnurr (@bschnurr) is auto-reviewing this PR.

@bschnurr

Copy link
Copy Markdown
Member

Verification: The relevant tests could not be fully run in the isolated environment; this review is not fully verified.

Result: could-not-verify

Summary: The PR adds two focused regression tests for scoped environment-extension activation. No tests could execute because the isolated container image is unavailable for `microsoft/vscode-python`, and local fallback was not authorized. Verification is therefore blocked by the environment.

Test runs: 1 not run

  • ⚠️ Not run | Dependency and test discovery | git status --short && git diff --name-status upstream/main...HEAD && git diff --stat upstream/main...HEAD && if exist node_modules (echo NODE_MODULES_PRESENT) else (echo NODE_MODULES_MISSING)
⚠️ Dependency and test discovery diagnostic output
Container verification could not start: no trusted sandbox image is configured for microsoft/vscode-python. Local execution was not authorized.

@bschnurr Bill Schnurr (bschnurr) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Review Center.

@bschnurr Bill Schnurr (bschnurr) added the review-auto:approved Automated review: no blocking findings (approval posted). label Aug 28, 2026
@bschnurr

Copy link
Copy Markdown
Member

Verification: The relevant tests could not be fully run in the isolated environment; this review is not fully verified.

Result: could-not-verify

Summary: Verification could not run because no trusted sandbox image is configured for `microsoft/vscode-python`, and local execution was not authorized. The PR adds two focused unit tests covering conflicting scoped settings and the enabled path. No executable test result was obtained, so confidence is limited.

Test runs: 1 not run

  • ⚠️ Not run | Verification preflight and test discovery | git status --short && git diff --name-status upstream/main...HEAD && git diff --stat upstream/main...HEAD && node -e "const p=require('./package.json'); console.log(JSON.stringify({scripts:p.scripts},null,2))" && if [ -d node_modules ]; then echo NODE_MODULES_PRESENT; else echo NODE_MODULES_MISSING; fi
⚠️ Verification preflight and test discovery diagnostic output
Container verification could not start: no trusted sandbox image is configured for microsoft/vscode-python. Local execution was not authorized for this PR HEAD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-auto:approved Automated review: no blocking findings (approval posted).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python activation fails when environment extension settings conflict across scopes

3 participants