Skip to content

refactor(devtools): consolidate ad-hoc PR review extraction scripts #610

Closed as not planned

Description

@Sinity

Problem

Three command-like PR review mining scripts live under devtools/, but they are not part of the devtools command catalog and two of them duplicate CodeRabbit outside-diff parsing.

Evidence from current master:

  • devtools/extract_pr_reviews.py, devtools/extract_cr_outside_diff.py, and devtools/parse_review_findings.py all expose a main() function.
  • None of those modules is registered in devtools/command_catalog.py, so they do not appear in devtools --list-commands or generated docs/devtools.md.
  • extract_cr_outside_diff.py parses CodeRabbit outside-diff findings from PR-level review bodies.
  • parse_review_findings.py also parses CodeRabbit outside-diff findings, and additionally parses Copilot/Codex PR-level review bodies.
  • rg found no docs/tests for extract_cr_outside_diff.py or parse_review_findings.py beyond their help text references to extract_pr_reviews.py.

This leaves a small but real source-organization problem: command-like tooling is invisible to the control plane, and future review-mining work has two independent regex implementations for the same CodeRabbit section.

Acceptance criteria

  • Pick one canonical review-mining surface.
  • Either register a documented devtools command, e.g. devtools review-findings, or move/delete/archive these scripts if they are local one-offs.
  • Remove duplicate CodeRabbit outside-diff parsing or share a single parser.
  • Add fixture tests for PR-level review extraction, including CodeRabbit outside-diff sections.
  • Ensure generated devtools docs reflect the chosen public surface if retained.

Activity

  1. added
    type:refactor
    area:devtools
    on May 1, 2026
  2. Sinity commented on May 1, 2026

    @Sinity
    OwnerAuthor

    Scope narrowed after review: these were one-off scripts and should be deleted rather than promoted into the devtools catalog. Local cleanup removed:

    • devtools/extract_pr_reviews.py
    • devtools/extract_cr_outside_diff.py
    • devtools/parse_review_findings.py

    A follow-up PR can close this issue with pure deletion if the reference check stays clean.

  3. Sinity commented on May 1, 2026

    @Sinity
    OwnerAuthor

    Superseded by #625. I consolidated this finding into the composite issue so the work can be handled as one coherent slice instead of as a tiny standalone ticket. The original evidence remains available in this issue history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:devtoolstool:codextype:refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions