Skip to content

Port the review-thread shell scripts to a Rust tool #2318

Closed

Description

@josecelano

Parent EPIC: #2278 - Strengthen PR Review Author Self-Audit and Evidence Generation

Subissue 3 of #2278. It replaces the four fetch-review-threads Bash and jq scripts with one Rust workspace tool that reproduces their data exactly, so that the follow-up subissue can change what the tool collects with fixture tests instead of editing untested jq filters.

Goal

Provide a tested Rust binary under contrib/dev-tools/ that fetches pull-request review threads through GitHub CLI GraphQL and reproduces the data of the current fetch-review-threads scripts, then remove those scripts and point the skills at the binary.

Background

The fetch-review-threads skill ships four Bash scripts (get-pr-review-threads.sh, list-unresolved-threads.sh, show-unresolved-thread-bodies.sh, and check-thread-reply-status.sh) written quickly to unblock the review workflow. They have no tests, their filtering logic lives in jq strings duplicated across files, and the next subissue (F17, F18, F32) must change that logic. Repository policy prefers Rust once developer tooling is non-trivial or worth testing independently, and every other Rust developer tool already lives as a non-published workspace crate under contrib/dev-tools/ invoked with cargo run --package.

This subissue is parity only. Its value is the test seam and the removal of untested shell logic; the behaviour changes belong to the next subissue so each pull request is reviewable on its own.

Scope

In scope:

  • A non-published workspace crate under contrib/dev-tools/github/ with one binary offering fetch, unresolved list, unresolved show, and reply-status subcommands.
  • Exact reproduction of the GraphQL query fields and the JSON file shape written by get-pr-review-threads.sh, which resolve-all-unresolved-threads.sh consumes.
  • Field-level parity of each script's stdout, summary counts, and exit codes.
  • Compliance with the global CLI output contract as a stdout-result-data binary, including registration in the ADR table.
  • A narrow ThreadSource trait so projections are unit-tested with checked-in GraphQL fixtures and no test invokes gh or the network.
  • Deletion of the four Bash scripts and update of the fetch-review-threads and resolve-review-threads skills.
  • A manual capture against a real pull request compared with the last shell output.

Out of scope:

  • Returning resolved/outdated threads or adding resolvedBy and line (next subissue).
  • Porting the resolve-review-threads scripts, which mutate GitHub state.
  • Pagination beyond the current first 100 threads.
  • Replacing gh with a direct HTTP client.

Specification

Full specification with implementation plan, commit points, acceptance criteria, and verification scenarios: docs/issues/open/2318-2278-port-review-thread-scripts-to-rust/ISSUE.md (added by the spec-only PR).

References

Activity

  1. self-assigned this
    on Sep 23, 2026
  2. added 3 commits that reference this issue on Sep 23, 2026
  3. added 5 commits that reference this issue on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions