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:
@@ -47,6 +47,7 @@ export const handleExecutionContextCreated = (
|
||||
)
|
||||
return;
|
||||
const key = String(identifier);
|
||||
// New contexts may reuse an id. Scripts already parsed keep the frame stored on them.
|
||||
state.executionContextFrames.set(key, frameId);
|
||||
};
|
||||
|
||||
@@ -80,6 +81,7 @@ export const handleScriptParsed = (
|
||||
state.completeness.exclude("scripts", exclusionReasonForUrl(rawUrl));
|
||||
return;
|
||||
}
|
||||
const executionContext = executionContextKey(params.executionContextId);
|
||||
const baseScript = {
|
||||
scriptId,
|
||||
rawUrl,
|
||||
@@ -87,7 +89,11 @@ export const handleScriptParsed = (
|
||||
origin: sanitized.origin,
|
||||
...scriptMetadataValues(params),
|
||||
language: cdpStringValue(params.scriptLanguage) ?? null,
|
||||
executionContextKey: executionContextKey(params.executionContextId),
|
||||
executionContextKey: executionContext,
|
||||
frameId:
|
||||
executionContext === null
|
||||
? null
|
||||
: (state.executionContextFrames.get(executionContext) ?? null),
|
||||
};
|
||||
const baseBytes = scriptMetadataStringBytes(baseScript);
|
||||
const sourceMapDeclared =
|
||||
@@ -131,6 +137,7 @@ const scriptMetadataStringBytes = (script: {
|
||||
readonly hash: string | null;
|
||||
readonly language: string | null;
|
||||
readonly executionContextKey: string | null;
|
||||
readonly frameId: string | null;
|
||||
}): number =>
|
||||
stringByteLength(script.scriptId) +
|
||||
stringByteLength(script.rawUrl) +
|
||||
@@ -138,7 +145,8 @@ const scriptMetadataStringBytes = (script: {
|
||||
stringByteLength(script.origin) +
|
||||
stringByteLength(script.hash) +
|
||||
stringByteLength(script.language) +
|
||||
stringByteLength(script.executionContextKey);
|
||||
stringByteLength(script.executionContextKey) +
|
||||
stringByteLength(script.frameId);
|
||||
|
||||
const stringByteLength = (value: string | null): number =>
|
||||
value === null ? 0 : Buffer.byteLength(value, "utf8");
|
||||
|
||||
Reference in New Issue
Block a user