fix(loomgen): reject #loom.pattern and #loom.line_pattern coexistence#704
Conversation
|
Warning Review limit reached
Next review available in: 44 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR excludes ChangesDocumentation scan exclusions
Lexer annotation validation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
🚥 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 |
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 `@check-docs.sh`:
- Line 130: Update all three path predicates in check-docs.sh, including the
checks around the current .worktrees exclusions, to use the component-aware
*/.worktrees/* pattern. Ensure both repository-root and nested .worktrees
directories are excluded consistently.
In `@scripts/check-docs-symbols.py`:
- Around line 22-23: Update the path filtering used by should_scan_doc to reject
any path containing “.worktrees” as a complete path component, including nested
paths such as docs/.worktrees/example.md. Preserve the existing root-level
exclusion while aligning the check with the shell-based component-aware
behavior.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: c84f87ca-fe43-4155-95cf-e2f508c426c2
📒 Files selected for processing (5)
check-docs.shdocs/README.mdloomgen/emit_lexer_wbtest.mbtloomgen/parse_annotations.mbtscripts/check-docs-symbols.py
f44e6b7 to
00310e3
Compare
Problem
A token variant could carry both
#loom.patternand#loom.line_pattern, silently ignoring the character-level pattern (issue #702).Changes
parse_annotations(592795d) — rejects a token variant with both annotations before unrelated role checks, with a diagnostic explaining that one token cannot be produced by both character-level and line-mode lexers.error+line_patternandident+line_patternrejection branches that previously had no direct coverage.nth_string_from_applywith@list.List::nth.check-docs.shandcheck-docs-symbols.pynow exclude nested.worktrees/directories that caused false-positive failures. Added the missing plan link todocs/README.md.Verification
moon check --target native: passedmoon info: no API driftmoon fmt: passedcheck-deps.sh: passedcheck-docs.sh: all checks passedgit diff --check: cleanCloses #702
Summary by CodeRabbit
Bug Fixes
Documentation
Tests