Skip to content

Fix native enumerable battle capture and runtime build versions - #3

Merged
LightCyan01 merged 1 commit into
mainfrom
fix/capture-target-enumerable
Oct 11, 2026
Merged

LightCyan01 merged 1 commit into
mainfrom
fix/capture-target-enumerable

Conversation

@LightCyan01

Copy link
Copy Markdown
Owner

Summary

Fix native generic enumerable snapshots so battle-target values are captured instead of failing before enumeration. Prepare recorder release 1.3.3 and keep its release version from overriding the bundled runtime assembly versions.

Background

Generated IL2CPP IEnumerator<T> exposes Current, while MoveNext and Dispose belong to its other interfaces. The previous reader required a concrete MoveNext on the generic wrapper, producing collection-reader errors and empty target snapshots. In release builds, the workflow's VERSION environment variable also overwrote BepInEx's assembly version, causing a plugin/runtime version warning.

Changes

  • Invoke the native iterator interfaces through their resolved virtual methods, unboxing value-type receivers and preserving native exceptions. Reuse existing iteration, disposal and boxed-value readers.
  • Extend the existing native startup checks with populated, empty and reference-valued generic enumerables; include exception details when checks fail.
  • Set runtime versions explicitly in the build script and individual-build instructions. Update the capture version and changelog to 1.3.3.

Testing

  • Reproduced the original generic-enumerator failure with the previous plugin and verified reader construction with the repair.
  • Built and packaged the complete installer with VERSION=1.3.3 present; verified BepInEx 6.0.0 and HarmonySupport 1.5.3 assembly versions and matching plugin references. The capture project built with zero warnings/errors; initial dependency builds retained upstream warnings.
  • Ran the native startup checks in the supported installed client: populated, empty and reference-valued enumeration passed alongside existing reader checks; all 50 battle hooks loaded without capture errors or the runtime-version warning.
  • Verified package checksums, ZIP contents and source identity. Original recordings and logs were preserved.

Additional Notes

Startup checks cover synthetic native objects. A fresh battle recording has not yet been verified. Historical target values that were never recorded cannot be reconstructed by this fix.

@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

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

Summary

Fixes native generic enumeration so battle snapshots can read target values. Prepares release 1.3.3.

  • Native generic battle targets now reach the snapshot records.
  • Capture releases use version 1.3.3 while runtime versions stay fixed.

No actionable issues were found. This review checked source code; it did not independently run the installed client or package build.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["Native collection"] --> B{"GetEnumerator returns generic IEnumerator?"}
  B -->|Yes| C["Resolve native interface method"]
  C --> D["Unbox receiver when needed"]
  D --> E["Invoke method and raise native exceptions"]
  E --> F["Read boxed return value"]
  B -->|No| G["Use existing concrete iterator reader"]
  F --> H["Enumerate items"]
  G --> H
  H --> I["Dispose iterator"]
Loading

Reviews (1) · Last reviewed commit: "Fix native enumerable battle capture and..." · Reviewed by Greptile

@LightCyan01
LightCyan01 merged commit bf4d49d into main Oct 11, 2026
3 checks passed
@LightCyan01
LightCyan01 deleted the fix/capture-target-enumerable branch October 11, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant