BMAD-METHOD/tools/installer/modules
Brian Madison 8ab1de8501 fix(installer): forward-compat --set keys survive quick-update reinstalls
Found via end-to-end smoke test, not flagged by either bot review:
`--set bmm.future_thing=x` was persisted to config.toml on install #1
but silently dropped on the next quick-update reinstall, even though
the per-module _bmad/bmm/config.yaml retained it. The central
manifest's schema-strict partition stripped it because
collectModuleConfigQuick (the quick-update helper) never populated
setOverrideKeys for carried-forward unknown keys, and quickUpdate's
installConfig didn't thread setOverrideKeys into the install call.

This is the same bug class as the round-1 fix to collectModuleConfig
(CodeRabbit major #3155145084) but for the quick-update code path,
which has a separate collection helper.

Fix:
- Add OfficialModules._trackUnknownKeysAsOverrides(moduleName, schema)
  helper that walks collectedConfig[moduleName] and adds any non-schema
  key to setOverrideKeys[moduleName]. Without a schema, every key is
  treated as unknown (safe fallback for modules with no module.yaml).
- Call it from all four return paths in collectModuleConfigQuick:
  no-schema, parse-failed, hasNoConfig+subheader, silent+no-new-keys,
  and the regular end-of-method.
- Mirror ui.collectModuleConfigs's setOverrideKeys conversion in
  installer.quickUpdate so the Set→array round-trip lands in
  Config.build, and writeCentralConfig sees the exemption list.

Tests: +4 cases — collectModuleConfigQuick carry-forward of unknown
key, declared-key non-tracking under quick-update, and
_trackUnknownKeysAsOverrides no-schema fallback. Total 351 passing.

E2E smoke verified: --set <unknown>=x survives install→quick-update,
install→regular-update, and install→quick-update→regular-update with
a new --set added.
2026-04-28 19:22:34 -05:00
..
channel-plan.js feat(installer): channel-based version resolution + interactive channel management (#2305) 2026-04-24 08:20:30 -05:00
channel-resolver.js feat(installer): channel-based version resolution + interactive channel management (#2305) 2026-04-24 08:20:30 -05:00
community-manager.js fix(installer): route community installs through PluginResolver when marketplace.json ships (#2331) 2026-04-26 22:50:47 -05:00
custom-module-manager.js fix: use full update path when --custom-source is passed with --yes (#2336) 2026-04-27 20:49:21 -05:00
external-manager.js feat(installer): channel-based version resolution + interactive channel management (#2305) 2026-04-24 08:20:30 -05:00
official-modules.js fix(installer): forward-compat --set keys survive quick-update reinstalls 2026-04-28 19:22:34 -05:00
plugin-resolver.js fix(installer): replace fs-extra with native node:fs to prevent file loss 2026-04-13 00:44:28 -05:00
registry-client.js feat(installer): use GitHub API as primary fetch with raw CDN fallback (#2248) 2026-04-18 08:53:23 -07:00
registry-fallback.yaml feat(installer): channel-based version resolution + interactive channel management (#2305) 2026-04-24 08:20:30 -05:00
version-resolver.js fix: bmad tea instal version (#2298) 2026-04-22 11:03:20 -05:00