Skip to content

feat(structural): locate parser failures in warnings - #50

Merged
nia-sg-bot merged 1 commit into
mainfrom
nia/issue-22-parser-diagnostic-location
Sep 9, 2026
Merged

feat(structural): locate parser failures in warnings#50
nia-sg-bot merged 1 commit into
mainfrom
nia/issue-22-parser-diagnostic-location

Conversation

@nia-sg-bot

@nia-sg-bot nia-sg-bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • report the first Tree-sitter syntax-error location in deterministic PARSE_FAILURE warnings
  • retain the existing scoped-warning/no-topology behavior when parsing fails
  • update the parser-failure golden fixture with the stable line and column diagnostic

Validation

  • python3 -m pytest (160 passed)
  • git diff --check

Compatibility

This only makes the existing string-valued warning detail more actionable. The schema, warning code, artifact topology, and v2 extension contract are unchanged.

Part of #22

Summary by CodeRabbit

  • Bug Fixes
    • Python syntax error messages now include the specific line and column where the issue was detected.
    • Error reporting is deterministic and more actionable when parsing fails.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 91cf23ed-e142-488f-9e99-5fd248f356fa

📥 Commits

Reviewing files that changed from the base of the PR and between 6389927 and 9fa70d0.

📒 Files selected for processing (2)
  • diffgraph/structural.py
  • tests/fixtures/python_parser_failure.json

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The Python parser now reports the first syntax error or missing node location. The parser failure fixture reflects the updated message with line and column details.

Changes

Python parser error reporting

Layer / File(s) Summary
Syntax error location reporting
diffgraph/structural.py, tests/fixtures/python_parser_failure.json
_syntax_error_detail finds the first parser error in source order. _parse_python uses the helper when raising ValueError. The fixture includes the reported line and column.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 9fa70

Python parse-failure warnings now include a deterministic line and column for the first syntax error, with the expected diagnostic captured in the parser-failure fixture. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding source locations to parser failure warnings.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nia/issue-22-parser-diagnostic-location

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nia-sg-bot nia-sg-bot added roadmap Tracked on the public WildestAI roadmap priority:P0 Critical path / blocks a usable product direction:aligned Aligned with the current WildestAI product direction labels Sep 9, 2026
@nia-sg-bot

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nia-sg-bot
nia-sg-bot merged commit 5aece97 into main Sep 9, 2026
4 checks passed
@nia-sg-bot
nia-sg-bot deleted the nia/issue-22-parser-diagnostic-location branch September 9, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

direction:aligned Aligned with the current WildestAI product direction priority:P0 Critical path / blocks a usable product roadmap Tracked on the public WildestAI roadmap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant