feat(config): engine defaults as YAML source of truth + ctld-tools (CTLD-TOOLS-CONFIG)#46
Merged
Merged
Conversation
Implements CTLD-TOOLS-CONFIG (ADR 0009): move CTLD_config.lua's inline defaults into src/CTLD_config.yaml (single source of truth, sectioned mm_facing/advanced), generated back into a committed src/CTLD_config_defaults.lua that CTLDConfig:load() copies into settings. New isolated poetry package tools/ctld-tools (typer, ruamel, lupa, pytest + ruff + mypy — VMCT stack) with extract + gen-config commands. Parity guarded (yaml -> lua -> settings == frozen reference, with a distinctive translator proving the ctld.tr wrappers) + drift check; new python-quality CI job. Generated Lua merged after CTLD_i18n_* (it calls ctld.tr at load time). No in-game behaviour change.
There was a problem hiding this comment.
Sorry @davidp57, your pull request is larger than the review limit of 150000 diff characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the CTLD-TOOLS-CONFIG lot (lot 2 of the ctld-tools program, ADR 0009).
What
CTLD_config.lua's inline block intosrc/CTLD_config.yaml(single source of truth, sectionedmm_facing/advanced). A committedgenerated
src/CTLD_config_defaults.luadefinesctld.__configDefaults, whichCTLDConfig:load()copies into settings. The
TEMPLATESblock and user-YAML merge are untouched. No in-game change.ctld-toolspackage — isolated poetry sub-projecttools/ctld-tools/, following the VMCTPython stack (typer, ruamel.yaml, lupa, pytest + ruff + mypy). Commands:
extract(one-shotLua→YAML) and
gen-config(YAML→Lua, re-emittingctld.tr()on desc/name — the only i18n fields).CTLD_i18n_*(it callsctld.trat loadtime); committed, not build-generated (VEAF pattern — the Windows build stays pure PowerShell).
Validation
yaml → gen-config → lua → settings == original, including everyctld.trwrapper (47/47). Plus a drift check(committed generated Lua == fresh
gen-config).CTLD.luarebuilt; Python quality gate green locally (ruff + mypy + pytest, 10 passed).CI
python-qualityworkflow (ruff check + format + mypy + pytest). Existinglua-lint/busted/ build jobs cover the Lua side (generated file is Lua-5.1 clean, ≤63-char lines).Notes
build-generated; single package; merge-after-i18n).
FEAT-USERCONFIG-API(merged). Lot 3 (CTLD-TOOLS-USERCONFIG) builds the MM volet on top.