Skip to content

fix(installer): preserve existing core config (#2435) - #2583

Open
sanmaxdev wants to merge 2 commits into
bmad-code-org:mainfrom
sanmaxdev:fix/preserve-core-config-2435
Open

fix(installer): preserve existing core config (#2435)#2583
sanmaxdev wants to merge 2 commits into
bmad-code-org:mainfrom
sanmaxdev:fix/preserve-core-config-2435

Conversation

@sanmaxdev

Copy link
Copy Markdown

What

Preserve existing core configuration when an update supplies core command-line overrides. Add regression coverage for the update path.

Why

The existing configuration loader stores prior values separately, but the override merge read the new collection instead. As a result, values such as project_name were dropped.

Fixes #2435

How

  • Merge supplied overrides on top of the loaded core configuration
  • Cover preserved values and explicit replacements through the installer UI path

Testing

  • npm ci
  • npm run test:install
  • npm run quality

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 41ad53da-b727-4635-88f7-7ad151a812b0

📥 Commits

Reviewing files that changed from the base of the PR and between 8ea1b76 and 4ed9a3a.

📒 Files selected for processing (2)
  • test/test-installation-components.js
  • tools/installer/ui.js

📝 Walkthrough

Walkthrough

The installer now reads existing core settings from the configuration collector’s loaded state before applying CLI overrides. A new installation-component test verifies that unspecified values such as project_name remain intact while supplied values are replaced or added.

Changes

Core configuration preservation

Layer / File(s) Summary
Merge existing core configuration
tools/installer/ui.js, test/test-installation-components.js
collectModuleConfigs() uses the loaded existing core configuration when applying CLI overrides, and the new test verifies selective preservation, replacement, and temporary-install cleanup.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main fix: preserving existing core config during installer updates.
Description check ✅ Passed The description is directly related to the changes and explains the bug fix, rationale, and testing.
Linked Issues check ✅ Passed The code change and regression test address #2435 by preserving preexisting core values while applying CLI overrides.
Out of Scope Changes check ✅ Passed The PR only includes the targeted installer fix and a regression test, with no unrelated changes evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bmadcode

Copy link
Copy Markdown
Collaborator

Just saw this, thank you @sanmaxdev will review and merge after I get a chance to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] installer: project_name (and any non-CLI-flag core key) dropped on update when one or more core flags are passed

2 participants