Skip to content

fix(structural): preserve parser failure blob provenance - #74

Merged
nia-sg-bot merged 1 commit into
mainfrom
nia/issue-22-parse-warning-provenance
Oct 1, 2026
Merged

nia-sg-bot merged 1 commit into
mainfrom
nia/issue-22-parse-warning-provenance

Conversation

@nia-sg-bot

@nia-sg-bot nia-sg-bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • include the immutable pre/post blob ID in every Tree-sitter PARSE_FAILURE warning
  • retain the exact post-change parser-failure golden fixture and cover a fixed pre-change syntax error
  • keep parser dependency failures reproducible against the staged blob identity

Validation

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

Part of #22

Remaining work: expand deterministic Tree-sitter coverage beyond this parser-failure provenance slice.

Summary by CodeRabbit

  • Bug Fixes
    • Parse failure reports now identify whether the error came from the pre-change or post-change snapshot and include the relevant blob ID and error details.
    • Added regression coverage for syntax errors in committed snapshots, even when the worktree has been repaired.

@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 Oct 1, 2026
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: 83908fde-b2e7-4dd6-906f-85a4ffdadebe

📥 Commits

Reviewing files that changed from the base of the PR and between 864a3de and 7a27788.

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

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


Walkthrough

Parse failure warnings now identify whether the failure occurred in the pre- or post-change snapshot and include that snapshot’s blob object ID. Tests cover a committed syntax error and updated post-change parser dependency warning details.

Changes

Parse Failure Details

Layer / File(s) Summary
Format and verify parse failure warnings
diffgraph/structural.py, tests/test_structural.py, tests/fixtures/python_parser_failure.json
A shared helper formats warnings with the snapshot side, blob object ID or absent, exception type, and error detail. Both parse failure branches use the helper and retain skip-and-continue handling. Tests check the pre-change syntax error and post-change parser dependency warning details.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 7a277

Parse-failure warnings now identify the affected snapshot, and file-skipping behavior is unchanged. No concrete merge-blocking risk remains.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to 7a277

The change adds precise source-version information to parser warnings without changing what is read, how parsing failures are handled, or who can invoke analysis. The same blob identifiers were already included in analysis output. No material security risk was found in the changed behavior.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed exposure is diagnostic text delivered to existing analysis-output consumers. The production diff introduces no additional repository reads, parser calls, or authority-bearing operation.

Trust Boundaries and Controls

  • observed — The routed public-entrypoint ranges exercise analyze_local_diff from tests. The reviewed production change leaves its interface and parsing controls unchanged; it only enriches warnings after an existing parser failure.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 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 and concisely identifies the main change: preserving parser failure blob provenance in structural analysis.
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 62.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 1, 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 9e56a8f into main Oct 1, 2026
4 checks passed
@nia-sg-bot
nia-sg-bot deleted the nia/issue-22-parse-warning-provenance branch October 1, 2026 08:01
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