fix(dotnet): inspect native boundaries of non-managed and malformed PEs
`inspect_managed_native_boundaries` wrote the PE classification (`not-managed` or `malformed`) into `coverage.state`, which accepts only `complete`, `partial`, or `unavailable`. Its own result validation then threw, so every native DLL and every PE with unreadable CLI metadata failed as a generic execution failure advising a retry. The sibling artifact and member inspectors succeed on the same files. Report these files with `unavailable` coverage, as the member inspector does, keeping the metadata status and parse issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
01be082e9e
commit
d98dcfa8c2
@@ -101,4 +101,32 @@ describe("managed native boundaries", () => {
|
||||
expect.objectContaining({ code: "invalid-metadata-root" }),
|
||||
]);
|
||||
});
|
||||
|
||||
it("reports unavailable boundaries for native and malformed PE files", () => {
|
||||
const nativeBytes = buildNativePeFixture();
|
||||
const native = inspectManagedNativeBoundariesBytes(
|
||||
nativeBytes,
|
||||
managedPeFixtureTarget(nativeBytes),
|
||||
);
|
||||
expect(native).toMatchObject({
|
||||
metadata: { status: "absent" },
|
||||
pinvoke_imports: [],
|
||||
coverage: { state: "unavailable", issues: [] },
|
||||
});
|
||||
|
||||
const malformedBytes = buildManagedPeFixture({
|
||||
corruptMetadataSignature: true,
|
||||
});
|
||||
const malformed = inspectManagedNativeBoundariesBytes(
|
||||
malformedBytes,
|
||||
managedPeFixtureTarget(malformedBytes),
|
||||
);
|
||||
expect(malformed).toMatchObject({
|
||||
metadata: { status: "malformed" },
|
||||
coverage: {
|
||||
state: "unavailable",
|
||||
issues: [expect.objectContaining({ code: "invalid-metadata-root" })],
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user