Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthrough
ChangesRequirement content cleanup
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The parser preserves internal dividers and removes trailing separators as intended, with regression coverage and no merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
Summary
Fixes an issue in
cleanRequirementContentwhere internal markdown dividers/horizontal rules (---) within a requirement block were inadvertently stripped instead of the trailing boundary delimiter.Problem
In
lib/openspec-deltas.ts:31,cleanRequirementContentuses:Because the regular expression uses the multiline flag
/mwithout the global flag/gand is not anchored to the end of the entire string,replace()matches the first line that ends with---.If a requirement body contains an internal separator—such as a markdown thematic break, table divider, or YAML code block—
replace()removes that internal divider and leaves the trailing---delimiter at the bottom of the section, corrupting the requirement content.Solution
---lines remain untouched, and only the trailing delimiter separator at the end of the requirement block is stripped.tests/openspec-deltas.test.tsto verify that internal markdown horizontal rules are preserved while trailing delimiters are stripped.Testing
node --experimental-strip-types --test tests/openspec-deltas.test.tspasses with all 9 tests green.Summary by CodeRabbit
Bug Fixes
Tests