Repository navigation
fix(doctor): close test state before Windows fixture cleanup - #150676
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 17, 2026, 2:46 AM ET / 06:46 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR closes cached test databases before deleting temporary directories and keeps coordinator files in a suite-owned directory to prevent Windows cleanup failures. Merge readiness✅ Ready for maintainer review This remains a useful, focused fixture repair absent from current main. No actionable defect was found, and the protected maintainer PR should remain open for normal landing. Priority: P3 Review scores
Verification
How this fits togetherDoctor’s plugin-install tests exercise repair behavior using temporary homes and SQLite state. Their fixture lifecycle must release database workers and handles before removing those homes. flowchart TD
A[Plugin repair test cases] --> B[Temporary homes and SQLite state]
C[Suite-owned coordinator directory] --> B
B --> D[Await database worker and handle shutdown]
D --> E[Remove per-case directories]
E --> F[Clean up suite home]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +25. Total +25 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep fixture teardown with its existing lifecycle owners so database resources settle before temporary homes are removed. Do we have a high-confidence way to reproduce the issue? Yes, the existing Windows suite provides a concrete reproduction path: per-case homes can be removed while cached SQLite resources remain open. The PR reports baseline EPERM reproduction; this review verified the source mechanism without executing tests. Is this the best way to solve the issue? Yes. Reusing the asynchronous shutdown and coordinator-directory owners fixes fixture lifetime ordering without weakening coverage or altering production behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8b9739cc48c0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
What Problem This Solves
Fixes Windows Doctor plugin-install tests failing during temporary-directory cleanup because cached SQLite handles and coordinator files outlive the per-case homes.
User Impact
No product behavior changes. The existing Windows test suite cleans up its state reliably without retries or relaxed assertions.
Why This Change Was Made
Use the existing coordinator runtime-directory owner for the suite lifetime, and drain cached state workers and database handles before removing each case's tracked directories. The existing fixture helper owns this setup together with the hermetic test home.
Evidence
EPERMthrough the unchanged suite on Windows.