refactor(javascript): consume normalized feature seeds

Require parsed seed facts in the pure trace projection and leave raw request defaults at the shared workflow boundary. Remove the redundant seed parse, unused raw-seed alias and duplicate seed-match binding.

Move omitted-versus-explicit defaults and full Evidence identity checks to compiled CLI/MCP acceptance. Reuse the owned MCP fixture and request files in the tests. Matching, native handoff, empty-literal, coverage and immutability checks remain covered; public schemas and successful outputs are unchanged.
This commit is contained in:
morluto
2026-10-23 10:22:07 +08:00
parent f4b2ba1313
commit 71a024c789
4 changed files with 96 additions and 91 deletions
@@ -293,34 +293,8 @@ describe("feature seed selection controls", () => {
);
});
describe("public feature trace from contextBridge source members", () => {
it.each(["openProject", "missingProject"])(
"normalizes optional seed defaults before deriving trace identity for %s",
(value) => {
const input = {
sourceEvidenceId,
graph: contextBridgeGraph(),
nativeEvidence: [],
direction: "both" as const,
};
const omitted = traceApplicationFeature({
...input,
seed: { kind: "api", value },
});
const explicit = traceApplicationFeature({
...input,
seed: {
kind: "api",
value,
match: null,
case_sensitive: false,
},
});
expect(omitted).toEqual(explicit);
},
);
it("traces one exact member seed through the public feature workflow", () => {
describe("feature trace projection from contextBridge source members", () => {
it("traces one exact member seed while preserving projection facts", () => {
const mode = {
value: "openProject",
match: "exact" as const,