fix: config set support object value - #1123
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds JSON input support to the ChangesConfig JSON parsing feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
openspec config set workflows '["propose","explore","new","continue","apply","ff","sync","archive","bulk-archive","verify","onboard"]' Error: Invalid configuration - workflows: Invalid input: expected array, received string |
alfred-openspec
left a comment
There was a problem hiding this comment.
This is the right UX direction, but it needs the command metadata and tests before merge. config set --json is not added to src/core/completions/command-registry.ts, so completions/metadata will miss the new flag, and this config-writing path should have focused tests for JSON arrays/objects, invalid JSON, --string conflict, validation failure, output formatting, and no mutation on error.
c77a7a0 to
57d5e1f
Compare
|
Ok! Addressed both in the latest push:
|
alfred-openspec
left a comment
There was a problem hiding this comment.
Thanks for the follow-up. The latest version adds the missing config-set metadata and focused regression coverage for arrays/objects, invalid JSON, --string conflicts, validation failures, output formatting, and no-write-on-error. I also re-ran the focused config test set locally: 95 tests passed. Looks good to me.
|
Closing this as superseded for now. The original structured config value problem has landed in #1244, which auto-parses JSON-looking arrays/objects and fixes If you want to continue this direction, please reopen or open a fresh small PR rebased on Thanks for the careful test coverage here; it made the remaining value of the PR easy to understand. |
Summary by CodeRabbit
Release Notes
New Features
--jsonflag to config set command for parsing JSON input (arrays/objects).--stringand--jsonflags simultaneously.Tests