Skip to content

feat(review): per-category inline-comment cap to prevent one category flooding the review #2159

Description

@JSONbored

Today selectInlineComments caps only the TOTAL at MAX_INLINE_COMMENTS (10), so a run of style nits can crowd out correctness/security findings. Add a deterministic per-category sub-cap (config-tunable, default small) applied before the total cap, prioritizing higher-severity categories. Depends on the finding-category schema.

Deliverables

  • Extend selectInlineComments (src/review/inline-comments.ts:79) with a per-category cap applied before MAX_INLINE_COMMENTS
  • Deterministic priority so blockers/security survive when the total cap bites
  • Sub-cap value tunable via a manifest field with a safe default; default preserves current behavior when unset
  • Tests: category over sub-cap trimmed, higher-severity kept over lower, total cap still enforced (all branches)

References

  • src/review/inline-comments.ts:42
  • src/review/inline-comments.ts:79
  • part of #1958

Part of #1958.


size: S · held for later release (gittensor:feature once activated)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions