Skip to content

refactor: one finding post-processing module shared by review, scan and MCP #610

Closed

Description

@ajianaz

From the architecture audit (deep module / seam vocabulary).

The filter order (LLM secret FP, markdown code block, ignore.rules, cora-ignore, context-line) lives in engine/review.rs (and is repeated in the LLM-failure fallback), commands/scan.rs::finalize_issues copies a subset, and the MCP snippet tool (mcp/tools.rs) runs the scanners with no filters at all.

Proposal: postprocess(issues, source, config) as the single interface (source = diff or file set), so fixes land in one place. Related: scanners should take "lines of a file" rather than diff chunks (files_as_chunks and the MCP fake diff are workarounds); ReviewIssue has ~46 construction sites in 15 files (add a constructor); test the secret false-positive heuristics with a table of (line, expected) per language; inject the index DB path instead of a process-global DB + migration mutex (#604).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions