openclaw/src/test-utils
openperf 9a03fe8181 fix(facade-runtime): add recursion guard to facade module loader to prevent infinite stack overflow
Place a sentinel object in the loadedFacadeModules cache before the Jiti
sync load begins.  Re-entrant calls (caused by circular facade references
from constant exports evaluated at module-evaluation time) now receive the
sentinel instead of recursing infinitely.  Once the real module finishes
loading, Object.assign() back-fills the sentinel so any references
captured during the circular load phase see the final exports.

The Jiti load is wrapped in try/catch: on failure the sentinel is removed
from the cache so that subsequent retry attempts re-execute the load
instead of silently returning an empty object.  The function returns the
sentinel (not the raw loaded module) to guarantee a single object identity
for all callers, including those that captured a reference during the
circular load phase.

Also tightens the generic constraint from <T> to <T extends object> so
Object.assign() is type-safe, and propagates the constraint to the
test-utils callers in bundled-plugin-public-surface.ts.

Fixes #57394
2026-03-30 13:48:21 +05:30
..
auth-token-assertions.ts
bundled-plugin-public-surface.ts fix(facade-runtime): add recursion guard to facade module loader to prevent infinite stack overflow 2026-03-30 13:48:21 +05:30
camera-url-test-helpers.ts
channel-plugin-test-fixtures.ts Plugin SDK: require unified message discovery 2026-03-18 03:02:16 +00:00
channel-plugins.test.ts refactor: move extension-owned tests to extensions 2026-03-27 21:37:09 +00:00
channel-plugins.ts refactor: derive channel metadata from plugin manifests 2026-03-28 17:17:10 +00:00
chunk-test-helpers.ts
command-runner.ts
env.test.ts test(env): normalize path expectations on windows 2026-03-22 16:08:49 -07:00
env.ts refactor!: drop legacy CLAWDBOT env compatibility 2026-03-22 22:13:39 -07:00
exec-assertions.ts
fetch-mock.ts
fixture-suite.ts
frozen-time.ts
imessage-test-plugin.ts refactor(plugin-sdk): remove channel-specific sdk shims 2026-03-30 01:03:24 +01:00
internal-hook-event-payload.ts
mock-http-response.ts
model-auth-mock.ts
model-fallback.mock.ts
npm-spec-install-test-helpers.ts
plugin-registration.ts
ports.ts
provider-usage-fetch.ts
repo-scan.ts refactor(plugins): decouple bundled plugin runtime loading 2026-03-29 09:10:38 +01:00
runtime-source-guardrail-scan.ts fix: stabilize gate and extension boundary checks 2026-03-30 02:37:36 +01:00
secret-file-fixture.ts
secret-ref-test-vectors.ts
session-state-cleanup.test.ts Tests: force-reset session cleanup state between runs 2026-03-30 00:36:43 -04:00
session-state-cleanup.ts perf: speed up test parallelism 2026-03-26 20:09:40 +00:00
symlink-rebind-race.ts
system-run-prepare-payload.ts
temp-dir.ts
temp-home.test.ts
temp-home.ts test: harden threaded shared-worker suites 2026-03-24 08:37:00 +00:00
tracked-temp-dirs.ts
typed-cases.ts
vitest-mock-fn.ts
vitest-module-mocks.ts Tests: share partial module mock helper 2026-03-28 02:09:43 -04:00