Implement Phase 2: Per-project test discovery for multi-project workspaces#43
Closed
Implement Phase 2: Per-project test discovery for multi-project workspaces#43
Conversation
Owner
|
@copilot saw your planning and you don't need: Create Project Root Detection. the environments extension handles detection, you just query the env ext api to get the info. Also lets rely on existing file watchers now, since they already exist for the test updating. If you feel they don't cover it add a todo and we can cirlce back |
- Created projectRootFinder.ts utility to detect Python project roots - Updated PythonTestController to support multiple projects per workspace - Modified discovery flow to detect projects and create adapters for each - Updated test execution to route tests to correct project adapter Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
- Created comprehensive unit tests for projectRootFinder - 8/12 tests passing - helper functions working correctly - Some stub configuration issues with findFiles to be resolved - Core functionality (isFileInProject, findProjectForTestItem) fully tested Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement phase 2 of project discovery
Implement Phase 2: Per-project test discovery for multi-project workspaces
Jan 8, 2026
- Removed custom projectRootFinder.ts utility - Use environment extension's getPythonProjects() API - Query projects from env ext when available - Fall back to workspace as single project if env ext not available - Maintain per-project adapter architecture for discovery and execution Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
Author
Updated implementation to use the environment extension API instead of custom project detection:
Commit: 24d8613 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, test discovery ran once per workspace folder. This fails for monorepos with multiple Python projects, where each project has its own configuration (pyproject.toml, pytest.ini, setup.py).
Changes
Project Detection
getPythonProjects()API to detect Python projectsController Architecture
Map<Uri, WorkspaceTestAdapter>→Map<string, ProjectTestAdapter[]>createProjectAdapter()instantiates adapters with project root as working directoryDiscovery Flow
Test Execution Routing
Example
For a workspace with structure:
Discovery now runs twice (once per project) with correct working directories, instead of once at workspace root with potentially incorrect configuration.
Backward Compatibility
Single-project workspaces behave identically to before. When environment extension is not available, falls back to treating workspace as single project.
Original prompt
Created from VS Code.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.