[PR #5309] [MERGED] feat(managed)!: show readable type names in member signatures #6871

Closed
opened 2026-11-01 21:43:42 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5309
Author: @ln-bodicherla
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @gensokyo-dev

Base: main ← Head: feat/5149-managed-signature-type-names


📝 Commits (3)

  • 075d84d feat(managed): show readable type names in member signatures
  • 5869799 feat(managed)!: render signature type names through shared resolution
  • 9327a08 chore(managed): align signature integration with current main

📊 Changes

12 files changed (+566 additions, -75 deletions)

View changed files

📝 docs/managed-code-analysis.md (+12 -2)
📝 src/domain/managed/managedArtifact.ts (+2 -2)
📝 src/dotnet/ManagedMemberInspector.test.ts (+2 -2)
📝 src/dotnet/ManagedMemberInspector.ts (+12 -6)
📝 src/dotnet/ManagedMemberInspectorCore.ts (+39 -4)
📝 src/dotnet/ManagedMemberRows.ts (+20 -0)
📝 src/dotnet/ManagedMetadataInventoryRows.ts (+1 -1)
📝 src/dotnet/ManagedSignatureResolution.test.ts (+350 -5)
📝 src/dotnet/ManagedSignatureTypeNames.test.ts (+16 -10)
📝 src/dotnet/ManagedSignatureTypeNames.ts (+37 -19)
📝 tests/acceptance/managedCliOutput.test.ts (+44 -0)
📝 tests/boundary/mcp/managedMemberSummaryMcp.test.ts (+31 -24)

📄 Description

Summary

Fixes #5149. Managed field/method/member-reference signatures now append readable TypeDef/TypeRef names while retaining the encoded operand, for example valuetype:24 (System.SequencePosition). The original contribution is integrated on main f60e42a9a.

Breaking change: new inspections return signature_resolution: "type-names-v2" and updated display strings. Historical v1 Evidence remains accepted and compares with the same raw/resolved digest policy. Consumers requiring the v1 literal or parsing display strings must adapt; display text is not identity.

Implementation and boundaries

The existing metadata/name owner supplies display and digest from one per-inspection cached lookup. Rendering consumes already decoded, validated coordinates. Current declaration identity, metadata validation, VARARG, selection, method paging, partial recovery and source issue offsets are retained. No target assembly is loaded or executed and no new execution/provider authority is introduced.

Nested paths, generics, modifiers, pointers, arrays and function pointers preserve their grammar. Valid but unresolved TypeSpecs/names retain raw operands; invalid coordinates retain the existing malformed result. The shared decode budget admits retained names and transient rendering copies before allocation; nesting stays capped at 64. Cache lifetime ends with the inspection, with no additional cross-target state. CLI/MCP use the same implementation and existing summaries/filtered retained views.

The digest regression now compares actual digest bytes after asserting both names resolve and have identical spelling; differing NamedRow depths cannot make it pass. The renamed internal module has no remaining old-path consumers.

Executed validation

Linux x64, Node 24.22.1 / npm 11.16.0, head 9327a085af:

  • 574 passed across 30 focused files, including metadata/signature/CIL/identity/capacity tests, compiled CLI, SDK-validated MCP summaries, field selection, retained paging and historical Evidence. Two seeded properties exercise 1,000 arbitrary and 1,000 valid nested signatures.
  • check:fast, formatting, git diff --check, docs:check (9 README tests), and test discovery (all 2,814 files exactly once) pass.
  • System.Memory 4.5.5, lib/netstandard2.0/System.Memory.dll: 142,752 bytes, SHA-256 11590d8bb3b12f29f4202b3ef8593229a5cd6debb61e76cba9ac5493a82ee382. Independent dnfile 0.17.0/pefile 2024.8.26 confirms 704 methods, 273 fields, 1,407 raw signature hashes and type 24 = System.SequencePosition. Full public CLI before/after results retain every non-display fact, hash, parse status and coverage; the only other change is the documented explanatory limitation. Coverage is complete with no issues.
  • Eight completed public stdio MCP tasks independently verify names/hashes, 42 selected methods/3 fields, or two retained pages containing all nine ReadOnlySequence<T>.Slice signatures. The selected workflows preserve source coverage and linked complete Evidence; source bytes are unchanged and temp/process cleanup succeeds.

After merging the newer MCP input-budget changes on main, the same 574 tests pass again, as do current static/docs/discovery checks. Two additional final-head MCP tasks pass under the original guard and production input defaults: selected-complete: 691,754 estimated tokens (311,535 catalog), 2.729 s / 3.79 CPU s / 482.3 MiB peak family RSS; summary-views: 327,458 estimated tokens (311,535 catalog), 5.881 s / 7.98 CPU s / 932.2 MiB peak family RSS. The paired comparison below remains pinned to its measured revisions.

Current Greptile review is 5/5 at this exact head, with all threads resolved. Final CI is green: source tests 21,732 passed /16 skipped, all 8/8 built-dependent shards and portable aggregate, Static checks, build, documentation, Linux x64 native package and CI required pass. Other platform/capability lanes were skipped by scope, not qualified as passing. No bypass. CI run.

Measured costs

Before d39b3000e; after 5869799dbb. Two repetitions per revision/workflow, alternating and reversing order. Fresh client/server sessions, warm OS caches; compile-cache state not independently controlled. SDK 2.3.1 validates named contracts. Families managed,application, compact input schemas. Whole transport includes initialization/instructions, catalog, requests, replies, notifications and text/structured representations.

Task Estimated tokens Elapsed CPU Peak family RSS
Before, selected complete 687,402 2.782–3.043 s 3.91–4.22 s 473.6–477.3 MiB
After, selected complete 691,754 2.765–4.009 s 3.84–5.33 s 477.5–481.0 MiB
Before, summary + two pages 326,974 5.390–6.606 s 7.31–9.07 s 939.2–946.5 MiB
After, summary + two pages 327,458 5.784–5.923 s 7.84–8.31 s 893.9–939.0 MiB

Readable names add about 0.63% /0.15% estimated whole-transport tokens respectively (catalog 311,487 → 311,535). For this question, current summary/pages return fewer tokens than selected-complete delivery, with higher latency/memory from additional calls and schema compilation. These runs establish no speedup.

Tokenx 1.3.0 estimates serialized transport, not billed model/context tokens. RSS is a 10 ms sum over the client/server process group; CPU includes both and excludes the external sampler. A 1.5 GiB family/150 s guard stops incomplete work before OOM; all eight measured tasks complete with no stops or survivors. Cold caches, full-schema discovery and deep native providers are unmeasured; corpus/oracle preparation is outside timings.

Two incomplete preflights are retained separately: unfiltered complete MCP output on main exceeds the existing default 10 MiB response budget and returns retained Evidence; a local measurement-script directory cleanup error was then corrected. Their additional measured costs are retained: respectively 313,106 /687,402 estimated transport tokens, 5.165 /3.390 s, 6.61 /4.89 CPU s, and 470.8 /477.5 MiB peak family RSS. Neither is claimed as a passing task or an analysis speed result. No transport limit was raised. Full CLI output and the selected MCP workflows supply the verification above.

Author readiness

Human owner: @ln-bodicherla

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/5309 **Author:** [@ln-bodicherla](https://github.com/ln-bodicherla) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `feat/5149-managed-signature-type-names` --- ### 📝 Commits (3) - [`075d84d`](https://github.com/morluto/rea/commit/075d84d21f8a89f482f6bbd4642d70e74ecdab3d) feat(managed): show readable type names in member signatures - [`5869799`](https://github.com/morluto/rea/commit/5869799dbb7372437b9c530ae0bc851a2cd51157) feat(managed)!: render signature type names through shared resolution - [`9327a08`](https://github.com/morluto/rea/commit/9327a085af6cbddd7a9ce879199bf52379dde44c) chore(managed): align signature integration with current main ### 📊 Changes **12 files changed** (+566 additions, -75 deletions) <details> <summary>View changed files</summary> 📝 `docs/managed-code-analysis.md` (+12 -2) 📝 `src/domain/managed/managedArtifact.ts` (+2 -2) 📝 `src/dotnet/ManagedMemberInspector.test.ts` (+2 -2) 📝 `src/dotnet/ManagedMemberInspector.ts` (+12 -6) 📝 `src/dotnet/ManagedMemberInspectorCore.ts` (+39 -4) 📝 `src/dotnet/ManagedMemberRows.ts` (+20 -0) 📝 `src/dotnet/ManagedMetadataInventoryRows.ts` (+1 -1) 📝 `src/dotnet/ManagedSignatureResolution.test.ts` (+350 -5) 📝 `src/dotnet/ManagedSignatureTypeNames.test.ts` (+16 -10) 📝 `src/dotnet/ManagedSignatureTypeNames.ts` (+37 -19) 📝 `tests/acceptance/managedCliOutput.test.ts` (+44 -0) 📝 `tests/boundary/mcp/managedMemberSummaryMcp.test.ts` (+31 -24) </details> ### 📄 Description ## Summary Fixes #5149. Managed field/method/member-reference signatures now append readable TypeDef/TypeRef names while retaining the encoded operand, for example `valuetype:24 (System.SequencePosition)`. The original contribution is integrated on main `f60e42a9a`. **Breaking change:** new inspections return `signature_resolution: "type-names-v2"` and updated display strings. Historical v1 Evidence remains accepted and compares with the same raw/resolved digest policy. Consumers requiring the v1 literal or parsing display strings must adapt; display text is not identity. ## Implementation and boundaries The existing metadata/name owner supplies display and digest from one per-inspection cached lookup. Rendering consumes already decoded, validated coordinates. Current declaration identity, metadata validation, VARARG, selection, method paging, partial recovery and source issue offsets are retained. No target assembly is loaded or executed and no new execution/provider authority is introduced. Nested paths, generics, modifiers, pointers, arrays and function pointers preserve their grammar. Valid but unresolved TypeSpecs/names retain raw operands; invalid coordinates retain the existing malformed result. The shared decode budget admits retained names and transient rendering copies before allocation; nesting stays capped at 64. Cache lifetime ends with the inspection, with no additional cross-target state. CLI/MCP use the same implementation and existing summaries/filtered retained views. The digest regression now compares actual digest bytes after asserting both names resolve and have identical spelling; differing NamedRow depths cannot make it pass. The renamed internal module has no remaining old-path consumers. ## Executed validation Linux x64, Node 24.22.1 / npm 11.16.0, head `9327a085af`: - **574 passed across 30 focused files**, including metadata/signature/CIL/identity/capacity tests, compiled CLI, SDK-validated MCP summaries, field selection, retained paging and historical Evidence. Two seeded properties exercise 1,000 arbitrary and 1,000 valid nested signatures. - `check:fast`, formatting, `git diff --check`, `docs:check` (9 README tests), and test discovery (all 2,814 files exactly once) pass. - [System.Memory 4.5.5](https://api.nuget.org/v3-flatcontainer/system.memory/4.5.5/system.memory.4.5.5.nupkg), `lib/netstandard2.0/System.Memory.dll`: 142,752 bytes, SHA-256 `11590d8bb3b12f29f4202b3ef8593229a5cd6debb61e76cba9ac5493a82ee382`. Independent dnfile 0.17.0/pefile 2024.8.26 confirms 704 methods, 273 fields, 1,407 raw signature hashes and type 24 = `System.SequencePosition`. Full public CLI before/after results retain every non-display fact, hash, parse status and coverage; the only other change is the documented explanatory limitation. Coverage is complete with no issues. - Eight completed public stdio MCP tasks independently verify names/hashes, 42 selected methods/3 fields, or two retained pages containing all nine `ReadOnlySequence<T>.Slice` signatures. The selected workflows preserve source coverage and linked complete Evidence; source bytes are unchanged and temp/process cleanup succeeds. After merging the newer MCP input-budget changes on main, the same 574 tests pass again, as do current static/docs/discovery checks. Two additional final-head MCP tasks pass under the original guard and production input defaults: selected-complete: 691,754 estimated tokens (311,535 catalog), 2.729 s / 3.79 CPU s / 482.3 MiB peak family RSS; summary-views: 327,458 estimated tokens (311,535 catalog), 5.881 s / 7.98 CPU s / 932.2 MiB peak family RSS. The paired comparison below remains pinned to its measured revisions. Current Greptile review is **5/5** at this exact head, with all threads resolved. **Final CI is green:** source tests **21,732 passed /16 skipped**, all **8/8** built-dependent shards and portable aggregate, Static checks, build, documentation, Linux x64 native package and `CI required` pass. Other platform/capability lanes were skipped by scope, not qualified as passing. No bypass. [CI run](https://github.com/morluto/rea/actions/runs/40826963626). ## Measured costs Before `d39b3000e`; after `5869799dbb`. Two repetitions per revision/workflow, alternating and reversing order. Fresh client/server sessions, warm OS caches; compile-cache state not independently controlled. SDK 2.3.1 validates named contracts. Families `managed,application`, compact input schemas. Whole transport includes initialization/instructions, catalog, requests, replies, notifications and text/structured representations. | Task | Estimated tokens | Elapsed | CPU | Peak family RSS | | --- | ---: | ---: | ---: | ---: | | Before, selected complete | 687,402 | 2.782–3.043 s | 3.91–4.22 s | 473.6–477.3 MiB | | After, selected complete | 691,754 | 2.765–4.009 s | 3.84–5.33 s | 477.5–481.0 MiB | | Before, summary + two pages | 326,974 | 5.390–6.606 s | 7.31–9.07 s | 939.2–946.5 MiB | | After, summary + two pages | 327,458 | 5.784–5.923 s | 7.84–8.31 s | 893.9–939.0 MiB | Readable names add about 0.63% /0.15% estimated whole-transport tokens respectively (catalog 311,487 → 311,535). For this question, current summary/pages return fewer tokens than selected-complete delivery, with higher latency/memory from additional calls and schema compilation. These runs establish no speedup. Tokenx 1.3.0 estimates serialized transport, not billed model/context tokens. RSS is a 10 ms sum over the client/server process group; CPU includes both and excludes the external sampler. A 1.5 GiB family/150 s guard stops incomplete work before OOM; all eight measured tasks complete with no stops or survivors. Cold caches, full-schema discovery and deep native providers are unmeasured; corpus/oracle preparation is outside timings. Two incomplete preflights are retained separately: unfiltered complete MCP output on main exceeds the existing default 10 MiB response budget and returns retained Evidence; a local measurement-script directory cleanup error was then corrected. Their additional measured costs are retained: respectively 313,106 /687,402 estimated transport tokens, 5.165 /3.390 s, 6.61 /4.89 CPU s, and 470.8 /477.5 MiB peak family RSS. Neither is claimed as a passing task or an analysis speed result. No transport limit was raised. Full CLI output and the selected MCP workflows supply the verification above. ## Author readiness Human owner: @ln-bodicherla - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:43: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#6871
No description provided.