Skip to content

SI-16 #1881: Migrate contrib/bencode to torrust/torrust-bittorrent as torrust-bencode#1883

Merged
josecelano merged 7 commits into
torrust:developfrom
josecelano:1881-1669-16-migrate-contrib-bencode-to-torrust-bittorrent
Jun 5, 2026
Merged

SI-16 #1881: Migrate contrib/bencode to torrust/torrust-bittorrent as torrust-bencode#1883
josecelano merged 7 commits into
torrust:developfrom
josecelano:1881-1669-16-migrate-contrib-bencode-to-torrust-bittorrent

Conversation

@josecelano

Copy link
Copy Markdown
Member

Summary

Closes #1881 (subissue of EPIC #1669 — Overhaul: Packages)

Migrates the contrib/bencode crate (torrust-tracker-contrib-bencode) out of this workspace into torrust/torrust-bittorrent as the published torrust-bencode 3.0.0 crate, and removes all traces of it from the tracker workspace.

Changes

torrust/torrust-bittorrent (already merged — separate repo)

  • Renamed crate to torrust-bencode, updated metadata and repository URL
  • Applied clippy fixes (ok_or_else, map_or) in access/convert.rs and reference/decode.rs
  • Published torrust-bencode 3.0.0 to crates.io

This PR (torrust/torrust-tracker)

  • packages/http-protocol: replace path dep torrust-tracker-contrib-bencode with published torrust-bencode = "3.0.0"; update imports in announce.rs and scrape.rs
  • Cargo.lock: remove torrust-tracker-contrib-bencode, add torrust-bencode 3.0.0
  • contrib/bencode/: delete directory (20 files)
  • AGENTS.md: remove bencode from contrib/ description and Community contributions table
  • docs/packages.md: update contrib/ tree noting migration
  • docs/release_process.md: remove old crate from publish checklist
  • src/console/ci/qbittorrent_e2e/bencode.rs: update crate name in doc comment
  • .github/skills/release-new-version/SKILL.md: remove contrib/bencode version bump step
  • docs/issues/open/1669-overhaul-packages/EPIC.md: mark SI-16 done, update tables
  • docs/issues/open/1881-.../ISSUE.md: mark all tasks done (T1–T11, T13)

Pending (not in this PR)

  • T12: Yank torrust-tracker-contrib-bencode on crates.io — deferred until no downstream consumers confirmed

Verification

  • cargo build -p torrust-tracker-http-tracker-protocol
  • cargo build --workspace ✅ (verified locally)
  • CI will run full suite on this PR

…rrust-bittorrent

- Create GitHub issue torrust#1881 as sub-issue of EPIC torrust#1669
- Move spec from drafts/ to open/1881-1669-16-migrate-contrib-bencode-to-torrust-bittorrent/ISSUE.md
- Update frontmatter: status open, github-issue 1881, branch set
- Tick workflow checkpoints: draft, reviewed, issue created, moved to open
- Update EPIC torrust#1669: replace #TBD bencode row with torrust#1881; remove from draft list
…ode 3.0.0

- Replace torrust-tracker-contrib-bencode path dep with torrust-bencode = "3.0.0"
- Update imports in announce.rs and scrape.rs to torrust_bencode crate name

Closes part of torrust#1881 (T7)
- Remove torrust-tracker-contrib-bencode from lock file
- Add torrust-bencode 3.0.0 from crates.io

Part of torrust#1881 (T7)
- Delete contrib/bencode/ directory (crate migrated to torrust/torrust-bittorrent)
- AGENTS.md: remove bencode from contrib/ description and package table
- docs/packages.md: update contrib/ tree to note migration
- docs/release_process.md: remove torrust-tracker-contrib-bencode from publish checklist
- src/console/ci/qbittorrent_e2e/bencode.rs: update crate name reference in doc comment
- .github/skills/release-new-version/SKILL.md: remove contrib/bencode version bump step
  and torrust-tracker-contrib-bencode from deployment checklist

Part of torrust#1881 (T8, T9, T10)
…ompletion (T13)

- EPIC: remove torrust-tracker-contrib-bencode from Package Inventory table
- EPIC: mark bencode migration row as DONE, update extraction candidates
- EPIC: tick SI-16 in quick list
- ISSUE: mark T1-T11, T13 as DONE; T12 (yank old crate) remains TODO
- ISSUE: tick workflow checkpoints; add progress log entry

