Skip to content

feat(managed): select declaring types in inspect_managed_members - #1706

Merged
N0zoM1z0 merged 11 commits into
morluto:mainfrom
skoodster:feat/managed-member-type-selection
Oct 12, 2026
Merged

N0zoM1z0 merged 11 commits into
morluto:mainfrom
skoodster:feat/managed-member-type-selection

Conversation

@skoodster

@skoodster skoodster commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

inspect_managed_members can decode the members of exact caller-selected declaring types before expanding signatures and CIL. The optional MCP type_names input and repeatable CLI --type option allow useful inspection of large assemblies within the existing representation budget.

Refs #1878

Problem and expected behavior

Whole-assembly member expansion can reach the 64 MiB representation budget before returning useful members. Callers need to narrow decoding to known declaring types, retain the chosen names in Evidence, and distinguish selected coverage from whole-assembly observations.

Change and scope

  • Forward managed arguments through the shared application workflow, CLI and MCP adapters, then select declaring-type tokens before member signatures and bodies are decoded.
  • Report selection.type_names and selection.unmatched_type_names; preserve null when no selection is supplied and accept older Evidence without the field.
  • Retain unselected member names for edge labels. Member references and exported-type declarations remain assembly-wide inventories; output size is not guaranteed to be small.
  • Keep members outside the opposite observation's selection unknown during comparison. Prevent cross-selection remaps and mark selected application graphs partial.
  • Reuse main's existing metadata row-accounting and declaring-type lookup owner; remove the superseded duplicate index from the earlier branch.
  • Advertise the runtime uniqueness rule as uniqueItems after SDK JSON Schema conversion. Preserve readable malformed-attribute values/hashes with unknown constructor identity.

Contract and boundary impact

  • Semantic owner and earliest changed stage: managed provider member decoding selects exact declared type tokens; shared application adapters preserve caller arguments, and domain comparison/graph consumers retain selection scope.
  • CLI and MCP/tool-catalog contract: additive optional type_names and repeatable --type; output selection is null or {type_names, unmatched_type_names}. Advertised input/output schemas are validated through the actual SDK boundary.
  • Provider, bridge, target-format, or platform compatibility: static PE/CLI inspection only; no native provider or execution support changes.
  • Evidence, artifact, provenance, or reconstruction contract: caller names, artifact SHA-256/MVID, original CIL hashes, unknown names and selected coverage remain explicit. Legacy Evidence remains readable.
  • Process execution, authorization, cleanup, or containment impact: no target assembly is loaded or executed; existing read-only lifecycle and resource policy remain.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: ignored catalogs regenerate from source contracts; authored managed documentation and examples are updated. No generated output, binary or dependency additions.

Evidence and regression coverage

  • Tests added or updated: selected/unmatched types, legacy Evidence, comparison pairing and unknown absence, graph scope, actual SDK-advertised input/output validation, duplicate input rejection, malformed metadata facts and source hashes.
  • Base reproduction or other evidence: without selection, large assemblies can return unavailable coverage with the existing representation-budget reason. Managed arguments were previously discarded by the shared CLI/MCP application path.
  • User-visible CLI/MCP output: selection: {type_names: ["Example.Parser", "Missing.Type"], unmatched_type_names: ["Missing.Type"]}; only selected members are described, with explicit scope limitations.
  • Real release artifacts: two unchanged managed DLLs yielded 102 and 16 selected methods; all 118 raw CIL hashes independently matched PE-mapped original file bytes. Actual CLI/fresh stdio MCP normalized results and caller arguments matched exactly. Both selected views reported complete coverage with no resource-limit issue; unmatched-only requests retained their explicit selection.
  • Remaining proof gaps: arbitrary full-assembly workloads can still exhaust the unchanged budget. Nested names currently use reported bare names and can select multiple types. The follow-up was executed on Linux x64; other clients and providers were not verified by these runs. Reconstruction/native-runtime semantics are outside this selection proof.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • Focused managed source/domain/application/MCP/provider/graph tests — 229 passed across 21 files. Final grouped malformed-attribute assertions — 20 passed.
  • Actual SDK Schema regression — duplicate selection passed the advertised schema before the follow-up and was rejected afterward, matching runtime validation.
  • node scripts/verify/managed/conformance.mjs — 11 verified controls; optional operator/decompiler-oracle scenarios remain unsupported in this environment.
  • Real public CLI/MCP selected-member replay — two DLLs, 118 independent original-CIL hash checks, exact result parity, unmatched controls, responsiveness and unchanged source digests passed. One CPU, peak approximately 1.46 GiB, zero memory-limit/OOM/OOM-kill events.
  • npm run check:ci — all eight static tasks and architecture guards passed before the final format-diagnostics main sync; CI validates the published integrated head.
  • npm run docs:check and npm run check:fast — passed after final main integration.
  • npm run verify:ghidra:mips-shared — all eight real native CLI/MCP controls passed on this final integrated head using Linux x64 Ghidra 12.1.4/JDK 21/GNU 2.40; cleanup verified with zero surviving owned descendants. Peak approximately 1.50 GiB with zero memory-limit/OOM/OOM-kill events.
  • Fresh full-capacity controls — both original DLLs returned complete artifact/native-boundary metadata without resource limits; unselected member inspection still reported the unchanged 67,108,864-byte limit. Peak approximately 0.90 GiB, zero memory-limit/OOM/OOM-kill events.

Compatibility, safety, and release

  • Breaking changes or migration steps: none; existing calls retain full inspection with selection: null, and legacy Evidence omitting selection remains readable.
  • Real Hopper/Ghidra, browser, or OS coverage: no native engine is involved; follow-up real release-artifact CLI/MCP replay on Linux x64 only.
  • Package or release metadata impact: additive authored contracts, examples and documentation; no installer/dependency changes.
  • Security, privacy, process, or containment review: no code execution or byte mutation; caller-selected names and original artifact identity are preserved. Input and representation budgets are unchanged.

Review checklist

  • This PR addresses a concrete problem or an agreed enhancement.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

Large assemblies such as a .NET base class library could not be inspected:
inspect_managed_members returned coverage "unavailable" with a
representation-budget resource limit (mscorlib.dll from Unity's Mono 2.0
profile, 2.5 MB).

Two causes, both fixed:

- Custom-attribute constructor names resolved their declaring type by
  rescanning the TypeDef table for every attribute, charging the decode
  budget per row read (about 64 MB on mscorlib before any member was
  decoded). MethodList starts are now read once per layout and searched;
  unordered or unreadable TypeDef rows keep the original row scan.
- Every member was always fully decoded. A new optional type_names input
  (MCP) / repeatable --type option (CLI) decodes signatures and method bodies
  only for the selected exact declaring types. Unselected members keep their
  names so call edges and field accesses stay labelled. The result reports
  selection.type_names and selection.unmatched_type_names; selection is null
  when every type is inspected.

Managed tool arguments were previously dropped before reaching the provider
on both the MCP and CLI paths; they are now passed through, and the CLI
Evidence records them.

Verified on the real mscorlib.dll: --type System.Threading.Monitor returns
the 17 Monitor methods in under 2 s using about 10 MB of the budget.

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

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T00:27:32.311545Z 61b4e85 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1fa6d3575f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/dotnet/ManagedMemberInspector.ts Resolved
Comment thread src/domain/managed/managedArtifact.ts Resolved
Comment thread src/dotnet/ManagedMemberInspector.ts Resolved
A type_names selection emits members of the selected declaring types only,
but consumers read it as a whole-assembly inventory:

- compare_managed_members reported members outside the other side's
  selection as added or removed. Absence is now observed only within the
  opposite side's selection, and observations with different selections
  compare as partial with a limitation.
- project_managed_application_graph reported complete-within-inputs for
  a selected inspection. A selection now marks the graph partial.
- Evidence recorded before selection existed lacks the field and failed
  managedMemberInspectionSchema; a missing selection now parses as null.

The type_names description now says a nested type's bare name selects
every nested type of that name.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5188383164

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

types:
selected === null
? parsedTypes.types
: parsedTypes.types.filter((type) => selected.has(type.token)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Decode only selected TypeDefs before filtering

When type_names is used on a type-heavy assembly, parseTypes has already materialized every TypeDef and recharged every row and cached name before this post-filter runs. Enough unselected types therefore exhaust the 64 MiB representation budget and make the selected request return unavailable even when the requested type and its members are tiny; after the minimal identity scan needed for selection, fully decode only the selected TypeDef rows.

AGENTS.md reference: AGENTS.md:L42-L42

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed in this PR: parseTypes materializes every TypeDef exactly as it did before selection existed, so this is no regression, and selection already skips member signatures and bodies, which dominate the budget (Unity's mscorlib: 1,828 TypeDefs, ~10 MB with a selection vs. unavailable before). Decoding only selected TypeDef rows would change types/declaring-type resolution for every caller, so it seems better as a follow-up if maintainers want it.

🤖 Addressed by Claude Code

Comment thread src/dotnet/ManagedMemberInspector.ts Resolved
…dable names

- The MethodList-start index reserved metadataRowCursor's 256-byte per-row
  bookkeeping for every TypeDef row, although it retains one number per row.
  It now reserves 8 bytes per row once and reads rows without the per-row
  charge, so building it cannot exhaust the budget where the row scan it
  replaces would not have.
- When a TypeDef name cannot be read, a requested name reported in
  selection.unmatched_type_names may belong to that row. The result now
  carries a limitation saying so, alongside the parse issue that already
  makes coverage partial.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dfa756b064

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

name,
declaringType: declared?.fullName ?? null,
});
if (!isSelected(selected, declared)) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Skip unselected member rows before reserving their names

For a valid assembly with few TypeDefs but roughly 262k unselected MethodDef/Field rows, a small or even unmatched type_names request still reaches this guard only after creating a metadataRowCursor (which reserves 256 bytes), decoding the name, and inserting a core entry for every row. Separate from the already flagged TypeDef pass, these unselected rows alone can exhaust the 64 MiB budget, after which the resource-limit failure makes the inspector discard the selected result as unavailable; defer name/core decoding to tokens referenced by selected bodies or iterate selected row ranges.

AGENTS.md reference: AGENTS.md:L42-L42

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed in this PR, for the same reason as the TypeDef pass above: name/core decoding of every MethodDef and Field row is what inspection did before selection existed, so this is no regression, and selection already removes the dominant per-member cost (signatures and bodies). Restricting row iteration to selected ranges and deferring names to referenced tokens changes how edges are labelled for every caller, so it fits better as a separate follow-up if maintainers want it.

🤖 Addressed by Claude Code

When two inspections select different declaring types, keyMembers paired
members before the selections were consulted, so a same-IL method in a type
only the left selected could be reported as an exact remap of one in a type
only the right selected. Members whose declaring type the other side did not
observe now skip pairing and stay one-sided, where the selection already
keeps them unknown.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d594052934

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli/managedCommands.ts Resolved
…n CLI help

- A comparison of two inspections with the same type selection reported
  complete-within-inputs with no sign that its totals cover only those
  types. It now carries a limitation naming the selected types.
- The CLI --type help now says a nested type is named by its bare name,
  matching the MCP type_names contract.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1983ed2af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const declared = declaringType(row);
const token = metadataToken(4, row);
core.set(token, { token, name });
if (!isSelected(selected, declared)) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Dereference member-pointer tables before type filtering

