mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 17:53:39 +00:00
skills.status and skill snapshot preparation start real @openclaw/fs-safe watchers. In the shared-worker (non-isolated) Vitest lanes a file that never closed them left them running after the module reset, unreachable, and their re-armed poll and change-hint timers landed on whichever fake clock a later file installed. That file's vi.runAllTimersAsync() then aborted after 10000 timers, far from the cause (session-catalog.session-share.test.ts; leaker fixed in #162261, an earlier occurrence patched at the victim in #114751). The non-isolated runner now remembers every real refresh.ts generation from Vite's evaluated module graph, pairing each closeSkillsWatchers export with the registry instance that generation imported. It captures at task boundaries and before every vi.resetModules(), so generations a test erases or shadows mid-test are still seen. After each file it closes leftover watchers and fails that file with "skills watchers failed", naming it. No production code changes. The composite runner test gains a producer/observer pair: the producer leaves two reset and shadowed generations open, and the observer in the next file asserts both were closed. Without the drain, the reset wrapper, or the import-graph pairing, the producer passes and the observer sees a live owner. |
||
|---|---|---|
| .. | ||
| faq | ||
| faq-first-run | ||
| testing | ||
| testing-live | ||
| debugging.md | ||
| environment.md | ||
| faq-first-run.md | ||
| faq-models.md | ||
| faq.md | ||
| index.md | ||
| scripts.md | ||
| testing-live.md | ||
| testing-updates-plugins.md | ||
| testing.md | ||
| troubleshooting.md | ||