Skip to content

Distinguish Lua hot reload callbacks on accessor results - #1616

Merged
Frotty merged 1 commit into
masterfrom
codex/hotreload-accessor-receiver-callbacks
Nov 6, 2026
Merged

Frotty merged 1 commit into
masterfrom
codex/hotreload-accessor-receiver-callbacks

Conversation

@Frotty

@Frotty Frotty commented Nov 6, 2026

Copy link
Copy Markdown
Member

Problem

Castle Fight's campaign UI registers click callbacks on values returned by calls such as toggle.getClickFrame(). These closures still shared an order group after #1615. Inserting a sibling registration while editing the existing callback triggered the ambiguity refusal.

Change

Use the immutable local and resolved method declaration to distinguish a callback whose receiver comes from one parameterless, non-generic instance method. The accessor is used only to name the source site. Reload preserves existing captures and runs no accessor or registration. New callbacks are installed when setup runs again. Calls with no supported receiver identity still use the existing ambiguity checks.

Validation

  • Reproduced the ambiguity refusal with the new stock Lua test before changing the compiler.
  • The test covers distinct methods on one local and the same method on two locals. It checks the live callback's updated body and original capture, counts accessor invocations, and checks future registrations.
  • Ran LuaHotReloadTests and LuaHotReloadFuzzTests offline on Windows. Linux and macOS were not run locally.
  • git diff --check passed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 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-06T21:22:48.860462Z dee9dca PR opened
ℹ️ 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.

@Frotty
Frotty merged commit 3f99173 into master Nov 6, 2026
2 checks passed
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