Skip to content

test(media): isolate generation provider registry mocks#87173

Merged
RomneyDa merged 1 commit into
mainfrom
fix/core-fast-provider-registry
May 27, 2026
Merged

test(media): isolate generation provider registry mocks#87173
RomneyDa merged 1 commit into
mainfrom
fix/core-fast-provider-registry

Conversation

@RomneyDa

@RomneyDa RomneyDa commented May 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Load image/video provider registries dynamically inside their tests after vi.resetModules().
  • Keeps the mocked capability-provider-runtime boundary active when unit-fast runs with isolate: false and other tests have already imported the real registry modules.

Refs 1c8a112.

Verification

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.unit-fast.config.ts --configLoader runner src/video-generation/runtime.test.ts src/image-generation/provider-registry.test.ts src/video-generation/provider-registry.test.ts
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.unit-fast.config.ts --configLoader runner src/image-generation/runtime.test.ts src/video-generation/runtime.test.ts src/image-generation/provider-registry.test.ts src/video-generation/provider-registry.test.ts
  • git diff --check

Real behavior proof

Behavior addressed: checks-node-core-fast on main failed because provider-registry tests expected mocked capability providers but received real image/video provider registries after non-isolated module reuse.
Real environment tested: local source checkout on origin/main with the unit-fast Vitest config.
Exact steps or command run after this patch: ran the failing provider-registry tests together with image/video runtime tests under test/vitest/vitest.unit-fast.config.ts.
Evidence after fix: both targeted non-isolated unit-fast commands passed.
Observed result after fix: the provider-registry tests resolve their mocked capability-provider boundary even when related runtime tests preload registry modules in the same shard.
What was not tested: full checks-node-core-fast was not rerun locally; CI should cover the complete shard.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels May 27, 2026
@RomneyDa RomneyDa merged commit 9772cf2 into main May 27, 2026
117 of 119 checks passed
@RomneyDa RomneyDa deleted the fix/core-fast-provider-registry branch May 27, 2026 05:28
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 27, 2026
SYU8384 pushed a commit to SYU8384/openclaw that referenced this pull request Jun 3, 2026
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant