Repository navigation
fix(il2cpp): validate retained declaring type relationships - #7946
Merged
Merged
Conversation
Contributor
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryThe PR rejects impossible declaring-type relationships in imported IL2CPP Evidence and shares the existing cycle check with the metadata producer.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Metadata file] --> B[Producer checks nesting indices]
B --> C[Shared cycle walk]
C --> D[Produced report]
E[Imported Evidence] --> F[Shared report schema]
D --> F
F --> G[Owner bounds and shared cycle walk]
G -->|Valid| H[CLI or MCP view]
G -->|Invalid import| I[invalid_request]
Reviews (1) · Last reviewed commit: "fix(il2cpp): validate retained declaring..." · Reviewed by Greptile |
morluto
marked this pull request as ready for review
October 28, 2026 23:24
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7353. Imported IL2CPP Evidence could contain nonexistent method/type owners or cyclic enclosing types and still produce successful views.
Problem and expected behavior
A retained method could match a nonexistent declaring type, while self-nesting and cycles appeared as valid type rows. The metadata producer already rejects invalid relationships. Both producer and imported Evidence now use one domain-owned enclosing-chain check, and the shared schema rejects out-of-range type and method owners.
Change and scope
Move the existing linear, cooperatively yielding cycle walk into the domain and reuse it at the imported-parent boundary. Preserve
-1as an absent owner and historical optional collection omissions. No artifact execution or provider capability is added.Contract and boundary impact
invalid_request; schemas do not change.Expected effects:
Evidence and regression coverage
Authenticated synthetic Evidence exercises CLI and MCP views for valid nesting, self and multi-node cycles, and out-of-range type and method owners. Domain tests cover the relationship cases and existing historical omission controls; producer tests retain their cycle/self-nesting checks. No real Unity metadata or naturally occurring malformed record was tested.
Validation performed
npm run test:local -- src/domain/analysisView/il2cppMetadataView.test.ts— 45 passed.npm run test:focused -- tests/acceptance/il2cppMetadataCli.test.ts— 20 passed, including CLI/MCP controls.npm run test:focused -- tests/boundary/il2cpp/il2cppMetadataFile.test.ts— 64 passed.npm run check:fastandgit diff --check— passed.Compatibility, safety, and release
Previously accepted inconsistent imported Evidence is rejected as invalid. Valid historical omission stays readable. No real-provider behavior claim is made.
Author readiness
Human owner: @morluto
Before merge
type(scope): outcome.