fix(slides): bind lint issues to source XML nodes - #2179
Conversation
|
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:
📝 WalkthroughWalkthroughThe XML linter now preserves source IDs, XML paths, and per-kind indexes. Diagnostics and normalized issues use stable source references. The pipeline reports duplicate non-empty IDs. Tests and checklist documentation cover the new metadata. ChangesXML Reference-Aware Linting
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant PresentationPipeline
participant XMLLinter
participant IssueNormalizer
PresentationPipeline->>XMLLinter: slide XML and slide number
XMLLinter->>XMLLinter: extract paths, IDs, indexes, and diagnostics
XMLLinter->>IssueNormalizer: raw issues and reference maps
IssueNormalizer-->>PresentationPipeline: normalized issues with XML path metadata
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@a4449556e84318b275b483715ffb4ba437cd2851🧩 Skill updatenpx skills add larksuite/cli#fix/slides-lint-xml-path -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2179 +/- ##
==========================================
+ Coverage 75.70% 75.89% +0.18%
==========================================
Files 944 962 +18
Lines 100288 102085 +1797
==========================================
+ Hits 75926 77480 +1554
- Misses 18565 18720 +155
- Partials 5797 5885 +88 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@skills/lark-slides/references/validation-checklist.md`:
- Line 50: Update the validation checklist to add a handling row for blocking
duplicate_element_id errors, including the required remediation steps. Revise
the sparse-container location guidance so operators use
related_objects[].xml_path whenever an object ID is missing or ambiguous, rather
than relying on ID lookup alone.
In `@skills/lark-slides/scripts/xml_text_overlap_lint.py`:
- Around line 2462-2468: Update the measurement-mapping function around the
bbox_overlap handling to detect horizontal or vertical line crossings before
generic intersection-area normalization. When line_crosses_text() identifies a
crossing, emit a nonzero segment-crossing measurement and its matching rule so
consumers cannot treat intersection_area: 0 as resolved; add regression
assertions for both horizontal and vertical crossings.
- Around line 2254-2259: Update the anonymous sparse-container message
construction near element_ref(container) to use element_label(container), or
fall back to container_xml_path when source_element_id(container) is absent, so
normalized messages retain the stable XML locator instead of emitting an unknown
container label.
🪄 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 Plus
Run ID: 0a1f9358-73bc-4df4-9ab3-981dfdd87854
📒 Files selected for processing (3)
skills/lark-slides/references/validation-checklist.mdskills/lark-slides/scripts/xml_text_overlap_lint.pyskills/lark-slides/scripts/xml_text_overlap_lint_test.py
fangshuyu-768
left a comment
There was a problem hiding this comment.
Reviewed the latest head. The previously reported duplicate-ID coverage issues are addressed, targeted lint tests pass, and CI is green.
Summary
xml_pathinstead of user-provided IDs.duplicate_element_iderrors for duplicate IDs.Validation
196/196Slides lint Python tests passed.GOTOOLCHAIN=go1.23.0 make unit-testpassed.Summary by CodeRabbit
Bug Fixes
Documentation