fix(managed): report ExportedType rows in managed member inspection (#1828)

* fix(managed): report ExportedType rows in managed member inspection

Facade assemblies such as System.Runtime.dll provide their types only
through ExportedType rows (type forwarders), which member inspection
never read, so they reported complete coverage with no types. Report
each row as declared with its flags, forwarder bit, TypeDefId hint, and
implementation token, and record invalid or null implementation coded
indexes as partial coverage. Comparisons now state that exported types
are not compared when either side has them.

Fixes #1812

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(managed): read earlier member Evidence without exported types

Member Evidence recorded before ExportedType rows were read omits the
field. Parse it as null (not examined) instead of rejecting it, and
state in comparisons that such an observation's exported types are
unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(managed): leave exported types unknown when metadata is unavailable

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kaoru0822
2026-10-11 07:02:16 -07:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 0b4ce83618
commit ed1519ddee
9 changed files with 283 additions and 0 deletions
+6
View File
@@ -25,6 +25,7 @@ import {
import { parseTypes, typeRanges } from "./ManagedMemberInspectorCore.js";
import {
edges,
parseExportedTypes,
parseFields,
parseMemberRefs,
parseMethods,
@@ -60,6 +61,7 @@ const unavailable = (
requires_mvid: null,
},
types: [],
exported_types: null,
fields: [],
methods: [],
member_refs: [],
@@ -117,6 +119,8 @@ export const inspectManagedMembersBytes = (
const ranges = typeRanges(bytes, layout, issues);
const parsedTypes = parseTypes(bytes, layout, ranges);
issues.push(...parsedTypes.issues);
const exportedTypes = parseExportedTypes(bytes, layout);
issues.push(...exportedTypes.issues);
const fields = parseFields(bytes, layout, ranges);
const memberRefs = parseMemberRefs(bytes, layout);
issues.push(...memberRefs.issues);
@@ -165,6 +169,7 @@ export const inspectManagedMembersBytes = (
requires_mvid: inventory.module?.mvid ?? null,
},
types: parsedTypes.types,
exported_types: exportedTypes.exportedTypes,
fields: fields.fields,
methods: methods.methods,
member_refs: memberRefs.refs,
@@ -180,6 +185,7 @@ export const inspectManagedMembersBytes = (
limitations: [
"Metadata tokens are build-local coordinates and are only meaningful with the reported artifact SHA-256 and MVID.",
"CIL instruction anchors are decoded from file-backed method bodies only; no target assembly is loaded or executed.",
"Exported types are reported from ExportedType rows as declared; forwarded types are not resolved in their implementing assemblies.",
"Signatures are decoded for common ECMA-335 primitive, class, valuetype, pointer, byref, array, and generic variable forms; unsupported forms retain raw signature hashes.",
],
},