Vendor OpenClaw source as Adolf fork baseline
Some checks failed
ClawSweeper Dispatch / dispatch (push) Has been cancelled
CodeQL / Security High (actions) (push) Has been cancelled
CodeQL / Security High (channel-runtime-boundary) (push) Has been cancelled
CodeQL / Security High (core-auth-secrets) (push) Has been cancelled
CodeQL / Security High (mcp-process-tool-boundary) (push) Has been cancelled
CodeQL / Security High (network-ssrf-boundary) (push) Has been cancelled
CodeQL / Security High (plugin-trust-boundary) (push) Has been cancelled
CodeQL / Security High (process-exec-boundary) (push) Has been cancelled
Docs Sync Publish Repo / sync-publish-repo (push) Has been cancelled
Docs / docs (push) Has been cancelled
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Has been cancelled
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / generated-doc-baselines (push) Has been cancelled
CI / runner-admission (push) Has been cancelled
CI / preflight (push) Has been cancelled
CI / security-fast (push) Has been cancelled
CI / pnpm-store-warmup (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / native-i18n (push) Has been cancelled
CI / ${{ matrix.check_name }} (push) Has been cancelled
CI / ${{ matrix.checkName }} (push) Has been cancelled
CI / checks-node-compat-node22 (push) Has been cancelled
CI / check-bundled-channel-config-metadata (push) Has been cancelled
CI / check-dependencies (push) Has been cancelled
CI / check-guards (push) Has been cancelled
CI / check-lint (push) Has been cancelled
CI / check-prod-types (push) Has been cancelled
CI / check-shrinkwrap (push) Has been cancelled
CI / check-test-types (push) Has been cancelled
CI / check-additional-boundaries-a (push) Has been cancelled
CI / check-additional-boundaries-bcd (push) Has been cancelled
CI / check-additional-extension-bundled (push) Has been cancelled
CI / check-additional-extension-channels (push) Has been cancelled
CI / check-additional-extension-package-boundary (push) Has been cancelled
CI / check-additional-runtime-topology-architecture (push) Has been cancelled
CI / check-session-accessor-boundary (push) Has been cancelled
CI / check-session-transcript-reader-boundary (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / macos-swift (push) Has been cancelled
CI / ios-build (push) Has been cancelled
CI / ci-timings-summary (push) Has been cancelled
Native App Locale Refresh / Refresh native fa (push) Has been cancelled
Native App Locale Refresh / Refresh native fr (push) Has been cancelled
Native App Locale Refresh / Refresh native hi (push) Has been cancelled
Native App Locale Refresh / Refresh native id (push) Has been cancelled
Native App Locale Refresh / Refresh native it (push) Has been cancelled
Native App Locale Refresh / Refresh native ja-JP (push) Has been cancelled
Control UI Locale Refresh / plan (push) Has been cancelled
Control UI Locale Refresh / Refresh ${{ matrix.locale }} (push) Has been cancelled
Control UI Locale Refresh / Commit control UI locale refresh (push) Has been cancelled
Live Media Runner Image / Build live media runner image (push) Has been cancelled
Native App Locale Refresh / Refresh native ar (push) Has been cancelled
Native App Locale Refresh / Refresh native de (push) Has been cancelled
Native App Locale Refresh / Refresh native es (push) Has been cancelled
Native App Locale Refresh / Refresh native ko (push) Has been cancelled
Native App Locale Refresh / Refresh native nl (push) Has been cancelled
Native App Locale Refresh / Refresh native pl (push) Has been cancelled
Native App Locale Refresh / Refresh native pt-BR (push) Has been cancelled
Native App Locale Refresh / Refresh native ru (push) Has been cancelled
Native App Locale Refresh / Refresh native sv (push) Has been cancelled
Native App Locale Refresh / Refresh native th (push) Has been cancelled
Native App Locale Refresh / Refresh native tr (push) Has been cancelled
Native App Locale Refresh / Refresh native uk (push) Has been cancelled
Native App Locale Refresh / Refresh native vi (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-CN (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-TW (push) Has been cancelled
Native App Locale Refresh / Commit native locale refresh (push) Has been cancelled
Plugin Init Scaffold Validation / Validate provider scaffold (push) Has been cancelled
Plugin NPM Release / preview_plugins_npm (push) Has been cancelled
Plugin NPM Release / Validate release publish approval (push) Has been cancelled
Plugin NPM Release / preview_plugin_pack (push) Has been cancelled
Plugin NPM Release / publish_plugins_npm (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Website Installer Sync / static (push) Has been cancelled
Website Installer Sync / linux-docker (push) Has been cancelled
Website Installer Sync / macos-installer (push) Has been cancelled
Website Installer Sync / windows-installer (push) Has been cancelled
Website Installer Sync / sync-website (push) Has been cancelled
Some checks failed
ClawSweeper Dispatch / dispatch (push) Has been cancelled
CodeQL / Security High (actions) (push) Has been cancelled
CodeQL / Security High (channel-runtime-boundary) (push) Has been cancelled
CodeQL / Security High (core-auth-secrets) (push) Has been cancelled
CodeQL / Security High (mcp-process-tool-boundary) (push) Has been cancelled
CodeQL / Security High (network-ssrf-boundary) (push) Has been cancelled
CodeQL / Security High (plugin-trust-boundary) (push) Has been cancelled
CodeQL / Security High (process-exec-boundary) (push) Has been cancelled
Docs Sync Publish Repo / sync-publish-repo (push) Has been cancelled
Docs / docs (push) Has been cancelled
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Has been cancelled
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / generated-doc-baselines (push) Has been cancelled
CI / runner-admission (push) Has been cancelled
CI / preflight (push) Has been cancelled
CI / security-fast (push) Has been cancelled
CI / pnpm-store-warmup (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / native-i18n (push) Has been cancelled
CI / ${{ matrix.check_name }} (push) Has been cancelled
CI / ${{ matrix.checkName }} (push) Has been cancelled
CI / checks-node-compat-node22 (push) Has been cancelled
CI / check-bundled-channel-config-metadata (push) Has been cancelled
CI / check-dependencies (push) Has been cancelled
CI / check-guards (push) Has been cancelled
CI / check-lint (push) Has been cancelled
CI / check-prod-types (push) Has been cancelled
CI / check-shrinkwrap (push) Has been cancelled
CI / check-test-types (push) Has been cancelled
CI / check-additional-boundaries-a (push) Has been cancelled
CI / check-additional-boundaries-bcd (push) Has been cancelled
CI / check-additional-extension-bundled (push) Has been cancelled
CI / check-additional-extension-channels (push) Has been cancelled
CI / check-additional-extension-package-boundary (push) Has been cancelled
CI / check-additional-runtime-topology-architecture (push) Has been cancelled
CI / check-session-accessor-boundary (push) Has been cancelled
CI / check-session-transcript-reader-boundary (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / macos-swift (push) Has been cancelled
CI / ios-build (push) Has been cancelled
CI / ci-timings-summary (push) Has been cancelled
Native App Locale Refresh / Refresh native fa (push) Has been cancelled
Native App Locale Refresh / Refresh native fr (push) Has been cancelled
Native App Locale Refresh / Refresh native hi (push) Has been cancelled
Native App Locale Refresh / Refresh native id (push) Has been cancelled
Native App Locale Refresh / Refresh native it (push) Has been cancelled
Native App Locale Refresh / Refresh native ja-JP (push) Has been cancelled
Control UI Locale Refresh / plan (push) Has been cancelled
Control UI Locale Refresh / Refresh ${{ matrix.locale }} (push) Has been cancelled
Control UI Locale Refresh / Commit control UI locale refresh (push) Has been cancelled
Live Media Runner Image / Build live media runner image (push) Has been cancelled
Native App Locale Refresh / Refresh native ar (push) Has been cancelled
Native App Locale Refresh / Refresh native de (push) Has been cancelled
Native App Locale Refresh / Refresh native es (push) Has been cancelled
Native App Locale Refresh / Refresh native ko (push) Has been cancelled
Native App Locale Refresh / Refresh native nl (push) Has been cancelled
Native App Locale Refresh / Refresh native pl (push) Has been cancelled
Native App Locale Refresh / Refresh native pt-BR (push) Has been cancelled
Native App Locale Refresh / Refresh native ru (push) Has been cancelled
Native App Locale Refresh / Refresh native sv (push) Has been cancelled
Native App Locale Refresh / Refresh native th (push) Has been cancelled
Native App Locale Refresh / Refresh native tr (push) Has been cancelled
Native App Locale Refresh / Refresh native uk (push) Has been cancelled
Native App Locale Refresh / Refresh native vi (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-CN (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-TW (push) Has been cancelled
Native App Locale Refresh / Commit native locale refresh (push) Has been cancelled
Plugin Init Scaffold Validation / Validate provider scaffold (push) Has been cancelled
Plugin NPM Release / preview_plugins_npm (push) Has been cancelled
Plugin NPM Release / Validate release publish approval (push) Has been cancelled
Plugin NPM Release / preview_plugin_pack (push) Has been cancelled
Plugin NPM Release / publish_plugins_npm (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Website Installer Sync / static (push) Has been cancelled
Website Installer Sync / linux-docker (push) Has been cancelled
Website Installer Sync / macos-installer (push) Has been cancelled
Website Installer Sync / windows-installer (push) Has been cancelled
Website Installer Sync / sync-website (push) Has been cancelled
Adolf is a fork/vendored clone of github.com/openclaw/openclaw (v2026.6.11), free to diverge. Tree copied sans upstream .git; upstream remote added for future syncs. Node pinned to 24 (.nvmrc); engines already require >=22.19. Preserves docs/ARCHITECTURE.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeqyaxJF2nbRXJtae2kNB2
This commit is contained in:
344
extensions/music-generation-providers.live.test.ts
Normal file
344
extensions/music-generation-providers.live.test.ts
Normal file
@@ -0,0 +1,344 @@
|
||||
// Music Generation Providers.Live.Test.Ts tests cover music generation providers plugin behavior.
|
||||
import {
|
||||
resolveApiKeyForProvider,
|
||||
resolveDefaultAgentDir,
|
||||
} from "openclaw/plugin-sdk/agent-runtime";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts";
|
||||
import {
|
||||
registerProviderPlugin,
|
||||
requireRegisteredProvider,
|
||||
} from "openclaw/plugin-sdk/plugin-test-runtime";
|
||||
import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
||||
import {
|
||||
DEFAULT_LIVE_MUSIC_MODELS,
|
||||
collectProviderApiKeys,
|
||||
encodePngRgba,
|
||||
fillPixel,
|
||||
getShellEnvAppliedKeys,
|
||||
isAuthErrorMessage,
|
||||
isBillingErrorMessage,
|
||||
isLiveProfileKeyModeEnabled,
|
||||
isLiveTestEnabled,
|
||||
isModelNotFoundErrorMessage,
|
||||
isOverloadedErrorMessage,
|
||||
isServerErrorMessage,
|
||||
isTimeoutErrorMessage,
|
||||
isTruthyEnvValue,
|
||||
parseCsvFilter,
|
||||
parseProviderModelMap,
|
||||
redactLiveApiKey,
|
||||
resolveConfiguredLiveMusicModels,
|
||||
resolveLiveMusicAuthStore,
|
||||
} from "openclaw/plugin-sdk/test-env";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import falPlugin from "./fal/index.js";
|
||||
import googlePlugin from "./google/index.js";
|
||||
import minimaxPlugin from "./minimax/index.js";
|
||||
import openrouterPlugin from "./openrouter/index.js";
|
||||
import { maybeLoadShellEnvForGenerationProviders } from "./test-support/generation-live-test-helpers.js";
|
||||
|
||||
const LIVE = isLiveTestEnabled();
|
||||
const REQUIRE_PROFILE_KEYS =
|
||||
isLiveProfileKeyModeEnabled() || isTruthyEnvValue(process.env.OPENCLAW_LIVE_REQUIRE_PROFILE_KEYS);
|
||||
const describeLive = LIVE ? describe : describe.skip;
|
||||
const providerFilter = parseCsvFilter(process.env.OPENCLAW_LIVE_MUSIC_GENERATION_PROVIDERS);
|
||||
const envModelMap = parseProviderModelMap(process.env.OPENCLAW_LIVE_MUSIC_GENERATION_MODELS);
|
||||
|
||||
type LiveProviderCase = {
|
||||
plugin: Parameters<typeof registerProviderPlugin>[0]["plugin"];
|
||||
pluginId: string;
|
||||
pluginName: string;
|
||||
providerId: string;
|
||||
};
|
||||
|
||||
const CASES: LiveProviderCase[] = [
|
||||
{
|
||||
plugin: falPlugin,
|
||||
pluginId: "fal",
|
||||
pluginName: "fal Provider",
|
||||
providerId: "fal",
|
||||
},
|
||||
{
|
||||
plugin: googlePlugin,
|
||||
pluginId: "google",
|
||||
pluginName: "Google Provider",
|
||||
providerId: "google",
|
||||
},
|
||||
{
|
||||
plugin: minimaxPlugin,
|
||||
pluginId: "minimax",
|
||||
pluginName: "MiniMax Provider",
|
||||
providerId: "minimax",
|
||||
},
|
||||
{
|
||||
plugin: openrouterPlugin,
|
||||
pluginId: "openrouter",
|
||||
pluginName: "OpenRouter Provider",
|
||||
providerId: "openrouter",
|
||||
},
|
||||
]
|
||||
.filter((entry) => (providerFilter ? providerFilter.has(entry.providerId) : true))
|
||||
.toSorted((left, right) => left.providerId.localeCompare(right.providerId));
|
||||
|
||||
function withPluginsEnabled(cfg: OpenClawConfig): OpenClawConfig {
|
||||
return {
|
||||
...cfg,
|
||||
plugins: {
|
||||
...cfg.plugins,
|
||||
enabled: true,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function createEditReferencePng(): Buffer {
|
||||
const width = 192;
|
||||
const height = 192;
|
||||
const buf = Buffer.alloc(width * height * 4, 255);
|
||||
|
||||
for (let y = 0; y < height; y += 1) {
|
||||
for (let x = 0; x < width; x += 1) {
|
||||
fillPixel(buf, x, y, width, 250, 246, 240, 255);
|
||||
}
|
||||
}
|
||||
|
||||
for (let y = 24; y < 168; y += 1) {
|
||||
for (let x = 24; x < 168; x += 1) {
|
||||
fillPixel(buf, x, y, width, 255, 143, 77, 255);
|
||||
}
|
||||
}
|
||||
|
||||
for (let y = 48; y < 144; y += 1) {
|
||||
for (let x = 48; x < 144; x += 1) {
|
||||
fillPixel(buf, x, y, width, 34, 40, 49, 255);
|
||||
}
|
||||
}
|
||||
|
||||
return encodePngRgba(buf, width, height);
|
||||
}
|
||||
|
||||
function resolveProviderModelForLiveTest(providerId: string, modelRef: string): string {
|
||||
const slash = modelRef.indexOf("/");
|
||||
if (slash <= 0 || slash === modelRef.length - 1) {
|
||||
return modelRef;
|
||||
}
|
||||
return modelRef.slice(0, slash) === providerId ? modelRef.slice(slash + 1) : modelRef;
|
||||
}
|
||||
|
||||
function maybeLoadShellEnvForMusicProviders(providerIds: string[]): void {
|
||||
maybeLoadShellEnvForGenerationProviders(providerIds);
|
||||
}
|
||||
|
||||
function formatProviderFilter(filter: Set<string> | null): string {
|
||||
return filter ? [...filter].toSorted((a, b) => a.localeCompare(b)).join(", ") : "";
|
||||
}
|
||||
|
||||
function expectMusicLiveSweepPassed(params: {
|
||||
attempted: string[];
|
||||
failures: string[];
|
||||
providerFilter: Set<string> | null;
|
||||
skipped: string[];
|
||||
}): void {
|
||||
if (params.attempted.length === 0) {
|
||||
expect(params.failures).toStrictEqual([]);
|
||||
if (params.providerFilter && params.providerFilter.size > 0) {
|
||||
throw new Error(
|
||||
`[live:music-generation] requested provider filter produced no live attempts: ${formatProviderFilter(params.providerFilter)}; skipped=${params.skipped.join(", ") || "none"}`,
|
||||
);
|
||||
}
|
||||
console.warn("[live:music-generation] no provider had usable auth; skipping assertions");
|
||||
return;
|
||||
}
|
||||
expect(params.failures).toStrictEqual([]);
|
||||
}
|
||||
|
||||
function resolveLiveLyrics(providerId: string): string | undefined {
|
||||
if (providerId !== "minimax") {
|
||||
return undefined;
|
||||
}
|
||||
return [
|
||||
"[Verse]",
|
||||
"Streetlights shimmer while we race the dawn",
|
||||
"Neon echoes carry us along",
|
||||
"[Chorus]",
|
||||
"Hold the night inside this song",
|
||||
"We run together bright and strong",
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
function resolveLiveMusicSkipReason(providerId: string, error: unknown): string | null {
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
if (
|
||||
(providerId === "google" || providerId === "openrouter") &&
|
||||
message.toLowerCase().includes("music generation response missing audio data")
|
||||
) {
|
||||
return "transient no-audio response";
|
||||
}
|
||||
if (isAuthErrorMessage(message)) {
|
||||
return "auth drift";
|
||||
}
|
||||
if (isModelNotFoundErrorMessage(message)) {
|
||||
return "model drift";
|
||||
}
|
||||
if (isBillingErrorMessage(message)) {
|
||||
return "billing drift";
|
||||
}
|
||||
if (isTimeoutErrorMessage(message) || /operation was aborted/i.test(message)) {
|
||||
return "provider timeout";
|
||||
}
|
||||
if (isOverloadedErrorMessage(message) || isServerErrorMessage(message)) {
|
||||
return "provider outage";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
describeLive("music generation provider live", () => {
|
||||
it(
|
||||
"covers generate plus declared edit paths with shell/profile auth",
|
||||
async () => {
|
||||
const cfg = withPluginsEnabled(getRuntimeConfig());
|
||||
const configuredModels = resolveConfiguredLiveMusicModels(cfg);
|
||||
const agentDir = resolveDefaultAgentDir(cfg as never);
|
||||
const attempted: string[] = [];
|
||||
const skipped: string[] = [];
|
||||
const failures: string[] = [];
|
||||
|
||||
maybeLoadShellEnvForMusicProviders(CASES.map((entry) => entry.providerId));
|
||||
|
||||
for (const testCase of CASES) {
|
||||
const modelRef =
|
||||
envModelMap.get(testCase.providerId) ??
|
||||
configuredModels.get(testCase.providerId) ??
|
||||
DEFAULT_LIVE_MUSIC_MODELS[testCase.providerId];
|
||||
if (!modelRef) {
|
||||
skipped.push(`${testCase.providerId}: no model configured`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const hasLiveKeys = collectProviderApiKeys(testCase.providerId).length > 0;
|
||||
const authStore = resolveLiveMusicAuthStore({
|
||||
requireProfileKeys: REQUIRE_PROFILE_KEYS,
|
||||
hasLiveKeys,
|
||||
});
|
||||
let authLabel;
|
||||
try {
|
||||
const auth = await resolveApiKeyForProvider({
|
||||
provider: testCase.providerId,
|
||||
cfg,
|
||||
agentDir,
|
||||
store: authStore,
|
||||
});
|
||||
authLabel = `${auth.source} ${redactLiveApiKey(auth.apiKey)}`;
|
||||
} catch {
|
||||
skipped.push(`${testCase.providerId}: no usable auth`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const { musicProviders } = await registerProviderPlugin({
|
||||
plugin: testCase.plugin,
|
||||
id: testCase.pluginId,
|
||||
name: testCase.pluginName,
|
||||
});
|
||||
const provider = requireRegisteredProvider(
|
||||
musicProviders,
|
||||
testCase.providerId,
|
||||
"music provider",
|
||||
);
|
||||
const providerModel = resolveProviderModelForLiveTest(testCase.providerId, modelRef);
|
||||
const generateCaps = provider.capabilities.generate;
|
||||
const liveLyrics = resolveLiveLyrics(testCase.providerId);
|
||||
|
||||
try {
|
||||
const result = await provider.generateMusic({
|
||||
provider: testCase.providerId,
|
||||
model: providerModel,
|
||||
prompt: "Upbeat instrumental synthwave with warm neon pads and a simple driving beat.",
|
||||
cfg,
|
||||
agentDir,
|
||||
authStore,
|
||||
...(generateCaps?.supportsDuration ? { durationSeconds: 12 } : undefined),
|
||||
...(generateCaps?.supportsFormat ? { format: "mp3" as const } : undefined),
|
||||
...(liveLyrics ? { lyrics: liveLyrics } : undefined),
|
||||
...(generateCaps?.supportsInstrumental && !liveLyrics
|
||||
? { instrumental: true }
|
||||
: undefined),
|
||||
});
|
||||
|
||||
expect(result.tracks.length).toBeGreaterThan(0);
|
||||
expect(result.tracks[0]?.mimeType.startsWith("audio/")).toBe(true);
|
||||
expect(result.tracks[0]?.buffer.byteLength).toBeGreaterThan(1024);
|
||||
attempted.push(`${testCase.providerId}:generate:${providerModel} (${authLabel})`);
|
||||
} catch (error) {
|
||||
const skipReason = resolveLiveMusicSkipReason(testCase.providerId, error);
|
||||
if (skipReason) {
|
||||
skipped.push(`${testCase.providerId}:generate ${skipReason}`);
|
||||
continue;
|
||||
}
|
||||
failures.push(
|
||||
`${testCase.providerId}:generate (${authLabel}): ${
|
||||
error instanceof Error ? error.message : String(error)
|
||||
}`,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!provider.capabilities.edit?.enabled) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await provider.generateMusic({
|
||||
provider: testCase.providerId,
|
||||
model: providerModel,
|
||||
prompt: "Turn the reference cover art into a short dramatic trailer sting.",
|
||||
cfg,
|
||||
agentDir,
|
||||
authStore,
|
||||
inputImages: [
|
||||
{
|
||||
buffer: createEditReferencePng(),
|
||||
mimeType: "image/png",
|
||||
fileName: "reference.png",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
expect(result.tracks.length).toBeGreaterThan(0);
|
||||
expect(result.tracks[0]?.mimeType.startsWith("audio/")).toBe(true);
|
||||
expect(result.tracks[0]?.buffer.byteLength).toBeGreaterThan(1024);
|
||||
attempted.push(`${testCase.providerId}:edit:${providerModel} (${authLabel})`);
|
||||
} catch (error) {
|
||||
const skipReason = resolveLiveMusicSkipReason(testCase.providerId, error);
|
||||
if (skipReason) {
|
||||
skipped.push(`${testCase.providerId}:edit ${skipReason}`);
|
||||
continue;
|
||||
}
|
||||
failures.push(
|
||||
`${testCase.providerId}:edit (${authLabel}): ${
|
||||
error instanceof Error ? error.message : String(error)
|
||||
}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
console.log(
|
||||
`[live:music-generation] attempted=${attempted.join(", ") || "none"} skipped=${skipped.join(", ") || "none"} failures=${failures.join(" | ") || "none"} shellEnv=${getShellEnvAppliedKeys().join(", ") || "none"}`,
|
||||
);
|
||||
|
||||
expectMusicLiveSweepPassed({ attempted, failures, providerFilter, skipped });
|
||||
},
|
||||
10 * 60_000,
|
||||
);
|
||||
});
|
||||
|
||||
describe("music generation live provider filter coverage", () => {
|
||||
it("fails filtered sweeps when no requested provider is attempted", () => {
|
||||
expect(() =>
|
||||
expectMusicLiveSweepPassed({
|
||||
attempted: [],
|
||||
failures: [],
|
||||
providerFilter: new Set(["minimax"]),
|
||||
skipped: ["minimax: no usable auth"],
|
||||
}),
|
||||
).toThrow(/requested provider filter produced no live attempts: minimax/u);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user