Skip to content

Add shadow-mode severity-based publication routing to reduce inline comment noise #2672

Description

@acoliver

Problem

Our OCR posting path renders content/location for every finding but does not display or apply category/severity policy. Every line-addressable finding becomes an inline comment regardless of value, creating reviewer noise.

Production evidence from run https://github.com/vybestack/llxprt-code/actions/runs/29946076923 (75 findings):

  • 22 low-severity maintainability findings (nits: hardcoded constants, diagnostic verbosity, naming)
  • 5 low-severity test findings
  • 1 info-severity other finding
  • Only 4 high-severity findings (2 bug, 2 correctness)

A conservative policy routing only low maintainability/test/other/info to the sticky summary would reduce inline candidates from 75 to 47 (37% reduction) while preserving every finding in durable output.

Proposed solution

Implement severity-based publication routing locally in our custom workflow, in shadow mode first.

Phase 1: Shadow mode

  1. After OCR completes, parse each finding's category/severity (depends on fail-open metadata validation).
  2. Apply a conservative routing policy:
    • Inline: high, medium, all security, all bug/correctness, all unknown values (fail-safe).
    • Summary-only: low maintainability, low test, info/other.
  3. In shadow mode, post ALL findings as inline (current behavior) but log what would have been routed to summary.
  4. Track: how many would have been suppressed, what categories, any high-value findings that would have been missed.

Phase 2: Go live after shadow validation

  1. Route low maintainability/test/other/info findings to the sticky summary instead of inline.
  2. Render category and severity labels in both inline and summary findings.
  3. Every finding and its routing reason remains in the redacted artifact.
  4. Make the routing thresholds configurable via repository variable.

Routing policy (initial, conservative)

Category Severity Destination
bug, correctness, security any inline
maintainability, test, style high, medium inline
maintainability, test, style low summary
other, unknown any inline (fail-safe)
any info summary

This is deliberately conservative. It can be tuned after shadow-mode data proves it does not reduce high-value recall.

Acceptance criteria

  • Shadow mode logs routing decisions without changing posted behavior.
  • Shadow mode tracks what would have been suppressed by category/severity.
  • After go-live, low-severity maintainability/test findings appear in the sticky summary, not as inline comments.
  • All high/medium findings remain inline.
  • All security/bug/correctness findings remain inline regardless of severity.
  • Unknown category/severity values default to inline (fail-safe).
  • Every finding is preserved in the redacted artifact with its routing reason.
  • Category and severity labels are rendered in posted comments.

Relationship to other issues

Metadata

Metadata

Assignees

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