Repository navigation
testing: release evicted run trackers after their tasks finish - #336409
Russell Lewis (Russe11) wants to merge 3 commits into
Conversation
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
🟢 Approval recommended
The lifecycle fix is coherent, disposal ordering is safe, and relevant edge cases have regression coverage.
Pull request overview
Fixes retained extension-host test-run trackers when result history evicts entries.
Changes:
- Emits removal events for evicted results.
- Defers tracker disposal until active tasks become idle.
- Adds regression coverage for eviction, re-entry, and grouped tasks.
File summaries
| File | Description |
|---|---|
testResultService.ts |
Notifies consumers after eviction disposal. |
extHostTesting.ts |
Safely defers and coalesces tracker cleanup. |
testResultService.test.ts |
Covers removal notifications during eviction. |
extHostTesting.test.ts |
Covers deferred and re-entrant disposal. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced (auto)
Note
Copilot is running an experiment and ran this review at Balanced.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Connor Peet (connor4312)
left a comment
There was a problem hiding this comment.
Test runs cannot be disposed when their tasks end. Run information is needed for later async lookups, e.g. via $getCoverageDetails
|
Hi Connor Peet (@connor4312) — I addressed the change request in 7097eb8 by preserving a run through its own completion and evicting it only on a later completed-history event. I also added saturated-history and post-completion coverage lookup regressions. Could you please re-review? |
Fixes #336408. Follow-up to #333244's result-store disposal fix.
When completed test history is trimmed,
TestResultServicenow emits the existing removal notification after disposing the removed result. Active runs no longer consume completed-history slots, and a run is protected from eviction during its own completion so extension-host data remains available for later asynchronous lookups such as$getCoverageDetails. A later completed-history event can evict it through the existing$disposeRunlifecycle.Regression coverage
Validation
Based on
f80869ac3889f66f437dcbc430b83755ff7d0807; latest patch commit7097eb8.On macOS arm64 with Node 24.18.0:
All commands passed; the two complete browser suites reported 47 passing tests.