Low-priority duplication and dead code in templates, examples and tool modules
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- github-actions, lua, python, typescript
調査の方向性
Start with mcp-server/tools/txadmin.py, where each of the four tools builds its own TxAdminClient() inside a try/except block, and with mcp-server/tools/manifest_common.py (substitute_variables, which has no callers). Then check mcp-server/tools/scaffold.py for the duplicate FRAMEWORK_INIT_SERVER and FRAMEWORK_INIT_CLIENT dicts, and .github/workflows/validate.yml for the existing manifest check. Done means the txAdmin tools accept an injectable client, the dead helper and unused import are gone, and CI fails when template or example bridge blocks drift.
索引モデルが issue の本文から書いたものです。
説明
Summary
A collection of low-priority duplication and dead code: seven near-identical framework templates with no consistency check, a framework bridge copied into six example files, four txAdmin tools that repeat the same client/try/render block with no test seam, and unused or half-wired helpers in the manifest and scaffold modules.
Where
templates/{esx,qbcore,qbox,oxcore,vorp,rsg,standalone}/(manifests,client/main.lua,config.lua)templates/nui-vite/web/src/nui-bridge.ts,templates/nui-svelte/web/src/nui-bridge.ts,templates/nui-*/client/main.luaexamples/*/server/main.lua:1-15andexamples/*/client/main.lua:1-16(resolveFramework)mcp-server/tools/txadmin.py:15,:52-58,:80-88,:116-120,:165-174mcp-server/tools/manifest_common.py:47-51(substitute_variables),mcp-server/tools/scaffold.py:25-33(FRAMEWORK_INIT_SERVER)docs/ROADMAP.md:88
Details
- Framework templates. The seven framework manifests differ only in the games comment, description and dependency lines;
client/main.luadiffers only in the init and one player-data line; all sevenconfig.luafiles are byte-identical, as are the twonui-bridge.tsfiles. CI checks only that each manifest containsfx_version,gamesand'cerulean'. Drift has started in the games comments. - Example bridge. The first ~15 lines of three example server
main.luafiles are byte-identical (resolveFramework(), ESX and QB only, standalone fallback), and so are the first lines of three client files. Each example then hand-writes parallel ESX/QB helpers for money, inventory and notifications. - txAdmin seam. Each of the four tool functions constructs
TxAdminClient()inside its owntry/except TxAdminErrorblock, with no parameter or factory for a fake client. The "error key in result" check is repeated, andTxAdminConfigis imported but unused (txadmin.py:15). - Dead code.
substitute_variableshas no callers, whiledocs/ROADMAP.md:88marks templating as shipped.FRAMEWORK_INIT_SERVERis a verbatim copy ofFRAMEWORK_INIT_CLIENT.
Impact
Convention changes must be applied by hand to 7-9 template files or 6 example files with nothing flagging a missed copy, and those files are copy-paste targets for users. The destructive txAdmin tools cannot be unit-tested without monkeypatching the module.
Suggested fix
- Templates: keep them as plain copyable files, but add a CI check that shared parts are identical across framework templates after masking known per-framework lines, and that the
nui-bridge.tsfiles match. If the scaffold renders from templates, optionally generate the framework dirs from a registry and fail CI on drift. - Examples: keep them self-contained. Mark the bridge with
-- BEGIN framework-bridge/-- END framework-bridge, add a CI check that the marked blocks are identical, and put the canonical version insnippets/lua/framework-bridge.lua. - txAdmin: add
_call(method, path, *, body=None, query=None, client_factory=TxAdminClient)that returns the result or an error string, route the four tools through it, and drop the unused import. - Dead code: wire
substitute_variablesinto the scaffold or delete it and untick the roadmap item; collapse the two INIT dicts into one.
Acceptance criteria
- CI fails if shared template parts or the example bridge blocks drift.
- txAdmin tools accept an injectable client and share one call helper.
- No unused helper, duplicate dict, or unused import remains in the listed modules, and ROADMAP matches.
Getting started
- Relevant files:
templates/,examples/,mcp-server/tools/txadmin.py,mcp-server/tools/manifest_common.py,mcp-server/tools/scaffold.py,.github/workflows/validate.yml - 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:
examples/README.md,docs/ROADMAP.md
Filed by repo-audit/full-audit at 701824d. Severity: low. Effort: M. audit-key: tech-debt|templates/esx/fxmanifest.lua|duplication
- 主要言語
- Python
- スター
- 7
- フォーク
- 4
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TMHSDigital/CFX-Developer-Tools のほかの issue
-
help wanted severity: low tech-debt
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
TMHSDigital/CFX-Developer-Tools#79 ·
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted severity: low
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
TMHSDigital/CFX-Developer-Tools#68 ·
メンテナーはふだん 1 日以内に返信
-
dependencies severity: low
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
TMHSDigital/CFX-Developer-Tools#62 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement severity: medium
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
TMHSDigital/CFX-Developer-Tools#58 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement severity: medium
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
TMHSDigital/CFX-Developer-Tools#57 ·
メンテナーはふだん 1 日以内に返信
TMHSDigital/CFX-Developer-Tools の issue をすべて見る
似ている issue
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
llm translation
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
FAIRmat-NFDI/sand#239 ·
メンテナーはふだん 1 日以内に返信
-
bug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
coco-research/coco#539 ·
メンテナーはふだん 1 日以内に返信
-
dependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
JustBeanie/hass-volcano-hybrid#34 ·
メンテナーはふだん 1 日以内に返信