feat(desktop): make diagnostics packages agent-readable JSON#1475
feat(desktop): make diagnostics packages agent-readable JSON#1475Astro-Han wants to merge 2 commits into
Conversation
|
Warning Review limit reached
More reviews will be available in 32 minutes and 21 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 rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
✨ 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 |
There was a problem hiding this comment.
Suggested priority: P2 (includes user-path files (packages/app/src/components/diagnostics-review.test.tsx, packages/desktop-electron/src/main/feedback.test.ts, packages/desktop-electron/src/main/feedback.ts, packages/desktop-electron/src/main/problem-report-files.test.ts, packages/desktop-electron/src/main/problem-report-files.ts, packages/desktop-electron/src/main/problem-report-redact.test.ts, packages/desktop-electron/src/main/problem-report.test.ts, packages/desktop-electron/src/main/problem-report.ts)).
P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.
Summary
Replaces the saved diagnostics package body with pure, pretty JSON instead of a Markdown wrapper. The JSON now uses stable top-level sections for
meta,environment,error,recentErrors,session,rendererDiagnostics, andlogTail, withlogTailsaved as an array of lines.Also switches newly saved report files from
.mdto.json, bumps the report contract tometa.reportVersion: 2, updates cleanup/file-writing expectations, and moves the smoke test assertions from Markdown-string checks to JSON payload checks.Why
Part of PR4 for the diagnostics package rebuild: make the package easier for agents and support tooling to read directly, without first stripping prose or fenced code blocks.
Related Issue
Part of #1465.
Human Review Status
Pending
Review Focus
Please focus on the JSON contract shape, especially the stable top-level keys,
meta.reportVersion: 2,meta.truncation,error: null | object, andlogTail: string[].Also worth checking: this intentionally drops legacy Markdown parser compatibility for full reports, following the product decision for PR4. Legacy
.mdreport files are only kept in the cleanup matcher so old local diagnostics packages still age out.Risk Notes
Legacy
.mddiagnostics reports are no longer parsed by the local parser and new reports are always generated as.json. Cleanup still recognizes legacypawwork-problem-report-*.mdfiles so existing local support packages do not fall out of retention. Saved reports are local support artifacts, so there is no data migration.Visible UI checklist left unticked: no layout or user-facing copy changed. The generated filename extension shown in the review flow changes from
.mdto.jsonand is covered by focused tests and smoke.How To Verify
Screenshots or Recordings
Not applicable. No visual UI layout change.
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.