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:
@@ -51,41 +51,6 @@ describe("inert keyed archive decoding", () => {
|
||||
expect.objectContaining({ source: 1, target: 2, status: "resolved" }),
|
||||
);
|
||||
});
|
||||
it.each([
|
||||
["binary", { UID: 1 }],
|
||||
["XML", { CF$UID: 1 }],
|
||||
] as const)(
|
||||
"resolves a %s root encoded under a UID-named key",
|
||||
(format, reference) => {
|
||||
const named = {
|
||||
...archive,
|
||||
$objects: ["$null", "payload"],
|
||||
$top: { UID: reference, CF$UID: reference },
|
||||
};
|
||||
const graph = decodeKeyedArchiveBytes(
|
||||
Buffer.from(format === "binary" ? buildBinary(named) : build(named)),
|
||||
{ offset: 0, limit: 2 },
|
||||
);
|
||||
expect(
|
||||
graph.references.map(({ source, path, target, status }) => ({
|
||||
source,
|
||||
path,
|
||||
target,
|
||||
status,
|
||||
})),
|
||||
).toEqual([
|
||||
{ source: null, path: ["CF$UID"], target: 1, status: "resolved" },
|
||||
{ source: null, path: ["UID"], target: 1, status: "resolved" },
|
||||
]);
|
||||
const selected = decodeKeyedArchiveBytes(
|
||||
Buffer.from(format === "binary" ? buildBinary(named) : build(named)),
|
||||
{ root: "UID", offset: 0, limit: 2 },
|
||||
);
|
||||
expect(selected.references).toEqual([
|
||||
expect.objectContaining({ path: ["UID"], target: 1 }),
|
||||
]);
|
||||
},
|
||||
);
|
||||
it("reports an XML archive dictionary keyed __proto__ as omitted", () => {
|
||||
const xml = build({ ...archive, $objects: ["$null", "value"] }).replace(
|
||||
"<key>$top</key>",
|
||||
|
||||
Reference in New Issue
Block a user