feat(variants): auto-sync NEW mother option keys into variant jsons and report them (row 246)

Standing rule: when the mother config.xml gains option keys that a variant json
does not list yet, build.php adds them to the json as "" (inherit the mother
default, skipped at apply time) and prints 'NOTE: N NEW option key(s) ... review
them: ...'. Existing keys/values and legacy keys are never touched; options are
rewritten in mother-config order. Runs on every build (single and build_all), so
new settable keys are always surfaced to the user.

README rebuild section and AGENTS.md document the rule.

Verified in a /tmp sandbox: added a fake option to the mother config, built a
json missing it -> key added as "" with the NOTE, existing values (#123456)
and legacy key (logotopmargin) preserved; second run reports 0 new keys.
php -l clean; export_public.sh exit 0.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-30 12:49:58 +01:00
commit 1e6b1ffcf8

View file

@ -450,9 +450,12 @@ the variant's `preview.png` is identical to the mother's.
set `PHP_BIN=/path/to/php` if `php` is not on PATH.) Both modes call
`build.php` per picked-up variant, print a summary
(`N built, M failed, K not picked up`) and exit non-zero if any variant
fails (unknown option keys fail loudly — the drift check). Then, per
(re)built variant: reset the theme in the LimeSurvey admin (Theme options →
Reset), flush assets, Ctrl+F5. `build.php` enforces the per-variant rules itself:
fails (unknown option keys fail loudly — the drift check). NEW option keys in
the mother `config.xml` are automatically added to each variant json as `""`
(inherit) and reported with a `NOTE: N NEW option key(s) ...` line, so every
new settable key is surfaced to you — review those keys in the json.
Then, per (re)built variant: reset the theme in the LimeSurvey admin
(Theme options → Reset), flush assets, Ctrl+F5. `build.php` enforces the per-variant rules itself:
`files/preview.svg` is only added at first creation and never overwritten,
and it warns when a variant's `preview.png` is identical to the mother's.
Never edit the generated `../<client>/` folder by hand — every build