fix: bind identity and coverage to the producing rule (#1513)

* fix: bind identity and coverage to the producing rule

Logical paths, container families, examined bytes, path-segment conventions, destination collisions, file-id leases, Mach-O CPU selection, and firmware cleanup now follow the observation that owns each rule.

* fix: fail unmatched Mach-O slices and keep firmware roots independent

A fat target whose architecture lipo did not list now stops before slice tools run. Chained fixups still count unread LC_DYLD_INFO rebase bytes, and a firmware cleanup failure no longer blocks the next workspace.

* test: cover path identity and runtime families at the projection boundary

NFC joins and segment conventions are now asserted by the path resolver, the Apple projection, and a real APK inventory instead of helper unit tests.

* test: expect unread dyld rebase bytes in the Apple dispatch fixture

The legacy LC_DYLD_INFO fixture keeps a rebase range this reader does not decode, so the public CLI and MCP check now requires that partial coverage beside the bind opcodes.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
morluto
2026-10-10 17:14:47 +08:00
committed by GitHub
co-authored by Cursor Agent
parent 7a56fe6260
commit b4db35f092
48 changed files with 1251 additions and 266 deletions
+19 -1
View File
@@ -46,7 +46,6 @@ describe("captured script path projection", () => {
it.each([
["https://a.test/main.js", "https://a.test/main.js"],
["https://a.test/main.js", "https://a.test/main.js?v=2"],
["https://a.test/A/main.js", "https://a.test/a/other.js"],
["https://a.test/main.js", "https://a.test/main.js/child.js"],
])(
"isolates every version in a conflicting layout (%s, %s)",
@@ -99,6 +98,25 @@ describe("captured script path projection", () => {
},
);
it("keeps case-distinct URL paths until the destination collides", () => {
const planned = planWebScriptExport([
source("https://a.test/A/main.js"),
source("https://a.test/a/other.js", 2),
]);
expect(
planned.every(
({ record }) =>
record.content.state === "exported" &&
record.content.layout === "url-path",
),
).toBe(true);
const paths = planned.map(({ record }) =>
record.content.state === "exported" ? record.content.relative_path : "",
);
expect(paths[0]).toMatch(/\/A\/main\.js$/u);
expect(paths[1]).toMatch(/\/a\/other\.js$/u);
});
it("does not choose a canonical version when a competing source is unavailable", () => {
const missing: CapturedWebScript = {
...source("https://a.test/main.js?v=2", 2),