openclaw/docs/help
Peter Steinberger 931c7b40b2
fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792)
* fix(test): load compiled-subprocess declarations at collection

The first load of a compiled-subprocess declaration in a Vitest invocation
prepares the whole compiled worker generation (tens of seconds warm, minutes
cold). 387 test files first reached a declaration through an await import()
inside a test body or hook, so their first test or hook absorbed that
preparation and could time out.

Move those loads to collection at their owner: static subject imports,
static imports in the shared helpers that owned the lazy load, and a named
side-effect preload (src/test-utils/prepare-compiled-subprocesses.ts) for
suites that re-import their subject per test or whose first load happens in
production code they call. plugin-test-runtime keeps the host-capability
fixture lazy so its other consumers do not start loading that graph.
Document the rule in docs/help/testing/writing-tests.md.

335 of the 387 files now load their first declaration before collection
ends; 52 remain (48 extension tests needing an SDK preload, one package
test, three files over the line cap).

* fix(test): retain npm install fixture reuse

Preserve the existing failedSpawn reuse after merging main so the collection-time preload stays within the line-cap ratchet. Assertions and import ordering are unchanged.

* fix(test): keep memory-core facade cold-import assertion meaningful

The static subject import ran before beforeEach reset the loader mock, so the cold-import assertion passed vacuously. Restore the in-test subject imports after mock setup and preload the compiled-subprocess declaration during collection instead.
2026-10-01 11:42:59 -07:00
..
faq improve: sessions_send delivers a peer's reply once instead of running automatic agent ping-pong (#162227) 2026-10-01 17:28:00 +00:00
faq-first-run fix: skip official setup approvals and default to Astra (#145646) 2026-09-12 00:34:25 -07:00
testing fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792) 2026-10-01 11:42:59 -07:00
testing-live fix(fireworks): replace the retired GLM 5.2 Fast default router (#160102) 2026-09-27 22:19:45 -07:00
debugging.md improve: use compiled Doctor contracts in built checkouts (#144676) 2026-09-11 00:49:15 -07:00
environment.md fix(launcher): keep the Node compile-cache path short on Windows (#162841) 2026-10-01 11:29:41 -07:00
faq-first-run.md docs: fix and reciprocate cross-page links across install, help, reference, start, and web (#143773) 2026-09-10 15:35:25 +09:00
faq-models.md feat(anthropic): support Claude Sonnet 5.5 (#160847) 2026-09-29 02:49:52 +00:00
faq.md docs: close the remaining ia and ste findings (#144089) 2026-09-10 22:28:26 +08:00
index.md docs: fix and reciprocate cross-page links across install, help, reference, start, and web (#143773) 2026-09-10 15:35:25 +09:00
scripts.md refactor(scripts): deslop tooling scripts (#160798) 2026-09-28 17:20:56 -07:00
testing-live.md docs: fix and reciprocate cross-page links across install, help, reference, start, and web (#143773) 2026-09-10 15:35:25 +09:00
testing-updates-plugins.md feat: back up to external disks and Cloudflare R2 with storage locations (#161913) 2026-10-01 02:05:44 -07:00
testing.md docs: close remaining cross-link gaps across concepts, gateway, and security (#143923) 2026-09-10 18:34:34 +08:00
troubleshooting.md fix(onboarding): default to Full tools and unify catalog discovery (#150596) 2026-09-17 12:46:58 +05:30