Skip to content

API: Query capabilities - #1936

Open
Eduardo Villalpando Mello (edvilme) wants to merge 2 commits into
mainfrom
api-2-query-capabilities
Open

Eduardo Villalpando Mello (edvilme) wants to merge 2 commits into
mainfrom
api-2-query-capabilities

Conversation

@edvilme

@edvilme Eduardo Villalpando Mello (edvilme) commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Related #1837

This pull request enhances the Python environment and package management APIs by adding observational capability queries before executing most public operations. These queries help track and log the capabilities of managers without blocking or affecting the actual operations, improving telemetry and diagnostics.

API Enhancements for Capability Queries:

  • Public environment and package operations now initiate capability queries (using getEnvironmentManagerCapability and getPackageManagerCapability) before delegating to managers. These queries are non-blocking, and failures are logged without impacting the operation's outcome. This applies to actions like create, remove, refresh, set/get selected environment, and package management operations.

@rchiodo

Copy link
Copy Markdown
Contributor

🔒 Automated review in progress — Rich Chiodo (@rchiodo) is auto-reviewing this PR.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Concurrent probes introduce uncached version subprocesses whose runtime impact needs mitigation and validation beyond mocked tests.

1 open issue
What changed in this PR

Adds observational capability queries to public environment and package operations, supporting API 2.0 diagnostics without gating execution.

Changes:

  • Maps operations to non-blocking capability queries.
  • Adds mapping and failure-isolation tests.
  • Documents query behavior and fixture requirements.
File Description
src/​test/​internal/​publicApiCompatibility.unit.test.ts Uses internal manager wrappers and isolates version telemetry.
src/​test/​extensionApi.unit.test.ts Tests capability mapping and operation isolation.
src/​extensionApi.ts Initiates capability queries before manager operations.
docs/​README.md Documents observational query behavior.
.github/​instructions/​testing-workflow.instructions.md Adds guidance for capability-aware test fixtures.

Review effort: Balanced

Comment thread src/extensionApi.ts
Comment on lines +542 to +543
void this.getPackageManagerCapability(context, PackageCapability.List, manager.project)
.catch(logCapabilityQueryError);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debt Code quality issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants