Skip to content

feat(il2cpp): retain v108 header and string evidence - #9925

Merged
morluto merged 3 commits into
morluto:mainfrom
dhruvac29:feat/9791-il2cpp-v108
Nov 11, 2026
Merged

morluto merged 3 commits into
morluto:mainfrom
dhruvac29:feat/9791-il2cpp-v108

Conversation

@dhruvac29

@dhruvac29 dhruvac29 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Expose a bounded header and metadata-string observation for IL2CPP metadata version 108 in the existing refusal Evidence. This is the partial path requested in #9791. Full type, method, literal and binary decoding remains unresolved, so this draft does not close the issue.

Problem and expected behavior

Unity 6000.6 metadata reports version 108. REA currently returns unsupported_target with source identity only. A caller needs the section extents and a small string inventory even before the changed record and native registration layouts can be verified.

Change and scope

The existing IL2CPP provider now recognizes a v108 header, validates section bounds and overlap, counts NUL-terminated metadata strings, and retains up to 16 string samples of 128 bytes each. Invalid UTF-8 samples retain base64 bytes. The response remains an unsupported_target error with partial Evidence, so callers do not mistake unknown type and method inventories for empty ones. Files incompatible with the unverified header layout remain unsupported and retain source Evidence.

Header order is based on LibCpp2IL's v108 header reader. The reporter's 13,733,560-byte file is not attached, so this layout has only synthetic verification.

Follow the contribution scope. This is a read-only extension of an existing local metadata reader; a new provider or target execution capability is not involved.

Contract and boundary impact

  • Semantic owner and earliest changed stage: Il2cppMetadataProvider, immediately after the stable metadata snapshot.
  • Contribution scope fit and linked maintainer decision: Existing static local-file inspection; no separate maintainer scope decision identified.
  • CLI and MCP/tool-catalog contract: Inputs and success schema unchanged. The v108 unsupported_target partial Evidence gains version_108_partial_inventory; MCP retains it by Evidence reference.
  • Provider, bridge, target-format, or platform compatibility: Applies only to v108 files with the documented counted header shape. No binary linking or Ghidra seeds for v108.
  • Evidence, artifact, provenance, or reconstruction contract: Keeps SHA-256 and byte length, labels layout unverified, and records exact section extents and bounded string observations.
  • Target selection, authority, upstream behavior, and cleanup details: Reads only the caller-selected local file using the existing stable artifact reader and cleanup scope.
  • Generated metadata, package, or installation impact: None.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: Synthetic v108 header, malformed bounds, bounded samples and invalid UTF-8; CLI and MCP refusal paths.
  • Base reproduction or other evidence: Current v108 prefix is rejected by the base reader as unsupported-version and carries no header or string inventory. The source layout is from LibCpp2IL; no real v108 artifact was available.
  • User-visible CLI/MCP output: CLI error details.partial_observation.normalized_result.version_108_partial_inventory includes header_bytes, 41 sections, strings.terminated_count, and strings.sample. MCP returns a retained-evidence reference to that partial Evidence.
  • Remaining proof gaps: Real Unity 6000.6.8f1 metadata and matching binary; header validation against that file; full record and binary registration decoding.

Boundary coverage includes incompatible section bounds, padding after the assumed header, and unsupported but recognized metadata. The existing stable artifact reader and provider lifecycle are unchanged; no new lifecycle path is introduced.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run test:focused -- tests/boundary/il2cpp/il2cppMetadataProvider.test.ts — 32 passed, including padding, unverified-layout refusal, BOM preservation and cancellation during a large v108 scan.
  • npm run test:focused -- tests/acceptance/il2cppMetadataCli.test.ts — 22 passed.
  • npm run check:fast — typecheck and lint passed.
  • npm run verify:test-discovery — all 3362 test files discovered once.
  • oxfmt --check on changed files and git diff --check — passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: None. v108 remains an explicit refusal with additional partial Evidence.
  • Real Hopper/Ghidra, browser, or OS coverage: No real Unity v108 artifact or binary was available; no Ghidra seed path is enabled.
  • Package or release metadata impact: None.
  • Security, privacy, process, or containment review: Local read-only parsing; string samples are capped and are included only in the caller's partial Evidence.

Author readiness

Human owner: @dhruvac29

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

@dhruvac29
dhruvac29 marked this pull request as ready for review November 11, 2026 02:41
Copilot AI balanced review requested due to automatic review settings November 11, 2026 02:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T13:49:39.100324Z b9c91f6 New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bfcadc2e00

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/il2cpp/Il2cppMetadataV108.ts Resolved
Comment thread src/il2cpp/Il2cppMetadataV108.ts Resolved
@morluto
morluto merged commit be6ec3f into morluto:main Nov 11, 2026
4 of 6 checks passed
@morluto morluto mentioned this pull request Nov 11, 2026
3 tasks done
@morluto morluto added area: evidence Evidence, artifacts, and reconstruction enhancement New feature or request 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

area: evidence Evidence, artifacts, and reconstruction enhancement New feature or request provider: il2cpp Analysis provider / engine: il2cpp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants