mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-18 21:22:28 +03:00
fix(tests): align count expectations with live catalogs (pre-existing release drift)
Release/v3.8.50 currently fails five gates on its own tree; this PR inherits them. Fix the stale expectations to match live code: - feature-flags-settings: 48 -> 49 flags (Wave 2 adds OMNIROUTE_CHAT_VIRTUAL_LANES) - cli-tools-schema / cli-catalog-counts: 33 -> 34 tools (zcode added; 26 code = 21 visible + 5 none) - optional-transformers-dependency: onnxruntime-node ~1.24.3 -> ~1.27.0 (bump #10382) - stryker.conf.json: register chatcore-header-drop-warn-dedupe-10315 test - check-public-creds: freeze zcodeProtocol clientId false positive (client identifier, not a credential)
This commit is contained in:
@@ -92,6 +92,7 @@ const ENV_KEY_RE = /(clientId|clientSecret|apiKey)Env\s*:/;
|
|||||||
export const KNOWN_LITERAL_CREDS = new Set([
|
export const KNOWN_LITERAL_CREDS = new Set([
|
||||||
"open-sse/services/usage/minimax.ts:213:minimax", // TODO(6A.8): pre-existing FP — TS fn-param type, not a credential (getMiniMaxUsage signature)
|
"open-sse/services/usage/minimax.ts:213:minimax", // TODO(6A.8): pre-existing FP — TS fn-param type, not a credential (getMiniMaxUsage signature)
|
||||||
"open-sse/services/usage/minimax.ts:213:minimax-cn", // TODO(6A.8): pre-existing FP — TS fn-param type, not a credential (getMiniMaxUsage signature)
|
"open-sse/services/usage/minimax.ts:213:minimax-cn", // TODO(6A.8): pre-existing FP — TS fn-param type, not a credential (getMiniMaxUsage signature)
|
||||||
|
"open-sse/executors/zcodeProtocol.ts:302:omniroute-${process.pid}", // pre-existing FP — clientId identifier, not a credential (ZCode handshake client name)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -110,8 +110,9 @@
|
|||||||
"tests/unit/chatcore-compression-integration.test.ts",
|
"tests/unit/chatcore-compression-integration.test.ts",
|
||||||
"tests/unit/chatcore-executor-helpers.test.ts",
|
"tests/unit/chatcore-executor-helpers.test.ts",
|
||||||
"tests/unit/chatcore-executor-proxy.test.ts",
|
"tests/unit/chatcore-executor-proxy.test.ts",
|
||||||
"tests/unit/chatcore-extracted-modules-3821.test.ts",
|
"tests/unit/chatcore-extracted-modules-3821.test.ts",
|
||||||
"tests/unit/chatcore-headers.test.ts",
|
"tests/unit/chatcore-header-drop-warn-dedupe-10315.test.ts",
|
||||||
|
"tests/unit/chatcore-headers.test.ts",
|
||||||
"tests/unit/chatcore-imports-cleanly.test.ts",
|
"tests/unit/chatcore-imports-cleanly.test.ts",
|
||||||
"tests/unit/chatcore-log-truncation.test.ts",
|
"tests/unit/chatcore-log-truncation.test.ts",
|
||||||
"tests/unit/chatcore-memory-extraction.test.ts",
|
"tests/unit/chatcore-memory-extraction.test.ts",
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ test("@huggingface/transformers is a regular dependency so npm ci never skips it
|
|||||||
// pin dragged onnxruntime-node@1.21.0 whose NAN build no longer compiles), which
|
// pin dragged onnxruntime-node@1.21.0 whose NAN build no longer compiles), which
|
||||||
// broke `npm ci`/`next build` with "Can't resolve @huggingface/transformers"
|
// broke `npm ci`/`next build` with "Can't resolve @huggingface/transformers"
|
||||||
// (lazy import in src/lib/memory/embedding/transformersLocal.ts). As a regular
|
// (lazy import in src/lib/memory/embedding/transformersLocal.ts). As a regular
|
||||||
// dep with onnxruntime-node@~1.24.3 (napi prebuilds, no node-gyp) it stays
|
// dep with onnxruntime-node@~1.27.0 (napi prebuilds, no node-gyp) it stays
|
||||||
// installable and the memory embedding path requires() cleanly.
|
// installable and the memory embedding path requires() cleanly.
|
||||||
const pkg = readJson<{
|
const pkg = readJson<{
|
||||||
dependencies?: Record<string, string>;
|
dependencies?: Record<string, string>;
|
||||||
@@ -38,7 +38,7 @@ test("transformers + onnxruntime-node are regular dependencies (not optional)",
|
|||||||
|
|
||||||
assert.equal(
|
assert.equal(
|
||||||
pkg.dependencies?.["onnxruntime-node"],
|
pkg.dependencies?.["onnxruntime-node"],
|
||||||
"~1.24.3",
|
"~1.27.0",
|
||||||
"onnxruntime-node is a regular dep (napi prebuilds, installable on Node 24/26)"
|
"onnxruntime-node is a regular dep (napi prebuilds, installable on Node 24/26)"
|
||||||
);
|
);
|
||||||
assert.equal(pkg.optionalDependencies?.["onnxruntime-node"], undefined);
|
assert.equal(pkg.optionalDependencies?.["onnxruntime-node"], undefined);
|
||||||
|
|||||||
@@ -30,24 +30,24 @@ test(`CLI_TOOLS has exactly ${EXPECTED_AGENT_COUNT} agent entries`, () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("CLI_TOOLS total code entries (including none) equals 25 (21 visible + 4 none)", () => {
|
test("CLI_TOOLS total code entries (including none) equals 26 (21 visible + 5 none)", () => {
|
||||||
// code-none entries: antigravity, kiro, cursor (app), hermes (simple guide)
|
// code-none entries: zcode, antigravity, kiro, cursor (app), hermes (simple guide)
|
||||||
const codeNone = codeAll.filter((t) => t.baseUrlSupport === "none");
|
const codeNone = codeAll.filter((t) => t.baseUrlSupport === "none");
|
||||||
assert.equal(
|
assert.equal(
|
||||||
codeNone.length,
|
codeNone.length,
|
||||||
4,
|
5,
|
||||||
`Expected 4 code entries with baseUrlSupport='none', got ${codeNone.length}: ${codeNone.map((t) => t.id).join(", ")}`
|
`Expected 5 code entries with baseUrlSupport='none', got ${codeNone.length}: ${codeNone.map((t) => t.id).join(", ")}`
|
||||||
);
|
);
|
||||||
assert.equal(codeAll.length, 25, `Expected 25 total code entries, got ${codeAll.length}`);
|
assert.equal(codeAll.length, 26, `Expected 26 total code entries, got ${codeAll.length}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("CLI_TOOLS total (code + agent) = 33", () => {
|
test("CLI_TOOLS total (code + agent) = 34", () => {
|
||||||
assert.equal(all.length, 33, `Expected 33 total entries, got ${all.length}`);
|
assert.equal(all.length, 34, `Expected 34 total entries, got ${all.length}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("All code-none entries have configType mitm OR are legacy excluded entries", () => {
|
test("All code-none entries have configType mitm OR are legacy excluded entries", () => {
|
||||||
const codeNone = codeAll.filter((t) => t.baseUrlSupport === "none");
|
const codeNone = codeAll.filter((t) => t.baseUrlSupport === "none");
|
||||||
const allowedIds = new Set(["antigravity", "kiro", "cursor", "hermes"]);
|
const allowedIds = new Set(["zcode", "antigravity", "kiro", "cursor", "hermes"]);
|
||||||
for (const entry of codeNone) {
|
for (const entry of codeNone) {
|
||||||
assert.ok(
|
assert.ok(
|
||||||
allowedIds.has(entry.id),
|
allowedIds.has(entry.id),
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ test("CLI_TOOLS registry contains all expected tools including rebuilt Qwen Code
|
|||||||
"crush",
|
"crush",
|
||||||
"grok-build",
|
"grok-build",
|
||||||
"qwen",
|
"qwen",
|
||||||
|
"zcode",
|
||||||
];
|
];
|
||||||
for (const id of expected) {
|
for (const id of expected) {
|
||||||
assert.ok(id in CLI_TOOLS, `Missing tool: ${id}`);
|
assert.ok(id in CLI_TOOLS, `Missing tool: ${id}`);
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ const {
|
|||||||
isControlPlaneProxyDirectFallbackEnabled,
|
isControlPlaneProxyDirectFallbackEnabled,
|
||||||
} = await import("../../src/shared/utils/featureFlags.ts");
|
} = await import("../../src/shared/utils/featureFlags.ts");
|
||||||
|
|
||||||
const EXPECTED_FEATURE_FLAG_COUNT = 48;
|
const EXPECTED_FEATURE_FLAG_COUNT = 49;
|
||||||
|
|
||||||
// ──────────────────────────────────────────────────────
|
// ──────────────────────────────────────────────────────
|
||||||
// Test group 1 — Flag definitions registry
|
// Test group 1 — Flag definitions registry
|
||||||
// ──────────────────────────────────────────────────────
|
// ──────────────────────────────────────────────────────
|
||||||
describe("featureFlagDefinitions", () => {
|
describe("featureFlagDefinitions", () => {
|
||||||
it("has exactly 48 flag definitions", () => {
|
it("has exactly 49 flag definitions", () => {
|
||||||
assert.strictEqual(FEATURE_FLAG_DEFINITIONS.length, EXPECTED_FEATURE_FLAG_COUNT);
|
assert.strictEqual(FEATURE_FLAG_DEFINITIONS.length, EXPECTED_FEATURE_FLAG_COUNT);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ describe("resolveFeatureFlag", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("resolveAllFeatureFlags", () => {
|
describe("resolveAllFeatureFlags", () => {
|
||||||
it("returns all 47 flags", () => {
|
it("returns all 49 flags", () => {
|
||||||
const all = resolveAllFeatureFlags();
|
const all = resolveAllFeatureFlags();
|
||||||
assert.strictEqual(all.length, EXPECTED_FEATURE_FLAG_COUNT);
|
assert.strictEqual(all.length, EXPECTED_FEATURE_FLAG_COUNT);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user