Repository navigation
feat: suggest candidate compiled lines when an enable line drifts from the edited file - #2279
Conversation
…m the edited file Line-drift warnings already showed compiled vs edited text at the resolved line, but not where that edited statement lives in the last compiled source, so testers had to recompute line numbers by hand. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe change enriches compiled-line drift warnings with matching compiled source line numbers. It centralizes source splitting, loads verified snapshot source once, limits matches to three, and adds coverage for matching and non-matching cases. ChangesCompiled-line drift warning enrichment
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change is localized to improving drift-warning guidance, and no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant PausePointUseCase
participant VerifiedSnapshotProvider
participant SourcePausePointSourceLineReader
participant PausePointEnableWarnings
PausePointUseCase->>VerifiedSnapshotProvider: Load verified snapshot source
VerifiedSnapshotProvider-->>PausePointUseCase: Return compiled source
PausePointUseCase->>SourcePausePointSourceLineReader: Split source into lines
SourcePausePointSourceLineReader-->>PausePointUseCase: Return compiled lines
PausePointUseCase->>PausePointEnableWarnings: Build enriched drift warning
PausePointEnableWarnings-->>PausePointUseCase: Return warning with candidate lines
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
…suffix
The new candidate tests assembled expected text from the production format constants, so clearing {0} still passed. The truncation suffix also hard-coded 3 beside CompiledLineDriftCandidateMatchLimit.
Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
--linefrom an edited file lands on a different statement in the last compiled source (hot-reload line drift), the enable warning now lists up to 3 candidate compiled line numbers whose text matches the edited statement.User Impact
--lineby hand.ResolvedLineText.Changes
Verification
dist/darwin-arm64/uloop compile --project-path "$(git rev-parse --show-toplevel)"→ ErrorCount 0dist/darwin-arm64/uloop run-tests --test-mode EditMode --filter-type regex --filter-value "PausePointCompiledLineMapWarningTests"→ 29 passed, 0 failedCODE_COMPLEXITY_FAIL_ON_EXCEEDED=true scripts/check-code-complexity.sh→ no CA1502 findings above 15