Repository navigation
Edit a card that ends at its closing fence - #101
Conversation
One of the 389 failed: espnet/DCASE23.AudioCaptioning.PreTrained is front matter and nothing else, ending at --- with no newline after it. insert_snippet wrote the snippet straight onto that fence, so the metadata's own closing --- would have become the start of a line of body text and the whole front matter with it. The guard that compares the front matter before and after caught it - correctly, and then reported it as "front matter changed", which is not what a reader would go looking for. Two halves, because there were two bugs in one. The fence now grows the newline it needs, so the snippet starts on its own line and the card reads like every other one. And the guard compares the metadata rather than its trailing whitespace: that newline is punctuation between the front matter and the body, not a change to what the front matter says. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Tick the box to add this pull request to the merge queue (same as
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: espnet/espnet_model_zoo/.coderabbit.yaml Review profile: QUIET Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix 🚥 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #101 +/- ##
=======================================
Coverage 65.17% 65.17%
=======================================
Files 5 5
Lines 1160 1163 +3
=======================================
+ Hits 756 758 +2
- Misses 404 405 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
One of the 389 cards in #100's run failed:
The card is front matter and nothing else — 182 bytes ending at
---with nonewline after it. So
split_front_matterreturned a front matter that does notend in a newline, and
insert_snippetwrote the snippet straight onto it:which stops being a closing fence. The whole metadata block would have become
body text. The guard caught it, which is the guard doing its job; it then
reported "front matter changed", which is not what a reader would go looking
for.
Two bugs in one, so two halves:
insert_snippetgives the fence the newline it needs, so the snippet startson its own line and the card reads like every other one.
newline is punctuation between the front matter and the body, not a change to
what the front matter says.
Verified against the real card fetched from the Hub: the guard passes and the
output is
---\n\n## Usage. Two tests, one for each half, plus the idempotencecheck that a second run skips the card it has already edited.
The other 388 were unaffected: every other card ends its front matter with a
newline.
🤖 Generated with Claude Code