Skip to content

Fix Lua module overrides through generic dispatch roots - #1469

Merged
Frotty merged 1 commit into
masterfrom
codex/lua-module-dispatch
Oct 16, 2026
Merged

Frotty merged 1 commit into
masterfrom
codex/lua-module-dispatch

Conversation

@Frotty

@Frotty Frotty commented Oct 16, 2026

Copy link
Copy Markdown
Member

Calls through a generic interface could ignore a module-provided override and a deeper subclass override on Lua. In the repro, Root<int>.value(int) returned the parent's 10 instead of the module's 42 or the grandchild's 43; Jass already returned the correct values.

The IM override graph was correct, but Lua hierarchy-alias preparation compared the unbound parameter signatures (T, U, and int) and omitted the generic root alias. Honor explicit override relationships when those signatures differ, while retaining the existing semantic-name and return-type checks. The fix belongs in alias preparation and adds no runtime helpers or class-table recovery.

Validation:

  • Before the fix, the Lua execution repro failed with "module override lost", the phase-level test failed on the missing root alias, and Jass passed all five harness configurations.
  • All 1,019 focused tests passed with no skips across dispatch implementation, Lua translation/backend audits, classes, interfaces, modules, both generic systems, closures, field iteration, compile-time execution, tree shaking, language features and determinism.
  • New regressions cover plain and optimized/stacktraced Lua, four module-provided sibling states, early constant instantiation, inherited and deeper overrides, separate overload slots, actual emitted root-slot bindings, old/new generics, and byte-identical Jass/Lua across compilations.
  • git diff --check passed. Validation ran on Windows; Linux/macOS and the actual game remain unverified.

Remove the resolved runtime-dispatch repro from BACKLOG.md; the separate dead overload-slot item remains open.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T10:51:37.202388Z 1d12c8c 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 496c184 into master Oct 16, 2026
2 checks passed
@Frotty
Frotty deleted the codex/lua-module-dispatch branch November 25, 2026 08:53
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