Repository navigation
fix(tests): drain shared database workers before fixture cleanup - #148734
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 14, 2026, 11:52 PM ET / September 15, 2026, 03:52 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR makes Memory Wiki and Microsoft Teams tests await shared database shutdown before discarding fixtures, preserving the Teams state environment through cleanup. Merge readiness✅ Ready for maintainer review This remains a useful, narrowly scoped fixture repair that current main lacks. No actionable introduced defect was found, and the reviewed head passed CI. Priority: P3 Review scores
Verification
How this fits togetherThese plugin tests exercise SQLite-backed state using temporary directories. Their teardown must finish shared database worker activity before resetting stores or deleting those directories. flowchart TD
A[Plugin test operations] --> B[Shared database workers]
B --> C[Await database shutdown]
C --> D[Reset test stores]
C --> E[Remove temporary directories]
E --> F[Restore Teams environment]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +4. Total +4 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep fixture teardown on the existing asynchronous shutdown owner while preserving production admission checks and test assertions. Do we have a high-confidence way to reproduce the issue? Yes for the missing teardown join: current source removes fixtures or resets native stores without awaiting registered workers. The precise admission failures reported in CI were not reproduced, and their identity-generation cause remains unproven. Is this the best way to solve the issue? Yes. Awaiting the existing shutdown owner repairs the lifecycle ordering without weakening assertions, increasing deadlines, or changing production reset contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 740b1f14fdba. LabelsLabel changes:
Label 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.
|
Join plugin publication and index settlement under the owning lifecycle. Route database-backed authority fixtures through the existing forked owner. Co-authored-by: Jason (Json) <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Source-commit: 28c232b Upstream-PR: #148734
Join plugin publication and index settlement under the owning lifecycle. Route database-backed authority fixtures through the existing forked owner. Co-authored-by: Jason (Json) <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Source-commit: 28c232b Upstream-PR: #148734
Join plugin publication and index settlement under the owning lifecycle. Route database-backed authority fixtures through the existing forked owner. Co-authored-by: Jason (Json) <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Source-commit: 28c232b Upstream-PR: #148734
What Problem This Solves
Memory Wiki and Teams fixtures could remove their temporary state directories or reset native stores before shared database workers finished closing. Both fixtures appeared in CI failures reporting that state database read admission changed during initial worker publication.
User Impact
No user-visible runtime change. The tests now finish shared database cleanup before discarding their isolated state; production admission checks and public reset contracts are unchanged.
Why This Change Was Made
Await the existing shared database close owner before resets and directory removal. The Teams consent-card fixture keeps its original state environment in place through cleanup and restores it in a nested finally block.
Related: #148623, #148679. The missing joined cleanup is source-proven; the original logs do not establish which identity or generation changed, so this does not claim a diagnosed inode collision.
Evidence
The Memory Wiki migration and Teams bulk/corrupt-data scenarios were not replayed locally; Memory Wiki cleanup ordering was checked against its nested harness lifecycle and covered by source review and type checks. Exact-head CI passed at
2b4d0bba3bcf818395204c66244fd2b96ac3e829: CI run.