mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
Release v3.8.41 — 52 commits since v3.8.40 (19 CHANGELOG bullets, 11 contributors). All gating CI green: Unit×8, Coverage×8, Vitest, Package Artifact, Quality Ratchet, CodeQL, Lint, Docs Sync (Strict), Node 24/26 compat, E2E×9, Integration, Electron smoke. Advisory checks overridden (main unprotected): PR Test Policy = test-masking heuristic on the cumulative 52-commit assert delta (legitimate dead-code-sweep removals + consolidations, reviewed per-PR); SonarCloud/SonarQube = new-code maintainability/coverage quality gate (CodeQL/Semgrep/Security/npm-audit/Dependabot all clean — not a security finding).
37 lines
1.7 KiB
TypeScript
37 lines
1.7 KiB
TypeScript
// Characterization of the validation.ts search + embedding split (god-file decomposition): the
|
|
// web-search validators (+ SEARCH_VALIDATOR_CONFIGS) moved into validation/searchProviders.ts and the
|
|
// embedding/rerank/clarifai validators into validation/embeddingProviders.ts. Behavior-preserving
|
|
// move — the lock is module surface; runtime behavior stays covered by the search-provider-validation
|
|
// and provider-validation-specialty suites.
|
|
import { test } from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
const search = await import("../../src/lib/providers/validation/searchProviders.ts");
|
|
const embed = await import("../../src/lib/providers/validation/embeddingProviders.ts");
|
|
const HOST = await import("../../src/lib/providers/validation.ts");
|
|
|
|
test("searchProviders exposes the search validators + the per-provider config map", () => {
|
|
assert.equal(typeof (search as Record<string, unknown>).validateSearchProvider, "function");
|
|
assert.equal("validateGenericProvider" in search, false);
|
|
const cfg = (search as Record<string, Record<string, unknown>>).SEARCH_VALIDATOR_CONFIGS;
|
|
assert.ok(cfg && typeof cfg === "object");
|
|
assert.ok(
|
|
Object.keys(cfg).length > 0,
|
|
"SEARCH_VALIDATOR_CONFIGS must carry the provider configs"
|
|
);
|
|
});
|
|
|
|
test("embeddingProviders exposes clarifai + embedding + rerank validators", () => {
|
|
for (const name of [
|
|
"validateClarifaiProvider",
|
|
"validateEmbeddingApiProvider",
|
|
"validateRerankApiProvider",
|
|
]) {
|
|
assert.equal(typeof (embed as Record<string, unknown>)[name], "function", `missing ${name}`);
|
|
}
|
|
});
|
|
|
|
test("host dispatcher surface stays intact after the move", () => {
|
|
assert.equal(typeof (HOST as Record<string, unknown>).validateProviderApiKey, "function");
|
|
});
|