chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:39:12 +08:00
commit d8dcd5f6d1
8604 changed files with 2479390 additions and 0 deletions
@@ -0,0 +1,38 @@
// Characterization of the validation.ts enterprise-cloud split (god-file decomposition): the 10 cloud
// validators (heroku/databricks/datarobot/snowflake/gigachat/azure-openai/azure-ai/watsonx/oci/sap)
// moved into validation/cloudProviders.ts, and the shared "POST /chat/completions auth probe"
// (validateDirectChatProvider) moved into validation/directChatProbe.ts so the host and the cloud
// module share it without a cycle. Behavior-preserving move — the locks here are module surface +
// the no-cycle wiring. Runtime behavior stays covered by provider-validation-azure-vertex/branches.
import { test } from "node:test";
import assert from "node:assert/strict";
const cloud = await import("../../src/lib/providers/validation/cloudProviders.ts");
const probe = await import("../../src/lib/providers/validation/directChatProbe.ts");
const HOST = await import("../../src/lib/providers/validation.ts");
test("cloudProviders exposes the ten enterprise-cloud validators", () => {
for (const name of [
"validateHerokuProvider",
"validateDatabricksProvider",
"validateDataRobotProvider",
"validateSnowflakeProvider",
"validateGigachatProvider",
"validateAzureOpenAIProvider",
"validateAzureAiProvider",
"validateWatsonxProvider",
"validateOciProvider",
"validateSapProvider",
]) {
assert.equal(typeof (cloud as Record<string, unknown>)[name], "function", `missing ${name}`);
}
});
test("directChatProbe exposes the shared validateDirectChatProvider helper", () => {
assert.equal(typeof probe.validateDirectChatProvider, "function");
});
test("host dispatcher surface stays intact after the move", () => {
assert.equal(typeof (HOST as Record<string, unknown>).validateProviderApiKey, "function");
assert.equal(typeof (HOST as Record<string, unknown>).validateCommandCodeProvider, "function");
});