forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor PythonResultResolver into modular components #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
8
commits into
resonant-duck
Choose a base branch
from
copilot/execute-markdown-plan
base: resonant-duck
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,354
−590
Conversation
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
- Created TestItemIndex class to manage ID mappings between Python test IDs and VS Code TestItems - Updated PythonResultResolver to use TestItemIndex internally - Maintained backward compatibility via getters that expose internal maps - Added comprehensive unit tests for TestItemIndex (16 tests) - All existing Result Resolver tests still pass Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
- Created TestDiscoveryHandler class for stateless discovery processing - Handler processes discovery payloads and updates test tree - Delegates to existing populateTestTree function for backward compatibility - PythonResultResolver now uses static discoveryHandler instance - All existing tests pass (10 Result Resolver tests, 16 TestItemIndex tests) Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
- Created TestExecutionHandler class for stateless execution processing - Handler processes execution payloads and returns subtest statistics - Removed old handler methods from PythonResultResolver - PythonResultResolver now uses static executionHandler instance - All existing tests pass (10 Result Resolver tests, 16 TestItemIndex tests) Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
- Created TestCoverageHandler class for stateless coverage processing - Handler processes coverage payloads and returns detailed coverage data - PythonResultResolver now uses static coverageHandler instance - Simplified imports in resultResolver.ts - All existing tests pass (10 Result Resolver tests, 16 TestItemIndex tests) Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
- Fixed logic error in collectAllTestCases to properly recurse through children - Fixed getTestItem to have proper recursive tree search - Added findTestItemById helper for recursive tree traversal - All 26 tests pass (16 TestItemIndex + 10 Result Resolver) Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Execute plan described in markdown file
Refactor PythonResultResolver into modular components
Dec 1, 2025
Copilot finished work on behalf of
eleanorjboyd
December 1, 2025 03:30
c6e202a to
1b4f4c8
Compare
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.
Decomposes the monolithic
PythonResultResolverclass into focused, testable components following the design spec inresultHandlerRefactor.md.Changes
New Components
TestItemIndex- Stateful per-workspace component managing ID mappings between Python test IDs and VS Code TestItems. Provides O(1) lookups with validation and tree-search fallback.TestDiscoveryHandler- Stateless handler for discovery payload processing and test tree populationTestExecutionHandler- Stateless handler for execution results (pass/fail/skip/error/subtest)TestCoverageHandler- Stateless handler for coverage payload processingArchitecture
PythonResultResolverbecomes a pure facade delegating to static singleton handlersTestItemIndexmaintains state (per workspace)Tests
TestItemIndexcovering registration, lookup, validation, and cleanupPythonResultResolvertests pass unchangedOriginal prompt
Created from VS Code via the GitHub Pull Request extension.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.