refactor: consolidate boundary semantics and prune redundant tests
Share parser modes and collision-free composite keys, enforce architecture guards, and consolidate redundant unit assertions into filesystem, CLI, MCP, and producer-backed workflows. Preserve concurrent upstream boundary fixes and exclude legacy Objective-C class-name bookkeeping labels. Validation: source/composition suites (3358 passing), focused canonical digest and MCP checks, typecheck/lint, Knip, formatting, architecture guards, and real Foundation archive and Apple legacy simulator CLI/MCP verification. No real Hopper, Ghidra, or IDA verification claim.
This commit is contained in:
@@ -17,6 +17,8 @@ it("resolves dynamic source imports while retaining computed targets as unknown"
|
||||
'const lazy = import("./lazy");',
|
||||
'async function load() { return await import("./data.json", { with: { type: "json" } }); }',
|
||||
'const name = "./not-guessed.js"; import(name);',
|
||||
"import(`./${name}.js`);",
|
||||
'import("node:fs");',
|
||||
].join("\n"),
|
||||
),
|
||||
...["static.ts", "common.js", "lazy.ts"].map((path) =>
|
||||
@@ -32,7 +34,7 @@ it("resolves dynamic source imports while retaining computed targets as unknown"
|
||||
});
|
||||
if (!result.ok) throw result.error;
|
||||
expect(result.value.parse_failures).toEqual([]);
|
||||
expect(result.value.relationships).toHaveLength(5);
|
||||
expect(result.value.relationships).toHaveLength(6);
|
||||
for (const [to, kind] of [
|
||||
["static.ts", "imports"],
|
||||
["common.js", "requires"],
|
||||
@@ -53,4 +55,11 @@ it("resolves dynamic source imports while retaining computed targets as unknown"
|
||||
resolution: "unknown",
|
||||
parse_state: "partial",
|
||||
});
|
||||
expect(result.value.relationships).toContainEqual({
|
||||
from_path: "main.ts",
|
||||
to: "node:fs",
|
||||
kind: "imports",
|
||||
resolution: "external",
|
||||
parse_state: "parsed",
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user