Skip to content

Distinguish Lua hot reload callbacks by local receiver - #1615

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

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

Conversation

@Frotty

@Frotty Frotty commented Nov 6, 2026

Copy link
Copy Markdown
Member

Problem

Castle Fight's campaign UI registers callbacks on separate buttons created as named local values inside setup. These calls can differ only by receiver. The compiler grouped the closures by order, so inserting a registration before an edited callback was refused as ambiguous.

Change

Use the resolved callable and the name of an explicit immutable local receiver to distinguish callback sites. Calls that still share a site identity keep the existing ambiguity checks. The init-action replay rules are unchanged. Existing instances keep their captures and get the edited callback body. New registrations take effect when setup runs again.

Validation

  • Reproduced the ambiguity refusal with a reduced Castle Fight-style extension-method fixture.
  • Ran LuaHotReloadTests and LuaHotReloadFuzzTests offline on Windows, using stock Lua. The regression exercises a live callback with its original capture and the callbacks on new instances after setup runs again.
  • git diff --check passed. macOS and Linux were not run locally.

@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:00:27.451439Z fc857e6 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 1bde89d 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