Repository navigation
fix(managed): pair same-named nested types by their enclosing types - #3079
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
a7f062b to
a05e896
Compare
Reuse the NestedClass owner from morluto#3059 and retain resolved signature comparison and shared member-list facts. Co-authored-by: Kaoru0822 <[email protected]>
…ries Share bounded type-name digests between signatures and TypeDef observations, admit projected records before allocation, and preserve current identity gaps instead of returning to bare display names. Use owned identity consistently through matching, contention and absence checks, retain historical comparison limits, and keep omitted display labels independent of known identity. Co-authored-by: Kaoru0822 <[email protected]>
Co-authored-by: Kaoru0822 <[email protected]>
|
@greptileai review this draft at head Please check the complete current diff, especially source-owned nested identity when selection omits enclosing types, unknown ownership through matching/absence, and shared parser/digest ownership after #3059. The updated PR body records the executed tests, real SDK evidence, resource measurements and remaining verification gaps. |
Preserve unresolved current enclosing-name facts before choosing the limited historical bare-name mode. Regress both directions with a parsed cyclic PE fixture; neither may report unchanged. Co-authored-by: Kaoru0822 <[email protected]>
Co-authored-by: Kaoru0822 <[email protected]>
|
@greptileai review this draft at its current head The prior head is superseded. Final review additionally fixed a reproduced historical/current identity boundary in |
|
Recording the human owner's explicit declaration: @N0zoM1z0 accepts responsibility for the complete PR, has reviewed the final diff and relevant code, has checked the evidence and meaningful gaps, and declares the PR ready for initial maintainer review. The three Author readiness items are filled at the owner's direction. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Require TypeDef visibility and NestedClass applicability to agree before naming a type. Preserve source fields and one offset-backed issue, including errors discovered while naming a selected child after its parent is omitted. Use coherent nested/top-level PE fixtures and regress all nested visibility values and false unchanged claims. Co-authored-by: Kaoru0822 <[email protected]>
Co-authored-by: Kaoru0822 <[email protected]>
Summary
Fix
compare_managed_membersconfusing same-named nested types in different enclosing types. WhenA.Inner.MandB.Inner.Mswap their bodies, both methods now remain paired with their own enclosing type and report changed, including when callers select onlyInner.Original fix by @8rulerstar; follow-up review integrates #3059's shared metadata/signature owners and latest main
ca1b2f860.Problem and expected behavior
Two compiled .NET 10 libraries contain
A.Inner.M() => 1andB.Inner.M() => 2; the second swaps the return values. The affected main reportschanged: 0. The original PR fixes full inventories but still cross-pairs selectedInnerinventories.Actual SDK MCP result on head
b2ff7a81f:{"M":[{"left":"0x06000003","right":"0x06000003","status":"changed"},{"left":"0x06000005","right":"0x06000005","status":"changed"}],"summary":{"unchanged":2,"changed":2,"added":0,"removed":0,"unknown":0}}Both methods report
cilandopcode-shapedifferences. No linked issue: this defect was reproduced while reviewing the existing comparison.Change and scope
Contribution scope decision: not applicable; existing offline analysis, with no new provider or target execution/mutation authority.
Contract and boundary impact
types[].enclosing_type_tokenandname_sha256default null.nesting_readdefaults null for historical Evidence, false for incomplete current rows, true for fully read/index-valid rows; individual names can still be unresolved.Expected effects:
Evidence and regression coverage
Selected-parent omission, malformed-current nesting and current enclosing-cycle regressions fail on integrated original
717a249a3and pass with the follow-up.Greptile P1 reproduced on
412a37ba6: 8 regressions fail, including all six nested visibility values, a contradictory parent omitted by selection, and a false unchanged pair against a genuine top-level type. Fixed in2b85b22d1; coherent PE fixtures preserve the existing nested-signature assertions.Final review reproduced an additional false unchanged claim when historical Evidence meets a current cycle, in both directions on
3fafe0f27; both regressions pass after2e5bae9b1.Actual pinned SDK MCP reproduces selected cross-pairing on
717a249a3, then verifies the result above onb2ff7a81f. Microsoft's .NET 8/10System.Collections.Immutable.dllalso passes summary, one-type/one-method retained pages and repeated calls. Target SHA-256 remains unchanged; clients, servers and sessions close.Malformed metadata uses authored PE fixtures. Runtime verification is Linux only; no native-provider or Windows/macOS runtime claim.
Full .NET 8/10 CoreLib inspection remains unverified: baseline
00ce07d2cand follow-up3fafe0f27hit the same existing 64 MiB representation boundary. Actual summary/pages preserveresource-limit, partial metadata and uncertainty; zero returned rows do not establish absence. Product budgets were not relaxed.Observations, derivations and unknowns remain distinguishable.
Source identity/provenance and failed attempts remain preserved.
Unsupported and incomplete outcomes remain visible.
Validation performed
b2ff7a81f.npm run check: passed on final head (types, lint, format, unused code, metadata, architecture guards).npm run docs:check: passed after the compatibility fix, including 5 consistency tests.git diff --check: clean.These are single observed trials, not statistical speedup claims. Identity computation reuses per-row/operand caches, caps depth at 64 and reserves representation budget before projection. Summary and explicit pages bound returned context while retaining full source Evidence locally.
Compatibility, safety, and release
No input migration/dependency change. Unresolved current ownership now remains unknown even for a singleton matching payload. Historical comparison limitations are explicit. REA does not load or execute target assemblies.
Author readiness
Human owner: @N0zoM1z0
Before merge
type(scope): outcome; the reason for no linked issue is stated.