Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d4e3fda
docs(issues): add issue spec for replacing aquatic_udp_protocol (#1732)
josecelano May 5, 2026
5d062eb
feat(deps): add internal fork packages aquatic-peer-id and aquatic-ud…
josecelano May 5, 2026
b7884ab
feat(deps): switch all packages to internal aquatic forks via path de…
josecelano May 5, 2026
fd3c0b9
docs(issues): clarify Step 4 substeps for absorbing forks into perman…
josecelano May 5, 2026
56fd418
docs(issues): document step 2 analysis — no unused code in internal f…
josecelano May 5, 2026
4f93e10
docs(issues): add Step 4c and cross-reference in issue 1732 docs
josecelano May 5, 2026
757ba54
feat(deps): apply zerocopy 0.8 migration to internal forks (step 3 of…
josecelano May 5, 2026
4c04c51
docs(issue-1732): refine step 4 plan to break protocol-primitives cycle
josecelano May 6, 2026
d5f42a6
refactor(udp-protocol): migrate consumers to workspace udp protocol c…
josecelano May 6, 2026
43739a4
refactor(primitives): define peer domain types natively
josecelano May 6, 2026
18e4757
refactor(udp-tracker-core): move peer builder out of udp protocol
josecelano May 6, 2026
978327c
refactor(udp-protocol): absorb interim aquatic fork sources
josecelano May 6, 2026
4c04033
chore(deps): remove unused dependencies and fix doctest types
josecelano May 6, 2026
94f3307
docs(issue-1732): update step 4 progress and validation status
josecelano May 6, 2026
88fc017
refactor(bittorrent-primitives): make InfoHash self-contained
josecelano May 6, 2026
c170e4d
chore(deps): remove unused hex-literal from console/tracker-client
josecelano May 6, 2026
9a05943
chore(deps): use published bittorrent-primitives 0.2.0
josecelano May 6, 2026
f5567bf
docs(issue-1732): refine step 5 implementation strategy
josecelano May 6, 2026
0071129
refactor(udp-protocol): move connect types to connect module
josecelano May 6, 2026
ed10569
refactor(udp-protocol): move announce types to announce module
josecelano May 6, 2026
21a834b
refactor(udp-protocol): move scrape types to scrape module
josecelano May 6, 2026
48aab9d
refactor(udp-protocol): move AnnounceInterval to announce module
josecelano May 6, 2026
38298c1
docs(udp-protocol): document shared common wire type mirrors
josecelano May 6, 2026
328671b
docs(udp-protocol): finalize ErrorResponse ownership decision
josecelano May 6, 2026
3bd5c63
docs(issue-1732): update step 5 progress tracking
josecelano May 6, 2026
3fe50c1
docs(issue-1732): document final udp-protocol module layout
josecelano May 6, 2026
5b6423b
docs(issue-1732): add primitives refactor plan
josecelano May 6, 2026
d9f63ae
refactor(primitives): add announce and scrape modules
josecelano May 6, 2026
4e20c20
refactor(primitives): move AnnounceData to announce module
josecelano May 6, 2026
cd714a9
refactor(primitives): move AnnounceEvent to announce module
josecelano May 6, 2026
6c64e0a
refactor(primitives): move ScrapeData to scrape module
josecelano May 6, 2026
64cf147
docs(issue-1732): document final primitives module layout
josecelano May 6, 2026
95b6ce0
refactor(primitives): remove compatibility wrapper modules
josecelano May 6, 2026
91c6478
docs(issue-1732): add peer-id extraction plan
josecelano May 6, 2026
0b6ba10
refactor(peer-id): create in-house crate and migrate udp-protocol
josecelano May 6, 2026
511932c
refactor(primitives): integrate extracted peer-id crate
josecelano May 6, 2026
49b5c9f
chore(workspace): rely on auto-discovered peer-id member
josecelano May 6, 2026
3068b9e
refactor(peer-id): split crate into focused internal modules
josecelano May 6, 2026
c37276d
docs(issue-1732): document final peer-id ownership
josecelano May 6, 2026
7265f0d
docs(packages): clarify aquatic provenance and acknowledgments
josecelano May 6, 2026
fdcb817
chore(review): address remaining PR #1733 suggestions
josecelano May 6, 2026
7a587dd
docs(review): add comprehensive copilot PR suggestion review workflow
josecelano May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/skills/dev/pr-reviews/fetch-review-threads/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ metadata:

# Fetching PR Review Threads

This is a component skill within the **process-copilot-suggestions** workflow.
Use this skill before resolving review feedback. Its purpose is to collect the unresolved
review thread IDs and enough context to decide whether each thread should stay open or be closed.

**Part of larger workflow**: See **process-copilot-suggestions** for the full end-to-end process.

## Preferred Sources

Use one of these approaches:
Expand Down
172 changes: 172 additions & 0 deletions .github/skills/dev/pr-reviews/process-copilot-suggestions/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
---
name: process-copilot-suggestions
description: End-to-end workflow for processing and resolving all Copilot code review suggestions on a pull request in torrust-tracker. Use when asked to handle PR review feedback, process all copilot suggestions, audit and resolve review comments, or manage copilot-generated review threads. Triggers on "process copilot suggestions", "handle all PR feedback", "resolve copilot review", "audit PR suggestions", or "close all copilot comments".
metadata:
author: torrust
version: "1.0"
---

# Processing Copilot PR Suggestions

This is the primary workflow for handling all Copilot code review suggestions on a pull request.
It combines decision-making, implementation, tracking, and resolution into a structured end-to-end process.

## Overview

Copilot generates suggestions that fall into two categories:

- **action** — Code or documentation changes needed; implement, validate, commit
- **no-action** — Already handled, false positive, or intentionally declined; explain reasoning and mark resolved

## Prerequisites

- Target PR number
- Write access to branch (to apply fixes and push)
- Access to GitHub CLI (`gh`)
- Ability to run linters and tests locally

## Full Workflow

### 1. Setup Tracking File

Copy the template to create a tracker for this PR:

```bash
cp docs/pr-reviews/COPILOT-SUGGESTIONS-TEMPLATE.md \
docs/pr-reviews/pr-<PR_NUMBER>-copilot-suggestions.md
```

Open the tracker file and fill in:

- `<PR_NUMBER>` and `<PR_URL>` at the top
- Placeholder columns in the Suggestions table

### 2. Fetch All Review Threads

Use the **fetch-review-threads** skill or the helper script:

```bash
contrib/dev-tools/github-api-scripts/get-pr-review-threads.sh <PR_NUMBER>
```

This saves all review threads (resolved, unresolved, outdated) to `/tmp/pr_threads_<PR_NUMBER>.json`.

### 3. Populate the Tracker

Extract unresolved threads from the JSON:

```bash
contrib/dev-tools/github-api-scripts/list-unresolved-threads.sh /tmp/pr_threads_<PR_NUMBER>.json
```

Add one row per thread to your tracker file with:

- Thread ID
- File path
- Comment URL
- Brief summary of the suggestion

### 4. Analyze and Decide

For each suggestion, decide:

- **action** — The suggestion identifies a real fix needed:
- Apply the code/doc change
- Run `linter all` and targeted tests
- Commit with clear message
- Update tracker with `action` status
- **no-action** — The suggestion is already handled or not needed:
- Document the reason (e.g., "outdated after later commits", "false positive verified by tests")
- Update tracker with `no-action` status and rationale

**Key principle**: Do not resolve a thread just because a suggestion exists. Only resolve when the concern is genuinely addressed or explicitly declined with documented reasoning.

### 5. Implement Fixes

For each `action` item:

1. Read the suggestion carefully
2. Apply the minimal fix
3. Validate:

```bash
linter all # Full lint gate
cargo test -p <affected-package> # Targeted tests
```

4. Commit with GPG signature:

```bash
git add <files>
git commit -S -m "chore(review): <concise description>"
```

5. Update tracker with `action` status

### 6. Batch Resolve All Threads

After all decisions are made and `action` items are committed:

```bash
contrib/dev-tools/github-api-scripts/get-pr-review-threads.sh <PR_NUMBER>
contrib/dev-tools/github-api-scripts/resolve-all-unresolved-threads.sh /tmp/pr_threads_<PR_NUMBER>.json
```

This resolves all unresolved threads (both `action` and `no-action` categories).

### 7. Final Documentation

Update the tracker file with completion notes:

- Add timestamps to the Processing Log
- Mark all threads as `resolved` in the Thread State column
- Commit the tracker and all helper scripts as final documentation

```bash
git add docs/pr-reviews/pr-<PR_NUMBER>-copilot-suggestions.md
git add contrib/dev-tools/github-api-scripts/
git commit -S -m "docs(review): document PR #<PR_NUMBER> copilot suggestions audit"
```

## Decision Matrix

| Suggestion Type | Has Fix? | Tests Pass? | Decision | Action |
| ----------------------------------------- | -------- | ----------- | --------- | ------------------------- |
| Clear code bug | Yes | Yes | action | Apply + commit + resolve |
| Outdated (already fixed in later commits) | N/A | N/A | no-action | Document reason + resolve |
| False positive (verified by tests) | N/A | Pass | no-action | Document why + resolve |
| Good suggestion but low priority | No | N/A | no-action | Document reason + resolve |
| Docs improvement | Yes | Yes | action | Apply + commit + resolve |

## Helper Scripts Reference

Located in `contrib/dev-tools/github-api-scripts/`:

- **get-pr-review-threads.sh** — Fetch all threads for a PR
- **list-unresolved-threads.sh** — Filter to unresolved threads only
- **resolve-all-unresolved-threads.sh** — Resolve all unresolved threads via GraphQL

See `contrib/dev-tools/github-api-scripts/README.md` for details.

## Related Skills

- **fetch-review-threads** — Deep dive on collecting thread metadata
- **resolve-review-threads** — Deep dive on resolving threads via GraphQL

Both are integrated into this workflow automatically.

## Example

See `docs/pr-reviews/pr-1733-copilot-suggestions.md` for a complete worked example
with all 26 Copilot suggestions processed, decided, and resolved.

## Completion Checklist

- [ ] Tracker file created from template with PR number and URL
- [ ] All review threads fetched and added to tracker table
- [ ] Each thread categorized as `action` or `no-action` with rationale
- [ ] All `action` items implemented, validated, and committed
- [ ] All threads resolved in GitHub (via batch script or one-by-one)
- [ ] Tracker file updated with Processing Log and Thread State column
- [ ] Tracker and helper scripts committed as documentation
- [ ] No uncommitted changes remain
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ metadata:

# Resolving PR Review Threads

This is a component skill within the **process-copilot-suggestions** workflow.
Use this skill after the requested code or documentation changes are already implemented,
validated, committed, and pushed.

**Part of larger workflow**: See **process-copilot-suggestions** for the full end-to-end process.

## Preconditions

- The feedback has actually been addressed in the branch.
Expand Down
Loading
Loading