Skip to content

Replay Lua hot reload registrations under qualified constant guards - #1620

Merged
Frotty merged 1 commit into
masterfrom
codex/hotreload-qualified-init-guards
Nov 7, 2026
Merged

Frotty merged 1 commit into
masterfrom
codex/hotreload-qualified-init-guards

Conversation

@Frotty

@Frotty Frotty commented Nov 6, 2026

Copy link
Copy Markdown
Member

Problem

Lua hot reload can replay a new callback registration under an immutable package-level boolean guard. Spelling the same kind of guard as Flags.FEATURE kept the registration in ordinary package init. The payload applied, but the newly added callback was absent.

Change

Use the same resolved-constant check as event arguments to recognize qualified boolean constants declared directly on non-generic classes. Preserve the existing handling of logical guards and replay only the new registration on the selected path. Qualified mutable values and instance fields remain ordinary init.

Validation

  • Reproduced the missing registration with stock Lua before the change.
  • The regression exercises enabled and disabled branches with both free functions and static registration methods. It checks that existing setup runs once, the updated callback body is installed, and the added callback runs only when the guard is true.
  • Additional manifest coverage keeps mutable static and constant instance guards outside the replayable action list.
  • 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:20:46.577058Z bc25b06 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 8e8cc7f into master Nov 7, 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