Skip to content

feat(review): group changed files by class with +/- counts and large-group collapse #2144

Description

@JSONbored

Pure aggregation for the changed-files summary: group the classified files (from the classifier slice) by class, sum additions/deletions per group, and collapse a same-class group above a threshold into one summary row. Data-shape only — the markdown table render is a separate slice.

Deliverables

  • Pure summarizeChangedFiles(files: {path, additions, deletions, class}[]): ChangedFileGroup[] returning per-class {class, fileCount, additions, deletions, collapsed}
  • Collapse a group into a single row when fileCount exceeds a small constant (documented threshold); otherwise keep per-file rows
  • Deterministic ordering (source first, matching diffFilePriority intent)
  • Tests: mixed classes, one class over/under the collapse threshold (both branches), zero-add/zero-del files, empty input → []

References

  • src/review/review-diff.ts:16
  • src/review/review-diff.ts:25
  • part of #1957

Part of #1957.


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