On a valid unoptimized (#-) assembly with reordered FieldPtr or MethodPtr rows, TypeDef FieldList/MethodList ranges index the pointer tables, but these loops feed raw Field/MethodDef row numbers to createDeclaringTypeLookup and then filter on that owner. Since ManagedMetadataLayout.ts:285 admits #- metadata but the pointer rows are never dereferenced here, selecting type A can emit B's member as A and omit A's actual member while reporting complete coverage; resolve pointer rows before applying the selected-token filter for both fields and methods.

AGENTS.md reference: AGENTS.md:L19-L19

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed in this PR: REA does not dereference FieldPtr/MethodPtr anywhere on main. createDeclaringTypeLookup already maps raw Field/MethodDef rows to owners there, so declaring_type labels on reordered #- assemblies are already affected without a selection, and the selection filter only inherits that owner. Pointer-table support belongs in the shared range/owner resolution for all managed tools, so it seems better as its own fix.

🤖 Addressed by Claude Code

…rage

A selected member inspection marked the projected graph partial through
partialInput, which then claimed "At least one supplied managed Evidence
record has partial coverage" even when every source parsed completely.
The selection is now tracked on its own: it still makes the graph
partial, and the limitation names the selected declaring types instead.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 81b4b1a973

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +115 to +117
if (!sameSelection(left, right))
limitations.push(
"The observations select different declaring types; a member outside the other side's selection is unknown, not added or removed.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain both differing type selections

Fresh evidence after the common-scope fix is that when the left and right records choose different sets (for example A versus B), this branch still emits only a generic warning while sideManifest contains no selection. If either selected type has no members or is unmatched, the retained comparison cannot reveal which side's totals and unknown items were scoped to which names without fetching both source records; preserve both selections in the side manifests or name each scope here.

AGENTS.md reference: AGENTS.md:L42-L42

Useful? React with 👍 / 👎.

@CassieFox23

Copy link
Copy Markdown
Contributor

TL;DR: The new type_names option works on a large .NET base library, and the attribute fix works too. It does not help on a very large game assembly, which still runs out of the 64 MiB decode budget. A whole-file call on the base library also still runs out.

I tested the latest head, 81b4b1a, which has 6 commits. The base is 13e03e9 (#1694). Thanks, skoodster, for the quick review fixes.

Results

Check Node 22 Node 24 Node 26
5 changed test files, 75 tests pass pass pass
MCP type_names, Monitor pass pass pass
CLI --type, Monitor pass pass pass

The wider PR test command (22 files, 175 tests, 3 skipped) also passes on Node 24.

I used two real assemblies. The first is mscorlib.dll from Mono 6.14.1 (MIT per the Fedora rpm). It has 2,930 types and 27,264 methods. It is the 4.5 profile, not the Unity Mono 2.0 file in the PR. So counts differ: Monitor has 31 methods here, and Enter(object, bool&) is one of them. The second is the main assembly of a closed-source Unity game. It is 15.8 MB (15,767,552 bytes) with 16,152 types and 90,779 methods.

MCP call Base Head
inspect_managed_artifact, Mono partial, budget error at 2,170,258 complete, 6,449 attributes
inspect_managed_members, Mono, no type_names unavailable, budget error at 2,170,258 unavailable, budget error at 108,820
inspect_managed_members, Mono, Monitor rejected, unknown key partial, 31 methods
inspect_managed_members, game, no type_names unavailable, budget error at 7,788,758 unavailable, budget error at 13,558,797
inspect_managed_members, game, one type rejected, unknown key unavailable, budget error at 8,588,298

The Mono file in the PR reports partial for a whole-file call. This 4.8 MB file reports unavailable. The error text is Managed metadata exceeds the 67108864 byte representation budget. On base, offset 2,170,258 sits inside the TypeDef table. That fits the PR's cause 1.

What I saw:

  • The Mono mscorlib shipped beside the game behaves the same. It gives 31 Monitor methods and 13 Enumerator types.
  • Selection works on the Mono library. I tried one type, three types (296 methods), a nested type, a generic type, a missing name and a wrong-case name. Missing and wrong-case names come back in unmatched_type_names with no error. Counts match an independent reader (dnfile) for every type I checked.
  • Nested types use the bare name. Sys (nested in Interop) selects 39 methods. Interop.Sys, Interop+Sys and Interop/Sys all come back unmatched. The bare name Enumerator selects 13 unrelated types with 75 methods. Nothing in the output names each parent. The PR documents this choice.
  • Generic types need the arity suffix. That is the backtick and a number that the metadata puts in the name. System.Collections.Generic.List plus that suffix gives 74 methods. The name without it is unmatched.
  • The game assembly fails on any selection. A missing name fails too, on both MCP and CLI. The offsets are near 8.58 million, inside the Field table. So unselected rows seem to use the budget. The bot reviews raised this, and the PR calls it a follow-up. I did not trace the code.
  • Bad input is rejected clearly. An empty list, an empty string, a plain string and a repeated name all fail with a message. Base rejects every type_names, and base CLI says Unknown flag: --type. So the dropped arguments (cause 3) are fixed.
  • One oddity. The Monitor result has coverage.state of partial and no listed issues. 938 of its 3,491 member references have signature errors (element types 0x15 and 0x1f). I did not confirm that these set partial.

MCP call time was about 0.3 s for one Mono type and 0.4 to 0.5 s for three. That clock covers the call only, with the server already running. Peak server memory was 379 MB. An idle server that had just rejected a call already held about 320 MB. CLI wall time was 1.3 to 2.7 s. The box was shared, with a load average of 6 to 10 out of 24 threads.

Not run

  • The PR's own Unity Mono 2.0 mscorlib.dll. It was not on this box.
  • Windows and macOS.
  • The full test suite, conformance.mjs, the docs check, typecheck, lint and knip.
  • compare_managed_members and the graph projection on real selections. Only the PR's unit tests cover them.
  • Each earlier commit on its own.
  • Why head stops earlier than base in the whole-file Mono call (offset 108,820 against 2,170,258).
All MCP cases on head

Each case ran twice. Times are the call only, run 1 and run 2. Base rejected every type_names call with an unknown-key error.

  • Mono mscorlib, one type System.Threading.Monitor: 1 type, 31 methods, 0 fields, 49 edges; 332 and 323 ms; peak 379 MB.
  • Mono mscorlib, three types: 3 types, 296 methods, 7 fields, 1059 edges; 433 and 540 ms; peak 390 MB.
  • Mono mscorlib, nested type, unique bare name: 1 type, 39 methods, 2 fields, 33 edges; 307 and 326 ms; peak 379 MB.
  • Mono mscorlib, nested type spelled Interop.Sys: 0 types, 0 methods, 0 fields, 0 edges, unmatched Interop.Sys; 322 and 340 ms; peak 379 MB.
  • Mono mscorlib, nested type spelled Interop+Sys: 0 types, 0 methods, 0 fields, 0 edges, unmatched Interop+Sys; 303 and 338 ms; peak 373 MB.
  • Mono mscorlib, nested type spelled Interop/Sys: 0 types, 0 methods, 0 fields, 0 edges, unmatched Interop/Sys; 415 and 372 ms; peak 378 MB.
  • Mono mscorlib, nested bare name shared by many types: 13 types, 75 methods, 47 fields, 74 edges; 412 and 428 ms; peak 383 MB.
  • Mono mscorlib, generic type with the backtick arity: 1 type, 74 methods, 6 fields, 168 edges; 341 and 398 ms; peak 383 MB.
  • Mono mscorlib, generic type without the arity: 0 types, 0 methods, 0 fields, 0 edges, unmatched System.Collections.Generic.List; 308 and 328 ms; peak 381 MB.
  • Mono mscorlib, missing type: 0 types, 0 methods, 0 fields, 0 edges, unmatched System.Threading.Nonexistent; 334 and 362 ms; peak 377 MB.
  • Mono mscorlib, wrong-case type: 0 types, 0 methods, 0 fields, 0 edges, unmatched system.threading.monitor; 294 and 347 ms; peak 379 MB.
  • Mono mscorlib, duplicate name: rejected: type_names must not repeat a name; 4 and 4 ms; peak 319 MB.
  • Mono mscorlib, one real and one missing name: 1 type, 31 methods, 0 fields, 49 edges, unmatched System.Nope; 303 and 399 ms; peak 378 MB.
  • game's Mono mscorlib, one type System.Threading.Monitor: 1 type, 31 methods, 0 fields, 49 edges; 362 and 351 ms; peak 380 MB.
  • game's Mono mscorlib, nested bare name shared by many types: 13 types, 75 methods, 47 fields, 74 edges; 388 and 391 ms; peak 383 MB.
  • game assembly, one type: unavailable, budget error at 8,588,298; 226 and 229 ms; peak 394 MB.
  • game assembly, three types: unavailable, budget error at 8,578,888; 266 and 187 ms; peak 394 MB.
  • game assembly, nested type, unique bare name: unavailable, budget error at 8,589,198; 214 and 236 ms; peak 392 MB.
  • game assembly, nested bare name shared by many types: unavailable, budget error at 14,939,724; 230 and 226 ms; peak 386 MB.
  • game assembly, generic type with the backtick arity: unavailable, budget error at 8,589,418; 207 and 228 ms; peak 394 MB.
  • game assembly, generic type without the arity: unavailable, budget error at 8,589,308; 226 and 234 ms; peak 394 MB.
  • game assembly, missing type: unavailable, budget error at 8,589,478; 220 and 213 ms; peak 394 MB.
  • game assembly, wrong-case type: unavailable, budget error at 8,589,478; 187 and 208 ms; peak 394 MB.
Commands
  • Build, once per tree: npm ci, npm run build and npm run test:prepare, on Node 24.18.0.
  • Tests, once per Node: node node_modules/vitest/vitest.mjs run on the 5 changed test files.
  • MCP: a small stdio client that calls inspect_managed_members with path and type_names, and reads the server's peak memory from /proc.
  • CLI: node scripts/rea.mjs inspect-managed-members <dll> --type <name> --format json, run under /usr/bin/time -v.
  • Type counts: dnfile 0.18.0 (MIT) in a throwaway Python env, separate from REA.
Test setup

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

N0zoM1z0 and others added 5 commits October 11, 2026 23:49
Reuse the merged metadata row accounting and declaring-type lookup owner.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
Preserve the verified native profile and current capability projections.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
Advertise unique type selections after JSON Schema conversion and verify the
actual MCP schema. Preserve malformed attribute facts during main integration
and document the scope and limits of selected member inspection.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
Preserve both null and out-of-range cases with exact value hashes and scoped
parse reasons, without duplicated assertion blocks.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
Retain shared target classification and recovery from main.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61b4e856c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@N0zoM1z0
N0zoM1z0 merged commit a149d18 into morluto:main Oct 12, 2026
31 checks passed
@skoodster

Copy link
Copy Markdown
Contributor Author

@CassieFox23 thanks for the thorough run. About the oddity of coverage.state being partial with no listed issues:

  • Cause: member references are decoded for the whole assembly, even with type_names. The inspector marks coverage partial when any field, method or member-reference signature isn't fully decoded (incompleteMembers in ManagedMemberInspector.ts). Those per-signature problems are recorded on each member's own signature / issue fields, not in coverage.issues, so the 938 member references with element types 0x15 (GENERICINST) and 0x1f (CMOD_REQD) were what set partial.
  • On the current head: the maintainer's sync of main brings in the newer signature decoder, which covers generic instantiations and custom modifiers. On 6ac9e49, Unity's Mono 2.0 mscorlib.dll (the PR's file) returns System.Threading.Monitor with coverage.state: complete, and all 476 member references decode. I haven't rerun your Mono 6.14.1 file, so I can't confirm it there.
  • Large game assembly: you're right that unselected rows still use the budget. Every Field and MethodDef row's name and owner entry is still read and charged, even with a selection. That's the follow-up I mentioned in the review threads. It would mean reading only the selected rows' ranges and naming referenced tokens on demand.

🤖 Posted by Claude Code

@morluto

morluto commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

@skoodster, thank you for carrying type selection all the way from repeatable CLI/MCP inputs to decoding and Evidence coverage. Selecting before signatures and CIL are expanded gives analysts a practical way to inspect known types, and preserving unmatched names and partial scope keeps the result honest. Welcome to REA!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants