Parse config JSON containers (#1216)#1244
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)
📝 WalkthroughWalkthrough
ChangesJSON Container Coercion in coerceValue
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
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 |
• ## Issue Summary
#1216: openspec config set workflows '["new","ff","apply","archive"]' failed because the value stayed a string, while schema validation expects workflows to be an array. Impact: non-interactive custom
profile setup could leave users with profile: custom and no workflows.
Selected Fix
Selected #1216 and avoided #1222 / #1226 / #1242 as requested. This issue has a clear repro, a narrow root cause, and a controlled fix in config value coercion.
Root Cause
coerceValue only handled booleans and numbers, then returned everything else as a string. JSON array syntax for workflows was never parsed before schema validation.
Implementation
Commit
Commit: 9a4c437
Message: Parse config JSON containers (#1216)
Commit contains only source/test files and no OpenSpec files.
Summary
Fixed #1216 on local branch feature_0623_1 in D:\workspace\2016\开源\个人\OpenSpec. The repository already existed, so clone was skipped.
Previously, JSON array input for workflows was stored as a string and rejected by config schema validation.
This adds JSON container coercion so openspec config set workflows '["new","ff","apply","archive"]' stores an actual array.
Changes
Verification
Summary by CodeRabbit
Bug Fixes
Documentation
Tests
Summary by CodeRabbit