Skip to content

Recognize qualified event constants in Lua hot reload - #1619

Merged
Frotty merged 1 commit into
masterfrom
codex/hotreload-qualified-event-constants
Nov 6, 2026
Merged

Frotty merged 1 commit into
masterfrom
codex/hotreload-qualified-event-constants

Conversation

@Frotty

@Frotty Frotty commented Nov 6, 2026

Copy link
Copy Markdown
Member

Problem

A registration with a bare constant event ID can keep its callback identity across hot reload and take part in existing-package init replay. Using a qualified static constant such as EventIds.SECOND instead left the callback in an anonymous order group. Adding a registration while editing its sibling then refused the reload.

Change

Resolve qualified static constants through the same declaration identity used for bare constants. Admit direct references through their declaring non-generic class. Instance fields and specialized static storage keep their existing treatment.

Validation

  • The stock Lua regression first reproduced the ambiguity refusal. With the fix, it checks that the old callback gets its updated body and the added registration runs exactly once.
  • The instance-field case checks that reading a constant from an object does not produce an init action.
  • LuaHotReloadTests and LuaHotReloadFuzzTests passed offline on Windows with stock Lua. git diff --check passed. Linux and macOS 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-06T22:06:23.089586Z 4e41d80 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 2f99fa7 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