Skip to content

fix(il2cpp): validate retained declaring type relationships - #7946

Merged
morluto merged 1 commit into
mainfrom
codex/il2cpp-declaring-owners-7353
Oct 29, 2026
Merged

morluto merged 1 commit into
mainfrom
codex/il2cpp-declaring-owners-7353

Conversation

@morluto

@morluto morluto commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

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 -1 as an absent owner and historical optional collection omissions. No artifact execution or provider capability is added.

Contract and boundary impact

  • Semantic owner and earliest changed stage: IL2CPP metadata relationship validation; producer and retained view consume the same cycle check.
  • Contribution scope fit and linked maintainer decision: existing read-only metadata inspection; no new authority.
  • CLI and MCP/tool-catalog contract: invalid imported relationships now return invalid_request; schemas do not change.
  • Provider, bridge, target-format, or platform compatibility: producer's existing cycle refusal retained.
  • Evidence, artifact, provenance, or reconstruction contract: authenticated but inconsistent relationships are refused; valid historical omission remains accepted.
  • Target selection, authority, upstream behavior, and cleanup details: unchanged.
  • Generated metadata, package, or installation impact: none.

Expected effects:

  • Read existing files or captured data.

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:fast and git 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

  • 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.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • 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.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

The PR rejects impossible declaring-type relationships in imported IL2CPP Evidence and shares the existing cycle check with the metadata producer.

  • IL2CPP metadata views reject impossible owners and enclosing-type cycles.

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]
Loading

Reviews (1) · Last reviewed commit: "fix(il2cpp): validate retained declaring..." · Reviewed by Greptile

@morluto
morluto marked this pull request as ready for review October 28, 2026 23:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-28T23:29:34.171306Z bc1ab2d Draft marked ready
ℹ️ 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.

@morluto
morluto merged commit ef9ab91 into main Oct 29, 2026
43 of 44 checks passed
@morluto
morluto deleted the codex/il2cpp-declaring-owners-7353 branch October 29, 2026 00:17
@morluto morluto added bug Something isn't working provider: il2cpp Analysis provider / engine: il2cpp labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working provider: il2cpp Analysis provider / engine: il2cpp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Imported IL2CPP metadata views return impossible declaring-type relationships

1 participant