perf(secrets): move plugin-owned coverage out of core matrix

This commit is contained in:
Vincent Koc
2026-04-07 08:35:27 +01:00
parent 49fbecbf16
commit c19f322ff9
3 changed files with 97 additions and 1 deletions
+30
View File
@@ -1015,6 +1015,36 @@ describe("runtime web tools resolution", () => {
).toBe("firecrawl-runtime-key");
});
it("resolves legacy Firecrawl web fetch SecretRefs through the plugin-owned path", async () => {
const { metadata, resolvedConfig } = await runRuntimeWebTools({
config: asConfig({
tools: {
web: {
fetch: {
firecrawl: {
apiKey: { source: "env", provider: "default", id: "FIRECRAWL_API_KEY" },
},
},
},
},
}),
env: {
FIRECRAWL_API_KEY: "firecrawl-legacy-key",
},
});
expect(metadata.fetch.providerSource).toBe("auto-detect");
expect(metadata.fetch.selectedProvider).toBe("firecrawl");
expect(metadata.fetch.selectedProviderKeySource).toBe("env");
expect(
(
resolvedConfig.plugins?.entries?.firecrawl?.config as
| { webFetch?: { apiKey?: unknown } }
| undefined
)?.webFetch?.apiKey,
).toBe("firecrawl-legacy-key");
});
it("fails fast when active web fetch provider SecretRef is unresolved with no fallback", async () => {
const sourceConfig = asConfig({
plugins: {