Repository navigation
Lua hot reload: structural payloads (new functions, globals, fields, classes, lambdas, packages) - #1548
Conversation
A hot-reload build names each function, global, class, field, allocator and dispatch stub after its source name and a short hash of its identity, so adding or removing a declaration renames nothing else. Release builds keep their numbered names.
…erloads keep their own names
… within their function Identities whose six-digit hashes collide get sixteen digits, found before anything is named, so names do not depend on the order of the compilation units. Locals and parameters are numbered per function, so a function added to the program renumbers nothing in another (the stack-trace parameter of every function did).
… which name helpers
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c859df36b8
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…defaults, entry and legacy-manifest diagnostics
…ctural # Conflicts: # de.peeeq.wurstscript/src/main/java/de/peeeq/wurstscript/translation/lua/translation/LuaTranslator.java # de.peeeq.wurstscript/src/test/java/tests/wurstscript/tests/LuaHotReloadTests.java # docs/LUA_HOT_RELOAD.md
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e496ea4a83
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ge init fails the install
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0739c01db5
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…hanges to functions stored by an earlier payload rejected
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6fe91a315
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…lled, start new packages in dependency order
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 419b26a09b
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b70ce4d84
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Current head: 3096302. The new P1s are fixed structurally: complete source initializer units are preserved before flattening, and runtime declaration identities/types are tracked separately from Lua text. Windows validation: LuaHotReloadTests (39), DeterministicChecks (34), plus LuaBackendAuditTests (297) on the same production changes. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30963022ac
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e5524997b
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75666c8fe2
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33954b6989
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ea0253a49
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91356125fb
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Please review current head ac637c0. The latest fix records actual source initializer target storage and preserves globals which already had live values before their initializer was introduced. Focused validation: 64 hot-reload, 35 determinism and 297 Lua backend audit tests pass on Windows. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac637c01b3
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Please review current head e3e54d7. Mixed old/new initializer storage is now rejected in compile-time and runtime preflight. Tests cover baseline, earlier installed payloads and skipped payloads, including no mutation on rejection. Focused Windows checks: 65 hot-reload, 35 determinism and 297 Lua backend audit cases pass. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Takeover complete: ready to merge at e3e54d7. Codex's current-head result reports no major issues; all findings have addressed/rejected dispositions and all threads are resolved. Two complete snapshots over 60 seconds apart were unchanged. Ubuntu CI and test reporting passed on this head; Windows focused validation passed (65 hot-reload, 35 determinism, 297 Lua backend audit cases). No merge was performed. Takeover review rounds: 10. New in-game measurements and macOS validation remain unverified. Continuing the requested follow-on separately, beginning with currently rejected named sibling closure additions. |
A Lua hot-reload payload previously replaced only existing function bodies. This change lets an editor add functions, globals, fields, classes, interfaces, lambdas, and packages while the map keeps its live state.
The manifest records functions, declarations, bootstrap data, source global initializer units, and package init statements. Initializers become complete functions before IM flattening, preserving their locals, control flow, array stores, and tuple components. Payloads run those units in the compiler's package dependency order, including added globals in existing packages and packages introduced by earlier payloads.
The map records successful run-once work, semantic declaration bindings/types, and the actual completion order of initializer units. Payloads compare that order with their current plan, including globals added by earlier payloads and files the map missed; delivery does not count as execution. Preflight rejects incompatible structure even when emitted Lua text is unchanged. Source initializer units identify their actual storage after tuple lowering and generic specialization. Existing global values are retained with a warning, including when an initializer is first added to a global introduced by an earlier payload. Units whose storage changes or mixes old and new globals are rejected before mutation. A new package init runs once, reports failure, and warns if a later payload changes code it already ran. New field stores supply defaults to existing objects and retain mutable defaults per object.
Edits that reinterpret existing declarations or field types, change incompatible class data, or change/remove a function already stored as a value are rejected with restart reasons. This includes registered callback adapters and methods retained by class-table slots unless those slots are rebound. The session preserves slot and initializer metadata from earlier payloads, and removals receive restart diagnostics without rerunning completed initialization. Ambiguous sibling closure additions/removals are also rejected. Release emission is unchanged behind the opt-in
-luaHotReloadflag.Validation:
Remaining gaps: real-project edit-history measurements, library reload hooks, state migration for rejected edits, and multiplayer. Linux validation is provided by PR CI; macOS and new in-game probes remain unverified.