Skip to content

Add support for importing and tracking SARIFs in beads #1377

@johnml1135

Description

@johnml1135

Summary

Enhance beads_rust to support importing, deduplicating, storing, and exposing Language Server Protocol (LSP)-style diagnostics as a first-class record type. This will allow tracking of build failures, static analysis, and AI review feedback (e.g., from CodeRabbit) as actionable diagnostics, which can be promoted to issues as desired.

Motivation

  • Track and resolve code problems surfaced by compilers, linters, and AI tools directly inside beads_rust.
  • Allow diagnostics to be imported from CI/build logs, static analysis tools, and LSP-compatible sources.
  • Enable downstream tools or adapters (potentially an external LSP server or VS Code extension) to display and navigate issues stored by beads.

Proposed Approach

  • Add a new diagnostic record type with fields for path/URI, range, severity, source, message, etc.
  • CLI commands: br diag import, br diag list, br diag show, br diag promote (to create an issue from selected diagnostics)
  • Import formats: JSON, SARIF, and common compiler outputs (starting with Cargo's JSON messages)
  • Deduplication: Use normalized fields for stable fingerprinting. Support grouping diagnostics by build/run.
  • Linking: Allow linking diagnostics to issues (1:many or group-based association).
  • JSONL extension: Support new diagnostic kind in export/import, aligning with Go beads conventions.
  • Separation of concerns: Beads_rust stores and serves diagnostics; a future external adapter (not part of beads core) can read diagnostics and present them via LSP to editors.

Prior Art / References


This would allow beads_rust to track actionable diagnostics across sources, giving users a unified CLI and future editor integration for working off problems as they emerge.

Also posted here: Dicklesworthstone/beads_rust#34

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions