Skip to content

feat: preserve unknown config keys and enforce list-replace merge semantics - #165

Closed
soorya-u wants to merge 2 commits into
mainfrom
feature/config-merge-replace-lists
Closed

soorya-u wants to merge 2 commits into
mainfrom
feature/config-merge-replace-lists

Conversation

@soorya-u

Copy link
Copy Markdown
Owner

Summary

  • Capture unrecognized TOML keys in config.toml / local.config.toml via #[serde(flatten)] extra field, preserving them through parse → serialize round-trips
  • Merge unknown keys during config layering with shallow union (local overrides global)
  • Document and verify whole-list replacement semantics for features and targets fields
  • Refactor GlobalConfig, LocalConfig, and AppConfig in src/core/config/ to carry the extra map

Testing

  • Unit tests for unknown string, table, and array keys surviving round-trip in GlobalConfig
  • Unit tests for extra key merging: global-only, local-only, local-wins-on-collision
  • Unit tests for list replacement: local features replaces global, local targets replaces global, omitted local falls back to global
  • mise check (cargo fmt + clippy) and mise tests (cargo test) both passing

soorya-u added 2 commits May 30, 2026 18:07
- Add `extra: HashMap<String, toml::Value>` with serde(flatten) to GlobalConfig, LocalConfig, and AppConfig for round-trip of unknown TOML keys
- Merge extra maps with shallow union (local wins) during config layering
- Document and test whole-list replacement semantics for features and targets
- Add unit tests for unknown key preservation and list merge behavior
- Moves openspec change to archive/2026-05-30-config-merge-replace-lists
- Adds config-preserve-unknown-keys spec: unknown TOML keys survive round-trip and shallow-merge
- Updates deploy-pipeline spec: list-typed fields use whole-list replacement
@vercel

vercel Bot commented May 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dotagents Ready Ready Preview, Comment May 30, 2026 12:41pm

@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@soorya-u, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 54 minutes and 32 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 58b951d2-8418-457e-8c46-d3bf0dab57f8

📥 Commits

Reviewing files that changed from the base of the PR and between 05c9f6c and f3a93c6.

📒 Files selected for processing (12)
  • openspec/changes/archive/2026-05-30-config-merge-replace-lists/.openspec.yaml
  • openspec/changes/archive/2026-05-30-config-merge-replace-lists/design.md
  • openspec/changes/archive/2026-05-30-config-merge-replace-lists/proposal.md
  • openspec/changes/archive/2026-05-30-config-merge-replace-lists/specs/config-preserve-unknown-keys/spec.md
  • openspec/changes/archive/2026-05-30-config-merge-replace-lists/specs/deploy-pipeline/spec.md
  • openspec/changes/archive/2026-05-30-config-merge-replace-lists/tasks.md
  • openspec/specs/config-preserve-unknown-keys/spec.md
  • openspec/specs/deploy-pipeline/spec.md
  • src/core/config/app.rs
  • src/core/config/global.rs
  • src/core/config/local.rs
  • src/templates/remote.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/config-merge-replace-lists

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 and usage tips.

@soorya-u

Copy link
Copy Markdown
Owner Author

incorrecty implementation

This branch was successfully deployed

1 active deployment
Preview — f3a93c69 Deployed May 30, 2026 by vercel[bot]
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.

1 participant