[GH-ISSUE #3010] [Perf] Add caller-selected retained delivery for managed member inspections #1056

Closed
opened 2026-10-15 18:30:42 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/3010

Add caller-selected retained summaries/pages for managed member inspection. A focused type query currently requires the complete assembly-wide MemberRef inventory in the immediate response, including when the requested type does not match.

This is an efficiency follow-up to #2016, not incorrect type selection. Preserve the complete result semantics introduced by #1706 and all caller-selected inputs; do not silently filter MemberRefs or remove MCP compatibility representations. The existing retained artifact summary/pages from #2413 do not cover member results.

Real Windows evidence: Node 24.18.0, ordinary medium-integrity caller, static analysis of an existing ILSpy.dll, 1,154,048 bytes, SHA-256 ef5038b3445d583cff4dcbacec57af65bdfd10fd26e7b77312e72229a2e5ef55, MVID 55ad80ff-9bd4-4bd2-8b9f-ad470b2ed262. Baseline pinned main d4f0c5e664e26fe7ed1566dcc4b85ea9b57d52da; subsequently inspected main 9630c8ff still has the gap.

Public MCP request Selected facts Assembly-wide MemberRefs Serialized SDK response
inspect_managed_members, type_names=[ICSharpCode.ILSpy.App] 1 type, 20 methods, 7 fields, 101 call edges, 38 field accesses 3,492 3,624,543 bytes
inspect_managed_members, one unmatched type name 0 types/methods/fields, exact unmatched selection 3,492 3,466,001 bytes
inspect_managed_artifact, complete 44 assembly references, 14 resources, 1,944 attributes Not applicable 1,258,073 bytes
inspect_managed_artifact, existing summary Same identity, coverage and inventory counts, retained full parent Not applicable 11,079 bytes
inspect_analysis_view, existing two-reference page Original first two rows and MVID Not applicable 7,061 bytes

The MemberRef array alone occupies 1,635,227 compact JSON bytes in either member result. ManagedMemberInspector deliberately parses the whole assembly inventory; type_names selects declaring types/fields/methods, not MemberRefs. Complete Evidence is represented in both SDK text and structured output. This explains the cost without establishing a parser correctness bug.

Useful analyst questions such as whether a type exists, its selected method/body coverage, or which direct calls the selected type declares need an immediate compact answer with useful provenance and access to complete original facts. Extend existing authenticated Evidence retention/projection owners rather than add a separate parser or remove the producer's records. Preserve complete defaults, selection and unmatched names, SHA-256/MVID, source coverage/issues/unknowns, and assembly-wide counts. Pages must retain original rows/order/tokens/signatures/body facts; view exhaustion must not imply complete source coverage. Include separately supported collections on the implementation's fresh main, including user strings where present.

Verification should use matched and unmatched real ILSpy workflows, complete-result preservation, retained and portable public CLI/MCP views, and reconstruction of paged collections. Validate the SDK-converted declared schemas and capacity/unavailable/malformed/partial outcomes. Compare equivalent completed analyst questions with schemas, calls, retries and retained Evidence access included; separate cold/warm trials and measure elapsed time, process-family CPU/peak memory, and actual or clearly estimated tokens. Do not claim whole-task gains from smaller envelopes alone.

Baseline correctness already passed independent PE/Module-MVID checks and 20 raw CIL headers/digests, artifact/member/native-boundary CLI/MCP parity, artifact summary/reference paging, unchanged original/copy digest and Job cleanup. The DLL was never loaded or executed. Entire mixed audit: 54.63 s, native Job peak 811.7 MiB, sampled family CPU 15.72 s, sampled working set 665.4 MiB, activeProcesses=0; two logical CPUs/BelowNormal/Node heap 768 MiB/outer Job 2 GiB. API-level CPU/peak and whole-agent task tokens were not separately measured.

Serialized-output estimates using cl100k_base: selected member envelope 1,044,776 tokens; unmatched member envelope 999,595; existing artifact complete 404,638 versus summary 3,293 plus two-reference page 2,234. These are tokenizer estimates for retained serialized responses, not actual model usage or a before/after implementation benchmark. Full Evidence remains in local files; only counts/timing summaries were sent to the testing agent.

Originally created by @N0zoM1z0 on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/3010 Add caller-selected retained summaries/pages for managed member inspection. A focused type query currently requires the complete assembly-wide MemberRef inventory in the immediate response, including when the requested type does not match. This is an efficiency follow-up to #2016, not incorrect type selection. Preserve the complete result semantics introduced by #1706 and all caller-selected inputs; do not silently filter MemberRefs or remove MCP compatibility representations. The existing retained artifact summary/pages from #2413 do not cover member results. Real Windows evidence: Node 24.18.0, ordinary medium-integrity caller, static analysis of an existing ILSpy.dll, 1,154,048 bytes, SHA-256 `ef5038b3445d583cff4dcbacec57af65bdfd10fd26e7b77312e72229a2e5ef55`, MVID `55ad80ff-9bd4-4bd2-8b9f-ad470b2ed262`. Baseline pinned main `d4f0c5e664e26fe7ed1566dcc4b85ea9b57d52da`; subsequently inspected main `9630c8ff` still has the gap. | Public MCP request | Selected facts | Assembly-wide MemberRefs | Serialized SDK response | | --- | --- | --- | ---: | | inspect_managed_members, type_names=[ICSharpCode.ILSpy.App] | 1 type, 20 methods, 7 fields, 101 call edges, 38 field accesses | 3,492 | 3,624,543 bytes | | inspect_managed_members, one unmatched type name | 0 types/methods/fields, exact unmatched selection | 3,492 | 3,466,001 bytes | | inspect_managed_artifact, complete | 44 assembly references, 14 resources, 1,944 attributes | Not applicable | 1,258,073 bytes | | inspect_managed_artifact, existing summary | Same identity, coverage and inventory counts, retained full parent | Not applicable | 11,079 bytes | | inspect_analysis_view, existing two-reference page | Original first two rows and MVID | Not applicable | 7,061 bytes | The MemberRef array alone occupies 1,635,227 compact JSON bytes in either member result. ManagedMemberInspector deliberately parses the whole assembly inventory; type_names selects declaring types/fields/methods, not MemberRefs. Complete Evidence is represented in both SDK text and structured output. This explains the cost without establishing a parser correctness bug. Useful analyst questions such as whether a type exists, its selected method/body coverage, or which direct calls the selected type declares need an immediate compact answer with useful provenance and access to complete original facts. Extend existing authenticated Evidence retention/projection owners rather than add a separate parser or remove the producer's records. Preserve complete defaults, selection and unmatched names, SHA-256/MVID, source coverage/issues/unknowns, and assembly-wide counts. Pages must retain original rows/order/tokens/signatures/body facts; view exhaustion must not imply complete source coverage. Include separately supported collections on the implementation's fresh main, including user strings where present. Verification should use matched and unmatched real ILSpy workflows, complete-result preservation, retained and portable public CLI/MCP views, and reconstruction of paged collections. Validate the SDK-converted declared schemas and capacity/unavailable/malformed/partial outcomes. Compare equivalent completed analyst questions with schemas, calls, retries and retained Evidence access included; separate cold/warm trials and measure elapsed time, process-family CPU/peak memory, and actual or clearly estimated tokens. Do not claim whole-task gains from smaller envelopes alone. Baseline correctness already passed independent PE/Module-MVID checks and 20 raw CIL headers/digests, artifact/member/native-boundary CLI/MCP parity, artifact summary/reference paging, unchanged original/copy digest and Job cleanup. The DLL was never loaded or executed. Entire mixed audit: 54.63 s, native Job peak 811.7 MiB, sampled family CPU 15.72 s, sampled working set 665.4 MiB, activeProcesses=0; two logical CPUs/BelowNormal/Node heap 768 MiB/outer Job 2 GiB. API-level CPU/peak and whole-agent task tokens were not separately measured. Serialized-output estimates using cl100k_base: selected member envelope 1,044,776 tokens; unmatched member envelope 999,595; existing artifact complete 404,638 versus summary 3,293 plus two-reference page 2,234. These are tokenizer estimates for retained serialized responses, not actual model usage or a before/after implementation benchmark. Full Evidence remains in local files; only counts/timing summaries were sent to the testing agent.
bsakaguchi 2026-10-15 18:30:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1056
No description provided.