Skip to content

fix(structural): preserve artifacts when parser dependencies are unavailable - #35

Merged
nia-sg-bot merged 1 commit into
mainfrom
nia/issue-22-parser-dependency-warning
Aug 26, 2026
Merged

fix(structural): preserve artifacts when parser dependencies are unavailable#35
nia-sg-bot merged 1 commit into
mainfrom
nia/issue-22-parser-dependency-warning

Conversation

@nia-sg-bot

@nia-sg-bot nia-sg-bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve the exact Git snapshot as a schema-valid local artifact when the optional Tree-sitter parser dependency is unavailable
  • report the parser installation failure as a file-scoped PARSE_FAILURE instead of aborting or fabricating structural changes
  • cover both the structural API and canonical CLI JSON output

Validation

  • python3 -m pytest tests/test_structural.py -q
  • python3 -m pytest -q
  • git diff --check

No schema or CLI contract fields changed; the VS Code extension remains compatible.

Part of #22

Summary by CodeRabbit

  • Bug Fixes
    • Structural parser dependency failures are now reported as parse warnings instead of stopping analysis.
    • Analysis can produce a valid artifact even when a file is skipped due to missing structural dependencies.
    • Command-line output now remains successful and includes details about affected files and parse failures.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c27650db-998d-4117-bcfa-bc785de85f9a

📥 Commits

Reviewing files that changed from the base of the PR and between b100c39 and 855170c.

📒 Files selected for processing (2)
  • diffgraph/structural.py
  • tests/test_structural.py

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


Walkthrough

The parser now catches StructuralDependencyError during Python parsing. Structural dependency failures produce PARSE_FAILURE warnings while artifact generation continues with no structural claims.

Changes

Structural parser error handling

Layer / File(s) Summary
Parse failure handling and validation
diffgraph/structural.py, tests/test_structural.py
StructuralDependencyError joins the parser exception handling. Tests verify scoped warnings, empty structural results, valid artifacts, and successful CLI JSON output.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 85517

This localized change preserves valid artifacts when an optional parser is unavailable and reports the failure without changing the schema or CLI contract; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files. 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 and concisely describes the main change: preserving artifacts when structural parser dependencies are unavailable.
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.
  • 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-dependency-warning

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 Aug 26, 2026
@nia-sg-bot

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 26, 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 0a8a0e4 into main Aug 26, 2026
4 checks passed
@nia-sg-bot
nia-sg-bot deleted the nia/issue-22-parser-dependency-warning branch August 26, 2026 14:02
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