Repository navigation
Conversation
Couple adjacent non-whitespace tokens to the following inline code span. A wrap boundary would become a space when the formatter rereads the paragraph, so preserve that syntax seam as an atomic unit. Retain whitespace as a break opportunity and cover the reported mask-71 real-CLI fixed point.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (8)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
💤 Files with no reviewable changes (3)
Included review availability: 2 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour. SummaryKeep any unspaced, non-whitespace token immediately before inline code in the same wrapping group as the code. Preserve whitespace before inline code as a wrapping opportunity. Remove the superseded Add regression tests for fixed-point formatting at an unspaced emphasis-to-code boundary and for independently wrapping spaced code. These changes support the wrapping and idempotence approaches documented in ADR 0002 and ADR 0006. WalkthroughInline wrapping now groups an unspaced non-whitespace token run with a following inline code span. The hyphen-prefix predicate was removed. Tests and both guides were updated to cover or describe the revised rule. ChangesInline Code Wrapping
Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to This change keeps unspaced text/code runs together, even when they exceed the target width, while preserving whitespace breaks. That behavior is documented, and no merge-blocking risk is established. 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
Full details: Testing (Property / Proof)Explanation The change introduces a range invariant: every non-whitespace token immediately before an inline code token must remain in the same atomic span, while whitespace must remain breakable. The PR adds only a deterministic Resolution Add a Rust A token meets code without a space Comment |
Reviewer's GuideThe formatter now groups any non-whitespace token immediately preceding an inline code span into one atomic wrapping unit, preventing reread-induced spaces while preserving breaks at whitespace. The former hyphen-specific predicate and tests were removed, with fixed-point and non-overcoupling regressions added and the user/developer documentation updated. Flow diagram for atomic inline code seam groupingflowchart TD
A[determine_token_span] --> B[initial_token_span]
B --> C{is_whitespace_token}
C -->|yes| D[Keep whitespace as a break opportunity]
C -->|no| E{is_code_token}
E -->|yes| F[Group adjacent tokens as one atomic span]
E -->|no| G[Keep the general span behavior]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47296f88b6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // next pass joins the paragraph. Keep the complete unspaced run atomic. | ||
| if kind == SpanKind::General | ||
| && ends_with_hyphen_prefix(&tokens[start]) | ||
| && !is_whitespace_token(&tokens[start]) |
There was a problem hiding this comment.
Document the generalized coupling in architecture
Update docs/architecture.md alongside this generalized guard: its “Inline code punctuation handling” section still describes grouping as deliberately narrow and says the coupling rule only attaches trailing punctuation, while this change now groups every unspaced preceding token with inline code. Leaving the architecture document stale makes the repository’s stated design contradict the implemented wrapping contract; record the leading-seam rule there, and assess whether the broadened policy warrants an ADR.
AGENTS.md reference: AGENTS.md:L44-L51
Useful? React with 👍 / 👎.
|
@coderabbitai review |
✅ Action performedReview finished.
|
Scope
The wrapper now keeps an unspaced, non-whitespace token immediately followed by
an inline code span in one atomic group. A wrap boundary inside that seam would
become a space when the paragraph is read on the next formatting pass.
Whitespace remains a break opportunity.
The change generalizes the former hyphen-prefix special case in
initial_token_span,removes the superseded predicate and records the wrapping contract in the user
and developer guides.
Stack
0b90b6919466df60cf49d9e402b16c497d752db0.The supervisor will restack descendants Use safe text-processing access in tests #543 and Use checked frontmatter boundaries #544.
Review entry point
src/wrap/inline/mod.rs.real-CLI fixed-point regression.
proves that spaced code remains independently wrappable.
Validation
make check-fmtmake lintmake testmake typecheckmake markdownlintmake nixiemake verusmake verus-selftestKnown blockers
No local blockers. Hosted CI and automated review are pending.
Summary by Sourcery
Preserve unspaced inline code seams during wrapping without removing whitespace break opportunities.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
References