Part of torrust#1881 (T13)
Copilot AI review requested due to automatic review settings June 5, 2026 16:12
@josecelano josecelano requested a review from a team as a code owner June 5, 2026 16:12
@josecelano josecelano self-assigned this Jun 5, 2026
- Remove COPY contrib/bencode/Cargo.toml line from recipe stage
- Remove contrib/bencode stubs from mkdir/touch in recipe stage
- Remove torrust-tracker-contrib-bencode from excluded-packages comment

Part of torrust#1881

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the tracker-side portion of SI-16 (#1881) by removing the in-workspace contrib/bencode crate and switching the HTTP protocol crate to the published torrust-bencode 3.0.0 dependency, plus updating related documentation to reflect the migration.

Changes:

  • Replace torrust-tracker-contrib-bencode path dependency with the crates.io torrust-bencode = "3.0.0" dependency and update imports accordingly.
  • Remove the contrib/bencode/ crate sources from this workspace (deleted crate, tests, benches, and module files).
  • Update release/docs/issue-tracking documentation to reflect the migration status.

Reviewed changes

Copilot reviewed 30 out of 31 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/console/ci/qbittorrent_e2e/bencode.rs Update doc comment to reference torrust-bencode instead of the old contrib crate.
packages/http-protocol/src/v1/responses/scrape.rs Switch imports to torrust_bencode.
packages/http-protocol/src/v1/responses/announce.rs Switch imports to torrust_bencode.
packages/http-protocol/Cargo.toml Replace path dep on torrust-tracker-contrib-bencode with torrust-bencode = "3.0.0".
docs/release_process.md Remove torrust-tracker-contrib-bencode from the “crates published” checklist.
docs/packages.md Update the documented directory tree for contrib/.
docs/issues/open/1881-1669-16-migrate-contrib-bencode-to-torrust-bittorrent/ISSUE.md Mark tasks/checkpoints as completed and update metadata/progress log.
docs/issues/open/1669-overhaul-packages/EPIC.md Update EPIC tables to reflect SI-16 completion and remove bencode from inventory.
contrib/bencode/tests/mod.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/reference/mod.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/reference/decode.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/reference/decode_opt.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/reference/bencode_ref.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/mutable/mod.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/mutable/encode.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/mutable/bencode_mut.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/lib.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/error.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/cow.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/access/mod.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/access/list.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/access/dict.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/access/convert.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/src/access/bencode.rs Deleted as part of removing the contrib bencode crate.
contrib/bencode/README.md Deleted as part of removing the contrib bencode crate.
contrib/bencode/Cargo.toml Deleted as part of removing the contrib bencode crate.
contrib/bencode/benches/multi_kb.bencode Deleted as part of removing the contrib bencode crate.
contrib/bencode/benches/bencode_benchmark.rs Deleted as part of removing the contrib bencode crate.
Cargo.lock Add torrust-bencode 3.0.0 and remove torrust-tracker-contrib-bencode.
AGENTS.md Update contrib/ description and community contributions table after migration.
.github/skills/dev/git-workflow/release-new-version/SKILL.md Remove contrib bencode from version bump/publish checklists.
Comments suppressed due to low confidence (1)

docs/issues/open/1881-1669-16-migrate-contrib-bencode-to-torrust-bittorrent/ISSUE.md:118

  • This workflow checkpoint claims the old crates.io name was yanked, but the implementation plan still has T12 as TODO and the progress log says yanking is pending. This should not be marked complete until the yank/deprecation is actually performed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/packages.md
Comment thread docs/release_process.md
Comment thread docs/issues/open/1669-overhaul-packages/EPIC.md Outdated
- docs/packages.md: restore accurate contrib/ tree (dev-tools still exists)
- .github/workflows/deployment.yaml: remove torrust-tracker-contrib-bencode publish step
- docs/issues/open/1669-overhaul-packages/EPIC.md: correct yank status to 'yank pending'

Part of torrust#1881
@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.18%. Comparing base (2c5d032) to head (a817386).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1883      +/-   ##
===========================================
+ Coverage    80.72%   81.18%   +0.45%     
===========================================
  Files          363      353      -10     
  Lines        27429    26669     -760     
  Branches     27429    26669     -760     
===========================================
- Hits         22143    21650     -493     
+ Misses        4977     4723     -254     
+ Partials       309      296      -13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josecelano

Copy link
Copy Markdown
Member Author

ACK a817386

@josecelano josecelano merged commit 9322406 into torrust:develop Jun 5, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SI-16: Migrate contrib/bencode to torrust/torrust-bittorrent as torrust-bencode

2 participants