[ BOUNTY] Add diagnostic metadata diff tool (#5)#9
Conversation
- New tools/diagnostic_diff.py compares two build diagnostic JSON files - Reports changes in commit, module count, pass/fail counts, and per-module status/output - Detects added, removed, and modified modules - Supports --json and --summary output modes - 8 tests covering field changes, module status changes, added/removed modules, identical diagnostics, and text rendering
|
Warning Review limit reached
More reviews will be available in 42 minutes and 53 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 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 |
Summary
Add
tools/diagnostic_diff.py— a diagnostic metadata diff tool that compares two build diagnostic JSON files and reports differences in module status, pass/fail counts, build metadata, and per-module output.Changes
tools/diagnostic_diff.py(new file):diff_diagnostics(baseline, current)— compares commit, total_modules, passed, failed, chunked, and per-module status/elapsed/artifact/outputrender_text()produces Markdown table output--jsonflag for machine-readable output--summaryflag for summary-only outputtests/test_diagnostic_diff.py(new file):test_diff_detects_changed_fields— verifies commit, passed, failed changestest_diff_detects_module_status_change— verifies module status FAIL->PASS detectiontest_diff_identical_diagnostics_no_changes— verifies zero changes for identical inputstest_diff_detects_added_module— verifies new module detectiontest_diff_detects_removed_module— verifies removed module detectiontest_render_text_produces_markdown— verifies Markdown output formattest_render_text_identical— verifies "No differences detected" messagetest_load_diagnostic_file_not_found— verifies FileNotFoundError on missing fileTesting
Result:
Build diagnostic:
diagnostic/build-94ad8d29.jsonChecklist
Closes #5