fix(javascript): match exact empty literal channels and seeds

Pair the same empty IPC channel, context-bridge key, or endpoint value
across application versions by its exact value, and accept an exact
empty feature seed while rejecting an empty containment seed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Iwakurakaoru0822
2026-10-06 21:35:59 -07:00
co-authored by Claude Opus 5.5
parent 527b76ef78
commit e20da1f205
8 changed files with 136 additions and 27 deletions
+5 -2
View File
@@ -1,6 +1,9 @@
import { compareCodePoints } from "./canonicalOrdering.js";
import type { ApplicationNode } from "./javascriptApplicationGraph.js";
import type { ApplicationFeatureSeed } from "./javascriptFeatureTraceSchemas.js";
import {
featureSeedMatchMode,
type ApplicationFeatureSeed,
} from "./javascriptFeatureTraceSchemas.js";
import type { JsonValue } from "./jsonValue.js";
/** One explicit field that matched a feature seed. */
@@ -49,7 +52,7 @@ const seedMatch = (
]
: [];
if (!kindMatches(node, seed.kind)) return [];
const mode = seed.match ?? (seed.kind === "string" ? "contains" : "exact");
const mode = featureSeedMatchMode(seed);
const query = normalized(seed.value, seed.case_sensitive);
const match = candidateFields(node, seed.kind).find((candidate) => {
const value = normalized(candidate.value, seed.case_sensitive);