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:
morluto
2026-10-10 05:56:01 +08:00
parent 077d6c407b
commit 392f1f3107
78 changed files with 1065 additions and 2020 deletions
-18
View File
@@ -3,9 +3,6 @@ import { describe, expect, it } from "vitest";
import { ghidraSessionRoot } from "./GhidraSessionRoot.js";
const hasDotPrefixElement = (directory: string): boolean =>
directory.split(sep).some((element) => element.startsWith("."));
const POSIX = process.platform !== "win32";
const posixFallback = join(resolve(sep), "tmp");
const posixBase = (...segments: string[]) => join(resolve(sep), ...segments);
@@ -28,13 +25,6 @@ describe("ghidraSessionRoot", () => {
);
});
it("relocates a base that is itself a hidden directory", () => {
const base = posixBase("home", "operator", ".tmp");
expect(ghidraSessionRoot({ base, fallback: posixBase("var", "tmp") })).toBe(
posixBase("var", "tmp"),
);
});
it("ignores a fallback that is itself dotted", () => {
const base = posixBase("home", "operator", ".cache", "scratch");
expect(
@@ -45,14 +35,6 @@ describe("ghidraSessionRoot", () => {
).toBe(posixBase("home", "operator"));
});
it("never returns a path with a dot-prefixed element", () => {
const directory = ghidraSessionRoot({
base: posixBase("home", "operator", ".cache", "scratch"),
fallback: posixBase("home", "operator", ".cache"),
});
expect(hasDotPrefixElement(directory)).toBe(false);
});
it("uses the nearest safe ancestor when the platform has no fallback", () => {
expect(
ghidraSessionRoot({