Skip to content

Add read-only recycler registry and processing events - #363

Merged
ifBars merged 1 commit into
stablefrom
diffuin/297-d745b2e7
Oct 15, 2026
Merged

ifBars merged 1 commit into
stablefrom
diffuin/297-d745b2e7

Conversation

@diffuin

@diffuin diffuin Bot commented Oct 14, 2026

Copy link
Copy Markdown

Requested by @ifBars in #297.

Diffuin response

Confidence: Medium

Implemented the approved read-only recycler API, native processing-event bridge, and wrapper cleanup. Added focused contract tests. Builds and tests could not run because the .NET SDK is missing. PR creation is handled after this run.

Compatibility

Added RecyclerState, Recycler, and RecyclerRegistry. Existing public/protected members, behavior, save formats, and network identifiers are unchanged by the patch. Runtime compatibility remains unverified.

Fixes #297.

Recommended next steps

  1. Expose immutable discovery snapshots and direct read-only state, hatch, position, and GameObject access.
  2. Forward each native processing signal without deduplication, replay, or synthetic stop events.
  3. Register through native Start, detach on destruction and scene changes, and omit interaction methods.
Evidence and validation

Evidence inspected

  • Regular Mono assembly inspection confirms native start/stop signals; the stop signal does not imply that State has left Processing.
  • IL2CPP wrappers expose the required members and lifecycle hooks. Retained UnityAction delegates preserve callback identity during removal, following GameLifecycle's existing pattern.
  • Regular and beta stripped Recycler declarations match. AssetRipper confirms named recycler objects in Scenes/Main.unity, but serialized component details remain incomplete.
  • Only S1API source and tests were added. No game code, assemblies, generated wrappers, scenes, or assets were copied or redistributed.

Validation performed

  • Reviewed the approved issue plan, repository guidance, existing registry patterns, and both runtime evidence streams.
  • Checked all five added files for whitespace errors and audited public summary documentation.
  • Attempted MonoMelon and Il2CppMelon restore; both failed because no .NET SDK is installed.

Runtime validation remaining

  • Restore, build, and run the complete test suite separately for MonoMelon and Il2CppMelon with the required SDK and references.
  • Run DocFX, public API documentation coverage, and ApiCompat against the exact target-branch assembly.
  • Validate native state/hatch timing and processing signals on Mono and IL2CPP, including host/client authority behavior and repeated native signals.
  • Validate discovery, late instantiation, immutable snapshot membership, destruction, stale-listener cleanup, scene reload, and save/load restoration on both runtimes.
Diffuin run details
  • Provider: codex
  • Model: gpt-6.1-sol
  • Reasoning: high (Luna advisor: complexity (medium); baseline coupled implementation)
  • Elapsed: 554s
  • Codex thread: 01a137cf-9d25-7f03-b6b5-867627adf80b

AI notice: Generated with AI assistance and not guaranteed accurate. Verify findings and plans against the current source and runtime.

Closes #297


Diffuin job: d745b2e7-b2da-4e5b-80d6-dc7656a78187
Commit: 9e5072ee9d00350dedfa1f5f844de0b3b7267827

@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 73ddb76b-e669-4cb5-bc07-2830a31f4a13

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

ifBars
ifBars previously requested changes Oct 14, 2026
Comment thread S1API/Trash/Recycler.cs
@diffuin

diffuin Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Author

I made no repository changes.

Diffuin response

Confidence: High

Comment #4267484182 is not applicable at HEAD 9e5072e: native recycler members are internal, and public State returns the managed RecyclerState enum. Files remain unchanged. Both restore attempts failed because the .NET SDK is missing.

Evidence and validation

Evidence inspected

  • Comment #4267484182: S1API/Trash/Recycler.cs:27 declares the native field internal, and line 29 declares the constructor internal. Line 61 exposes RecyclerState; line 62 converts the native value internally. These declarations are shared by both runtime branches.
  • S1API/Trash/RecyclerState.cs:6 defines S1API's enum. Recycler's remaining public properties return bool, UnityEngine.Vector3, and UnityEngine.GameObject. RecyclerRegistry exposes IReadOnlyList and Action events, without Schedule One types in public signatures.
  • S1API.Tests/Trash/RecyclerContractTests.cs:26 already checks that Recycler has no public constructors or fields and that State returns RecyclerState. The registry contract test checks managed event signatures. These tests were inspected but could not run.

Validation performed

Runtime validation remaining

  • Restore, build with AutomateLocalDeployment=false, and run the full contract suite separately for MonoMelon and Il2CppMelon using the required SDK and references.
  • Run DocFX, the 80% public documentation coverage gate, and ApiCompat against the exact target-branch assembly.
  • IL2CPP wrapper decompilation through the broker failed or exceeded its resource limit. Compiled cross-runtime compatibility remains unverified.
  • Human validation remains required on both game runtimes for discovery, native state/event timing, authority, destruction, scene reload, and save/load. No live runtime results are claimed.
Diffuin run details
  • Provider: codex
  • Model: gpt-6.1-sol
  • Reasoning: xhigh (Luna advisor: complexity (high); baseline coupled implementation)
  • Elapsed: 240s
  • Codex thread: 01a13aca-76d6-7f73-8923-e8210d53e170

AI notice: Generated with AI assistance and not guaranteed accurate. Verify findings and plans against the current source and runtime.

@ifBars
ifBars dismissed their stale review October 14, 2026 14:25

Retracted after checking the current source: Recycler.State returns S1API.Trash.RecyclerState, and the native S1Recycler field is internal. This finding does not expose a native game type through the public API.

@ifBars
ifBars merged commit c843c9d into stable Oct 15, 2026
7 checks passed
@ifBars
ifBars deleted the diffuin/297-d745b2e7 branch October 15, 2026 00:41
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.

[FEATURE] Add managed recycler state and lifecycle API

1 participant