Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (4)
Summary
WalkthroughFence normalisation now routes delimiter rewriting through a shared ChangesFence normalisation
Sequence Diagram(s)sequenceDiagram
participant ParsedLine
participant rewrite_fence_line
participant rewrite_marker
ParsedLine->>rewrite_marker: Cache Compress rewrite
rewrite_fence_line->>rewrite_marker: Compute Preserve rewrite
rewrite_marker-->>rewrite_fence_line: Return rewritten fence line
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 20✅ Passed checks (20 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/developers-guide.md`:
- Around line 610-612: Update the rewrite_fence_line documentation to state that
flush_matched_block performs matched-block selection, while rewrite_fence_line
only dispatches on Strategy and falls back to the original line.
In `@tests/fences.rs`:
- Around line 18-33: Add committed Insta snapshot fixtures under
tests/snapshots/ for the three cases exercised by fence_normalization_snapshots:
fences_compress_overlong_backticks, fences_compress_tilde_fences, and
fences_preserve_interior_conflict. Use the accepted generated snapshot contents
so the tests pass without leaving .snap.new files.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: af5dad99-f083-4b18-b092-0e673964fbc3
⛔ Files ignored due to path filters (3)
tests/snapshots/fences_compress_overlong_backticks.snapis excluded by!**/*.snaptests/snapshots/fences_compress_tilde_fences.snapis excluded by!**/*.snaptests/snapshots/fences_preserve_interior_conflict.snapis excluded by!**/*.snap
📒 Files selected for processing (4)
docs/developers-guide.mdsrc/fences.rssrc/fences_properties.rstests/fences.rs
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/fences_properties.rs`:
- Around line 18-19: Update the property-test input generator around the
language value strategy to include null and case-variant null values in addition
to existing strings. Extend the assertions for both rewrite strategies to verify
that each omits the language suffix when the language is null, ensuring
rewrite_marker’s absent-language branch is exercised.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 528db9d8-5a78-4e69-b293-4d17aaa8397a
⛔ Files ignored due to path filters (3)
tests/snapshots/fences_compress_overlong_backticks.snapis excluded by!**/*.snaptests/snapshots/fences_compress_tilde_fences.snapis excluded by!**/*.snaptests/snapshots/fences_preserve_interior_conflict.snapis excluded by!**/*.snap
📒 Files selected for processing (4)
docs/developers-guide.mdsrc/fences.rssrc/fences_properties.rstests/fences.rs
Use one private `Strategy` enum for all fence-marker rewriting and retain matched-block preservation in `rewrite_fence_line`. Add generated strategy invariants, output snapshots, and developer guidance to lock the normalized fence behaviour.
Exercise both strategy rewrites for null language variants and verify the conflicting matched-block preserve path drops the absent language suffix. Clarify that matched-block selection belongs to `flush_matched_block`.
Reapply imports dropped while replaying the fence refactor so its snapshot and rstest coverage compile after the rebase.\n\nKeep the formatter's removal of an adjacent extra blank line.
89ad03c to
f89aae9
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
Describe the cached rewrite accurately: it avoids repeated compression work and supports unmatched-block handling, while preserved markers are rebuilt on demand.
|
@coderabbitai Have the following now been resolved? src/fences.rs (1)
avoids repeated work only for compressed output and unmatched-block handling. 🤖 Detailed instructionsVerify each finding against current code. Fix only still-valid issues, skip the In |
|
@coderabbitai resume |
✅ Action performedReviews resumed. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
ast-grep outline src/fences.rs --items all --view expanded
printf '\n--- src/fences.rs Lines 75–180 ---\n'
sed -n '75,180p' src/fences.rs
printf '\n--- PR diff for src/fences.rs ---\n'
git diff "$(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main)"...HEAD -- src/fences.rs 2>/dev/null || trueLength of output: 10781
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
This branch replaces the duplicate fence rewrite enums with one private
Strategyenum, so every fence-marker rewrite uses a single, consistentbinary choice.
Closes #360.
It adds generated strategy invariants, representative normalization snapshots,
and developer guidance. The Kani harness is intentionally omitted because the
project has neither a Kani dev-dependency nor harness infrastructure; the
finite strategy states are covered across bounded marker lengths by proptest.
Review walkthrough
Validation
make check-fmt: passedmake typecheck: passedmake lint: passedmake test: passedmake markdownlint: passedmake nixie: passedmbake validate Makefile: passedmake all: passedcoderabbit review --agent: zero findingsReferences