Skip to content

Run every executing test on Lua on master CI (-PallBackends) - #1511

Merged
Frotty merged 4 commits into
masterfrom
test-all-backends
Oct 20, 2026
Merged

Frotty merged 4 commits into
masterfrom
test-all-backends

Conversation

@Frotty

@Frotty Frotty commented Oct 20, 2026

Copy link
Copy Markdown
Member

Implements the BACKLOG item "Run every executing test on Lua on master CI (-PallBackends)". On 2026-10-20, forcing Lua after the Jass runs of every executing test that did not opt in found the generic-static, wurstKeyOf and Reflection-native defects, two more fixed since (#1502, #1504) and natives missing from the test runtime (#1503). Until now an executing test ran the emitted Lua only if it opted in, so Lua-only miscompiles went unnoticed.

Design

  • -PallBackends passes wurst.test.allBackends=lua to the test JVMs; -PallBackends=full passes full; any other value stops the build.
  • WurstScriptTest: in that mode an executing test that does not run Lua itself also runs translateAndTestLua after its Jass runs; full adds a second Lua run with -inline -localOptimizations.
  • A test that cannot hold on Lua says why with .luaExempt(LuaExemption.X); testLua(false) is rejected. Without the flag an exempt test does not run Lua, as before. With it, an exempt test still runs Lua and must fail there, so a stale exemption fails the run.
  • Reasons: REAL_EQUALITY_TOLERANCE (AGENTS.md §7), CLASS_AND_METHOD_TYPE_PARAMS (§9), TEST_LUA_COMPUTES_IN_DOUBLE (docs/WC3_RUNTIME.md "Numbers"), ONE_OBJECT_ID_SPACE (docs/WC3_RUNTIME.md "Objects and memory"), INTERPRETER_MOCK_ONLY, MISSING_TEST_NATIVE (the failure must name the native), KNOWN_LUA_DEFECT (must cite a BACKLOG.md item by its exact bold title; checked in every run, so deleting the item without removing the exemption fails even on PR CI).
  • CI: master pushes on Linux and Windows run with -PallBackends (both use Lua 5.3, on which the exemptions were established). macOS takes Homebrew's unpinned Lua and runs one fork, so it is left out. PR CI and the CI matrix are unchanged.

Exemptions (28)

MISSING_TEST_NATIVE 13, KNOWN_LUA_DEFECT 9, REAL_EQUALITY_TOLERANCE 3, CLASS_AND_METHOD_TYPE_PARAMS 1, TEST_LUA_COMPUTES_IN_DOUBLE 1, ONE_OBJECT_ID_SPACE 1. Four testLua(false) were stale and now run Lua; two sat on expectedExceptions tests, where the interpreter throws before any Lua run, and were dropped. Some KNOWN_LUA_DEFECT exemptions cover defects fixed by open PRs (#1507, #1508, #1509): whichever of those lands after this one removes them, and the stale check enforces it.

Evidence

  • After merging master: the full suite (3,177 tests) passes with -PallBackends (the 28 exempt tests fail on Lua as required) and without the flag. -PallBackends=full also passed before the merge; the inlined run found nothing new.
  • Negative checks: removing an exemption from a failing test fails the run; exempting a passing test fails as stale; naming the wrong native fails; a bogus backlog citation fails with or without the flag.
  • Cost: the plain Lua runs add about 267 s of test time (+10 %), roughly 2 to 2.5 minutes of wall time at CI's two forks, on master pushes only.

PR CI does not run the flag, so this PR's CI checks only that nothing changed without it; the first master push exercises -PallBackends on Linux and Windows. Run locally on Windows; Linux CI and macOS are unverified for the flag.

BACKLOG.md: the item is narrowed to what is left (the 13 missing test natives, and executeTests(), which still has no Lua path).

-PallBackends makes every executing test which does not run Lua itself also run
the Lua target after its Jass runs; -PallBackends=full adds a Lua run with
-inline -localOptimizations. A test which cannot hold on Lua says why with
luaExempt(LuaExemption.X), whose reasons each name their record; under the flag
its Lua run must fail, so a stale exemption fails the run. Without the flag an
exempt test runs no Lua, as testLua(false) did, which is now rejected.

The 28 testLua(false) opt-outs and the executing tests which failed on Lua
without one are now 32 exemptions; four stale opt-outs run Lua. The two Lua
defects found on the way are in BACKLOG.md. Master CI passes the flag on its
Linux and Windows jobs, whose Lua is 5.3; pull requests are unchanged.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-20T19:54:27.982064Z 2dba5d7 Manual request
ℹ️ 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.

 made stale, exempt the Jass halves of the Reflection difference tests
@Frotty

Frotty commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2c28a98f1

ℹ️ 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".

…failure

luaExempt now takes the Lua failure the test expects, and its reason checks the
kind: a program outcome without a Lua error for real equality, double reals,
object bookkeeping and interpreter mocks, a translation error for class and
method type parameters, the named native for a missing one. A Lua run which
fails otherwise fails the test, showing the expected and the actual failure;
before, any failure satisfied the exemption. LuaExemptionTests covers it.
@Frotty

Frotty commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 2dba5d7e94

ℹ️ 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".

@Frotty
Frotty merged commit 517d5c7 into master Oct 20, 2026
2 checks passed
@Frotty
Frotty deleted the test-all-backends branch November 25, 2026 08:54
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