Skip to content

Agent docs: Warcraft III runtime facts and corrected test guidance - #1370

Merged
Frotty merged 10 commits into
masterfrom
claude/repo-doc-agent-knowledge-12095f
Oct 6, 2026
Merged

Frotty merged 10 commits into
masterfrom
claude/repo-doc-agent-knowledge-12095f

Conversation

@Frotty

@Frotty Frotty commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Adds docs/WC3_RUNTIME.md and AGENTS.md section 11 on what the game does that the code, the interpreter and the tests do not show: Wurst has no garbage collector, the game's Lua is not the test Lua, nothing optimises the emitted script at run time, and Lua tables must not be iterated in an observable order. Each fact says whether it was measured, follows from the code, or is community-reported.

Repo-wide rules in AGENTS.md:

  • fix a defect where it originates; the whole toolchain is ours, so no monkey-patching a later pass or a sibling's bug
  • the compiler is deterministic (points at DeterministicChecks from Make compilation order deterministic #1366)
  • an orientation on the old <T> and new <T:> generic systems
  • the performance goal, why Lua is shimmed to behave like Jass, and not taking the current shape of the compiler for granted

Also:

  • sibling projects listed, plus a CLAUDE.md that imports AGENTS.md
  • claims the code contradicts are corrected: testLua(true) replaces the interpreter runs, wurstMod does not exist, the locals spill starts at 200, a missing luac fails a test
  • generic and historical lines removed, the duplicated KeyedMap text trimmed, README's AllTests.xml line replaced
  • RecycleCodeGeneratorQueue's comment said the opposite of the code: the free list is a stack, so a freed id comes back first
  • two open questions in BACKLOG.md: auditing the remaining Lua emission, and the shape of the generated AST

New test LuaTranslationTests.emittedLuaUsesOnlyLibrariesTheGameProvides fails if emitted Lua uses debug, collectgarbage, io, os, package or require. Checked by making the backend emit them: it fails, and passes once reverted.

Frotty added 2 commits October 6, 2026 12:23
…id recycler's comment

The test Lua is stock 5.3 with every library, so executing the script cannot notice a helper that reaches for debug or collectgarbage. The recycler hands out the most recently freed id first; its comment claimed the opposite.
…est guidance

Adds docs/WC3_RUNTIME.md and AGENTS.md section 11, a sibling-project list, and a CLAUDE.md that imports AGENTS.md. Corrects claims the code contradicts (testLua replaces the interpreter runs, wurstMod does not exist, the locals spill starts at 200, luac missing fails). Drops generic and historical lines.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 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-06T11:32:46.439047Z ad19b84 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.

@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: 22e34cb5ad

ℹ️ 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 added 3 commits October 6, 2026 12:34
…ce goal, Lua parity shim

Adds the repo-wide rules to fix defects where they originate and to keep the compiler deterministic, an orientation on the old and new generic systems, the performance goal and the purpose of the Lua shim. Drops the KeyedMap text that duplicated WURST_LANGUAGE.md. Records two open questions in BACKLOG.md: auditing the remaining Lua emission, and the shape of the generated AST.
Natives are only emitted when a program refers to them, so the single-fixture test could not see testSuccess's os.exit. A second test enumerates LuaNatives and exempts testSuccess explicitly. Docs also record why Lua real == stays exact.
@Frotty

Frotty commented Oct 6, 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: 8152ddea15

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

Natives, old-generics fallbacks and other helpers are emitted only on demand, so guarding one fixture and then one registry left gaps. Every emitted byte starts as a literal under translation/, so the test scans those and exempts only the testSuccess shim. Removes the LuaNatives accessor the previous test needed.
@Frotty

Frotty commented Oct 6, 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: e18946d7a1

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

Comment thread docs/WC3_RUNTIME.md Resolved
Frotty added 2 commits October 6, 2026 13:11
… class

ImTranslator.buildClassPartitions unions each class with its superclasses and gives the group one ClassManagementVars, so siblings and the base class share ids and the cap.
…ned'

LuaTranslator.translateFunc emits __wurst_-prefixed natives directly and wraps the rest in a definition guard.
@Frotty

Frotty commented Oct 6, 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: 50f8efab98

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

Comment thread docs/WC3_RUNTIME.md Resolved
…races and callbacks

The test Lua is 5.3 on Windows and the Linux CI but its version is never checked. Stack-trace bookkeeping applies to instrumented functions, not every call. The literal-scan guard counts a banned name anywhere, inside strings and comments too, since a string can be run with load.
@Frotty

Frotty commented Oct 6, 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: 1c80641245

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

The literal scan exempted any os.exit() literal in LuaNatives.java, so a second native emitting it would have passed. It now tracks the addNative(...) line a literal belongs to.
@Frotty

Frotty commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: ad19b84fdb

ℹ️ 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 146c74a into master Oct 6, 2026
3 checks passed
@Frotty
Frotty deleted the claude/repo-doc-agent-knowledge-12095f branch October 6, 2026 14:30
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