Repository navigation
Closed
Labels
Description
Summary
CI checks the MCP server only with py_compile on a hand-maintained file list. Nothing imports server.py, calls a tool, or syntax-checks the Lua, JS and C# snippets, templates and examples, so broken imports, runtime errors, and unparseable snippets all pass.
Where
.github/workflows/validate.yml:234-260(validate-python).github/workflows/validate.yml:201-232(validate-templates, walks onlytemplates/).github/workflows/validate.yml:219-224(substring checks forfx_version,games,'cerulean')mcp-server/requirements.txt:1
Details
py_compilecatches syntax errors only. A wrong import (for examplefrom tools.nope import xinserver.py), a renamed function, or a runtime error in any tool body passes. A new tool module is unchecked until someone adds it to the list.- Importing
serverand callingasyncio.run(server.mcp.list_tools())returns all 10 tools locally; this cheap smoke test is not in CI. - Only Python 3.12 on ubuntu is exercised, while the plugin targets Windows users too.
node --check snippets/javascript/state-bag-entity.jsfails (Identifier 'vehicle' has already been declared); CI has no JS, Lua or C# syntax step. The 67 tracked Lua files have no parse check.validate-templatesnever looks atexamples/*/fxmanifest.lua, and its checks are substring tests that a comment would satisfy.- CI always installs the newest
mcp, so the declared lower bound is never exercised (see "Raise the mcp version floor and drop unused fastapi/uvicorn").
Impact
Regressions in the 10 MCP tools and in shipped snippets and templates reach tagged releases with green CI. The project convention "Snippets: must compile or load cleanly inside a CFX resource" is not enforced.
Steps to reproduce
- Add
return undefined_nameto any tool function body, or an import of a nonexistent module inserver.py. - Run the
validate-pythonsteps: they pass. - Run
node --check snippets/javascript/state-bag-entity.js: it fails, but no CI job runs it.
Suggested fix
- Replace the per-file list with
python -m compileall -q mcp-server, and add a smoke step:cd mcp-server && python -c "import asyncio, server; tools = asyncio.run(server.mcp.list_tools()); assert len(tools) == 10". - Smoke-call the data tools:
search_events("")starts withEvent reference database,search_docs("")withDocumentation index,search_docs("x", section="bogus")returns the invalid-section error. - Run the pytest suite (see "Add a pytest suite for the MCP server tools") in this job, and add a
windows-latestleg. - Add
node --checkfor every*.jsundersnippets/,templates/andexamples/(excluding bundler-onlyweb/sources). - Install
lua5.4and runluac -pon every tracked*.lua(optionallyluacheckwith a CFX globals file). - Extend the manifest check to
examples/and use line-anchored regexes (^fx_version 'cerulean',^games \{). - Validate
templates/*/package.jsonwithjson.load. Optionallydotnet buildtemplates/csharpon a schedule.
Acceptance criteria
- A broken import or a missing tool registration fails CI.
- A JS or Lua syntax error in any snippet, template or example fails CI.
-
examples/*/fxmanifest.luaare checked by the manifest step. - New tool modules are covered without editing a file list.
Getting started
- Relevant files:
.github/workflows/validate.yml,mcp-server/server.py - How to run checks: there is no test suite yet; run the MCP server with
cd mcp-server && pip install -r requirements.txt && python server.py, and CI checks live in.github/workflows/validate.yml - Related docs:
CLAUDE.md(Running validation, Key Conventions)
Filed by repo-audit/full-audit at 701824d. Severity: medium. Effort: M. audit-key: ci|.github/workflows/validate.yml|validate-python
Activity
TMHSDigital commentedon Nov 21, 2026
Fixed in 4c615a6.
CI now compiles every module with compileall, imports the server and asserts the 10 tools register, smoke-calls the data tools, runs on ubuntu and windows, runs node --check on all JS in snippets/templates/examples, runs luac -p on every .lua file (backtick hashes replaced first), checks examples/ manifests with line-anchored regexes, and json-loads template package.json files.
Verified: Validate run 44862913275 on main passed with all of these steps. On its first run the new luac step found that every example manifest used
lua54 true, which is invalid Lua (fixed under #44).