refactor: expose channel contract test helpers

This commit is contained in:
Peter Steinberger
2026-04-28 01:45:58 +01:00
parent 8d9a2f82a4
commit 45a84b5f95
20 changed files with 389 additions and 359 deletions

View File

@@ -11,7 +11,11 @@ const FORBIDDEN_PATTERNS: Array<{ pattern: RegExp; hint: string }> = [
},
{
pattern: /["']openclaw\/plugin-sdk\/test-utils["']/,
hint: "Use openclaw/plugin-sdk/testing or a focused plugin-sdk test subpath for the public extension test surface.",
hint: "Use a focused plugin-sdk test subpath for the public extension test surface.",
},
{
pattern: /["']openclaw\/plugin-sdk\/testing["']/,
hint: "Use a focused plugin-sdk test subpath instead of the broad compatibility testing barrel.",
},
{
pattern: /["']openclaw\/plugin-sdk\/compat["']/,
@@ -25,6 +29,10 @@ const FORBIDDEN_PATTERNS: Array<{ pattern: RegExp; hint: string }> = [
pattern: /["'](?:\.\.\/)+(?:test\/helpers\/plugins\/)[^"']+["']/,
hint: "Use a documented openclaw/plugin-sdk test subpath instead of repo-only plugin helper bridges.",
},
{
pattern: /["'](?:\.\.\/)+(?:test\/helpers\/channels\/)[^"']+["']/,
hint: "Use openclaw/plugin-sdk/channel-test-helpers or another focused SDK test subpath instead of repo-only channel helper bridges.",
},
{
pattern: /["'](?:\.\.\/)+(?:src\/test-utils\/)[^"']+["']/,
hint: "Use a documented openclaw/plugin-sdk test subpath for public surfaces.",
@@ -45,7 +53,7 @@ const MOCK_RELATIVE_MODULE_PATTERN =
/\bvi\.(?:mock|doMock|unmock|doUnmock)\s*\(\s*["']([^"']+)["']/g;
const RELATIVE_CORE_HINT =
"Use openclaw/plugin-sdk/testing or a focused plugin-sdk test/runtime subpath instead of core internals.";
"Use a focused plugin-sdk test/runtime subpath instead of core internals.";
// Tombstones for retired repo-only plugin helper bridge files. Keep this list so
// deleted bridges fail loudly if they are recreated instead of using SDK subpaths.