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:
Brandon Bennett
2026-08-16 06:19:11 -07:00
parent 27c89301ad
commit 57b9c0337f
6 changed files with 18 additions and 15 deletions

View File

@@ -92,6 +92,7 @@ const ENV_KEY_RE = /(clientId|clientSecret|apiKey)Env\s*:/;
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-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)
]);
/**

View File

@@ -110,8 +110,9 @@
"tests/unit/chatcore-compression-integration.test.ts",
"tests/unit/chatcore-executor-helpers.test.ts",
"tests/unit/chatcore-executor-proxy.test.ts",
"tests/unit/chatcore-extracted-modules-3821.test.ts",
"tests/unit/chatcore-headers.test.ts",
"tests/unit/chatcore-extracted-modules-3821.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-log-truncation.test.ts",
"tests/unit/chatcore-memory-extraction.test.ts",

View File

@@ -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
// broke `npm ci`/`next build` with "Can't resolve @huggingface/transformers"
// (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.
const pkg = readJson<{
dependencies?: Record<string, string>;
@@ -38,7 +38,7 @@ test("transformers + onnxruntime-node are regular dependencies (not optional)",
assert.equal(
pkg.dependencies?.["onnxruntime-node"],
"~1.24.3",
"~1.27.0",
"onnxruntime-node is a regular dep (napi prebuilds, installable on Node 24/26)"
);
assert.equal(pkg.optionalDependencies?.["onnxruntime-node"], undefined);

View File

@@ -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)", () => {
// code-none entries: antigravity, kiro, cursor (app), hermes (simple guide)
test("CLI_TOOLS total code entries (including none) equals 26 (21 visible + 5 none)", () => {
// code-none entries: zcode, antigravity, kiro, cursor (app), hermes (simple guide)
const codeNone = codeAll.filter((t) => t.baseUrlSupport === "none");
assert.equal(
codeNone.length,
4,
`Expected 4 code entries with baseUrlSupport='none', got ${codeNone.length}: ${codeNone.map((t) => t.id).join(", ")}`
5,
`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", () => {
assert.equal(all.length, 33, `Expected 33 total entries, got ${all.length}`);
test("CLI_TOOLS total (code + agent) = 34", () => {
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", () => {
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) {
assert.ok(
allowedIds.has(entry.id),

View File

@@ -45,6 +45,7 @@ test("CLI_TOOLS registry contains all expected tools including rebuilt Qwen Code
"crush",
"grok-build",
"qwen",
"zcode",
];
for (const id of expected) {
assert.ok(id in CLI_TOOLS, `Missing tool: ${id}`);

View File

@@ -30,13 +30,13 @@ const {
isControlPlaneProxyDirectFallbackEnabled,
} = 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
// ──────────────────────────────────────────────────────
describe("featureFlagDefinitions", () => {
it("has exactly 48 flag definitions", () => {
it("has exactly 49 flag definitions", () => {
assert.strictEqual(FEATURE_FLAG_DEFINITIONS.length, EXPECTED_FEATURE_FLAG_COUNT);
});
@@ -344,7 +344,7 @@ describe("resolveFeatureFlag", () => {
});
describe("resolveAllFeatureFlags", () => {
it("returns all 47 flags", () => {
it("returns all 49 flags", () => {
const all = resolveAllFeatureFlags();
assert.strictEqual(all.length, EXPECTED_FEATURE_FLAG_COUNT);
});