Repository navigation
refactor(primitives)!: [#2876] replace peer::Id::new with a realistic test helper behind a testing feature - #2888
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…of and coverage baseline (T1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…elper for realistic peer ids The helper builds -qB4650- followed by the number as 12 zero-padded decimal digits, so the client registry names qBittorrent and distinct numbers give distinct ids. Three unit tests, each seen to fail under a mutation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…with qbittorrent_peer_id The peer builders take a u32; the -1 sentinel is the named OTHER_PEER, a number no scenario makes, and the 0..408 loops iterate over u32. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its only callers, in torrent-repository-benchmarking tests, now use peer::fixture::qbittorrent_peer_id. A compile_fail doctest guards the removal. BREAKING CHANGE: peer::Id::new is removed from the public API of torrust-tracker-primitives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…feature peer::fixture (PeerBuilder, qbittorrent_peer_id and the Default impls of Peer and peer::Id) now compiles only with the new testing feature, enabled by a path-only self dev-dependency and by the dev-dependencies of the eight packages whose tests use it. BREAKING CHANGE: peer::fixture and the Default impls of peer::Peer and peer::Id need the testing feature of torrust-tracker-primitives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ittorrent_peer_id Peer::default, Id::default, PeerBuilder::seeder and PeerBuilder::leecher now use -qB4650-00000000000N ids, which the client registry knows as qBittorrent. No assertion depended on the old bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Default impls 14 unit tests: the default Peer and Id, and each PeerBuilder method changing only its own field. The fixture has no uncovered line left. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ures such as peer::fixture Rule D's reasoning covers any fixture other packages' tests use, not only mockall mocks; the ownership map gets a row for peer::fixture, owned by primitives behind its testing feature. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e criteria and retrospective (T9) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
ACK 50e59b3 |
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 50e59b343ef0985f92cc6c48b7112571bfd7cc40. Recomputed from the bytes at this head, against the merge base a388fe7cc; git merge-tree against develop a388fe7cc writes a tree identical to the head's tree, with no conflict.
Process: an implementation of a folder-style task spec under create-issue, with tests per write-unit-test, an ADR amendment per create-adr, commits per commit-changes and the description per open-pull-request. The spec is in-progress with T0-T9 done, the acceptance and manual-scenario tables filled, a retrospective from its template and a coverage-evidence file; links and anchors in the changed Markdown resolve.
The change against its claim: Id::new is gone, guarded by a compile_fail,E0599 doctest with a passing 20-byte companion. qbittorrent_peer_id writes at most ten digits into the 12-digit field, so it never reaches the prefix and is injective; the u32::MAX row recomputes. peer::fixture is #[cfg(feature = "testing")], and every use of PeerBuilder, Peer::default, PeerAnnouncement::default or the helper sits in a #[cfg(test)] module, a tests/ target or a bench of one of the eight packages that now enable testing from [dev-dependencies]; no [dependencies] entry enables it and no Default-deriving production type needs Peer: Default. OTHER_PEER (1000) is outside every scenario number (1-3, 0-407, 1-75), the info hashes keep their i32 values, and peer order inside each entry is unchanged. Each of the 14 fixture tests sets a value that differs from its starting peer, so a no-op setter fails it.
Consistency: the ADR's new ownership row matches the consumer scan, the inventory did search only for fixtures, the dictionary already holds the new words, and the 34-member count recomputes.
Hygiene: ten Conventional commits with [#2876], author equal to committer, bodies matching their diffs; the two breaking commits carry ! and a BREAKING CHANGE: footer. Each commit carries an attribution footer; no rule in the tree forbids it. git diff --check and the commit-id check print nothing; the closing-keyword scan matches only Closes #2876 in the description.
Findings: F1 (Nit) and F2 (Suggestion); none blocks.
Checked, no finding: the into/build test (it guards build; into is covered through every other builder test), the machete ignored swap, the private-field access from the child module in a const fn, and the new spec files' frontmatter.
Checks
On the loop's compute node at this head, against the merge base a388fe7cc (receipt server-gates-kranich-987): the repository's pre-commit gate and lint roster exit 0 (376 s wall). Package tests for torrust-tracker-primitives, torrust-tracker-torrent-repository-benchmarking, torrust-tracker-swarm-coordination-registry, torrust-tracker-udp-core and torrust-tracker-http-core exit 0: 2041 passed, 0 failed, 3 ignored across 15 test binaries (137 s wall). This PR has no audit record of its own. Checked against the bytes at posting: packages/primitives/src/peer.rs guards the removed constructor with a compile_fail,E0599 doctest at line 360, and qbittorrent_peer_id is a pub const fn at line 636. GitHub checks at this head at posting time: "Package Coverage (torrust-tracker-axum-rest-api-server): queued/pending; Package Coverage (torrust-tracker-udp-core): queued/pending; Package Coverage (torrust-tracker-primitives): queued/pending; Package Coverage (torrust-tracker-udp-server): queued/pending; Package Coverage (torrust-tracker-swarm-coordination-registry): queued/pending; Package Coverage (torrust-tracker-http-core): queued/pending; Package Coverage (torrust-tracker-torrent-repository-benchmarking): queued/pending; Package Coverage (torrust-tracker-axum-http-server): in_progress/pending; Docker E2E: completed/skipped; Layer Boundary Bans: in_progress/pending; Unit (nightly): in_progress/pending; Documented Clippy Allows: completed/success; Unit (stable): in_progress/pending; Generate Coverage Report: completed/success; Workspace Packaging: completed/success; Shipped Features: completed/success; Discover Package Coverage: completed/success; Docs Lint: completed/success; Test (Docker) (release): queued/pending; Build on windows-latest (stable): completed/success; Build on macos-latest (nightly): completed/success; Build on ubuntu-latest (nightly): completed/success; Build on macos-latest (stable): queued/pending; Build on windows-latest (nightly): completed/success; Build on ubuntu-latest (stable): completed/success". At posting, develop is b009b6425.
|
ACK 50e59b3 — verified at this head that |
There was a problem hiding this comment.
🟢 Approval recommended
The peer-ID fixture migration has no active review issues blocking approval.
No open issues 🎉
What changed in this PR
Implements #2876 under the package-testing overhaul (#1347), replacing the numeric peer-ID constructor with realistic test fixtures and separating shared test support from the production API.
Changes:
- Removes
peer::Id::new, addsqbittorrent_peer_id(u32), and gates peer fixtures and theirDefaultimplementations behindtesting. - Migrates benchmark tests and enables the feature through consumer dev-dependencies.
- Adds helper and fixture tests, records verification evidence, and amends the shared-test-support ADR.
| File | Description |
|---|---|
packages/udp-server/Cargo.toml |
Enables primitives test support for tests. |
packages/udp-core/Cargo.toml |
Enables primitives test support for tests. |
packages/torrent-repository-benchmarking/tests/repository/mod.rs |
Migrates peer numbering while preserving info hashes. |
packages/torrent-repository-benchmarking/tests/entry/mod.rs |
Uses realistic IDs and the named sentinel. |
packages/torrent-repository-benchmarking/tests/common/torrent_peer_builder.rs |
Migrates builders to u32 and defines OTHER_PEER. |
packages/torrent-repository-benchmarking/Cargo.toml |
Enables primitives test support for tests. |
packages/swarm-coordination-registry/Cargo.toml |
Enables primitives test support for tests. |
packages/primitives/src/peer.rs |
Replaces the constructor, gates fixtures, and adds tests. |
packages/primitives/Cargo.toml |
Defines testing and enables it for local tests. |
packages/http-core/Cargo.toml |
Enables primitives test support for tests. |
packages/axum-rest-api-server/Cargo.toml |
Enables primitives test support for tests. |
packages/axum-http-server/Cargo.toml |
Enables primitives test support for tests. |
docs/issues/open/2876-1347-peer-id-test-helper/test-plans/qbittorrent-peer-id.md |
Records test design, migration, and mutation checks. |
docs/issues/open/2876-1347-peer-id-test-helper/manual-verification-evidence.md |
Records build, feature-isolation, and ID verification. |
docs/issues/open/2876-1347-peer-id-test-helper/ISSUE.md |
Records decisions, progress, and acceptance evidence. |
docs/issues/open/2876-1347-peer-id-test-helper/implementation-retrospective.md |
Documents discoveries and lessons from implementation. |
docs/issues/open/2876-1347-peer-id-test-helper/coverage-evidence.md |
Records baseline and final coverage measurements. |
docs/adrs/20261021190318_share_workspace_test_support_through_testing_features.md |
Extends the guidance and ownership map to shared fixtures. |
Cargo.toml |
Enables primitives test support for root-crate tests. |
Cargo.lock |
Records the primitives self dev-dependency. |
Review effort: Balanced
… no AAA markers Review finding F1 of PR 2888. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
ACK 50e59b3 |
…f dev-dependency The O1c note holds only when tests or examples name the crate; a package without them lists the self dev-dependency in its machete ignored list. Review finding F2 of PR 2888. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
ACK 20cb3f1 |
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 20cb3f15621d0fb1b0b7c418558802023beee1ba. Recomputed from the bytes at this head, against the merge base a388fe7cc; git merge-tree against develop b009b6425 writes a clean tree with no conflict, and no file is touched on both sides (develop moved by discussion and audit documents only).
Since 50e59b343: a fast-forward of three documentation commits; no code, manifest or lock file moved, so the round 1 code verification stands.
F1 (Nit): fixed by recording the decision in the test plan, one of the two fixes the finding offered; the reply and the audit row match the tree, and the format test is the only test with markers. F3 below is a counting slip in that record.
F2 (Suggestion): fixed. The amendment now says the O1c note holds only when tests/ or examples name the crate, and that a package without them lists its self dev-dependency in the machete ignored list, as the primitives manifest does; the retrospective's improvement 1 now points at it.
Audit record: the new PR-REVIEW.md follows its template; both rows are FIXED/RESOLVED, and their source review ID, source and reply URLs, severities and resolution subjects match the capture and the branch. The validator's logic, run offline against the captured comments and the local commit range, reports ok with no failure. Both threads carry a reply and are resolved; the automated overview review makes no request, so it needs no row.
Hygiene: three Conventional commits with [#2876], author equal to committer, bodies naming the finding each answers; each carries an attribution footer, which no rule in the tree forbids. git diff --check and the commit-id check print nothing; the closing-keyword scan matches only Closes #2876 in the unchanged description.
Findings: F3 (Nit) and F4 (Nit); none blocks.
Checked, no finding: the ADR clause against the primitives manifest, the two audit verification commands (each finds what it says), the new progress-log entry, Markdown links, and line length (MD013 is off).
Checks
On the loop's compute node at this head, against the merge base a388fe7cc (receipt server-gates-kranich-989): the repository's pre-commit gate and lint roster exit 0 (442 s wall on a loaded node), and the audit-record validator for this PR reports status ok with 2 rows, 1 log entry and 0 failures. The three new commits change documentation only; the package tests ran at the previous head (2041 passed, 0 failed, 3 ignored). F3 checked against the bytes at posting: lines 231 to 233 of the test plan describe the fixture tests as one- to three-statement bodies. GitHub checks at this head at posting time: "Package Coverage Regression: completed/success; Package Coverage (torrust-tracker-axum-rest-api-server): completed/success; Package Coverage (torrust-tracker-torrent-repository-benchmarking): completed/success; Package Coverage (torrust-tracker-udp-server): completed/success; Package Coverage (torrust-tracker-axum-http-server): completed/success; Package Coverage (torrust-tracker-primitives): completed/success; Package Coverage (torrust-tracker-udp-core): completed/success; Package Coverage (torrust-tracker-http-core): completed/success; Package Coverage (torrust-tracker-swarm-coordination-registry): completed/success; Build on macos-latest (stable): completed/success; Docs Lint: completed/success; Build on windows-latest (stable): completed/success; Build on macos-latest (nightly): completed/success; Build on ubuntu-latest (stable): completed/success; Build on windows-latest (nightly): completed/success; Build on ubuntu-latest (nightly): completed/success; Test (Docker) (release): in_progress/pending; Discover Package Coverage: completed/success; Generate Coverage Report: completed/success; Docker E2E: completed/skipped; Shipped Features: completed/success; Layer Boundary Bans: completed/success; Unit (stable): completed/success; Documented Clippy Allows: completed/success; Unit (nightly): completed/success; Workspace Packaging: completed/success". At posting, develop is b0fa2abaf.
|
ACK 20cb3f1 — verified at this head that F1 and F2 are fixed in the tree, the three new commits touch documentation only, and the review audit record matches the captured threads and passes the validator's logic offline |
|
ACK 20cb3f1 |
… peer.rs tests Two fixture tests have four statements. Review finding F3 of PR 2888. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds F3 and F4 and corrects the round-1 reply time (F4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
ACK a31c219 |
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at a31c219cef4c511b59830d10d519d856c147215c. Recomputed from the bytes at this head, against the merge base a388fe7cc; git merge-tree against develop 9e463cb0c writes a clean tree: Cargo.toml and the spec auto-merge with the skills move on develop, and every path the branch's files reference exists in the merged tree.
Since 20cb3f156: a fast-forward of two documentation commits; no code, manifest or lock file moved.
F3 (Nit): fixed. The test plan now says one- to four-statement bodies and names the two tests with four; the F1 row matches, and the reply and audit row match the tree.
F4 (Nit): the time is fixed (16:54 UTC matches the forge), but it was fixed by rewriting the round-1 log entry in place; F5 below.
Audit record: rows F3 and F4 are FIXED/RESOLVED with the review ID, source and reply URLs, severities and resolution subjects of the capture and the branch; the round-2 entry's times (replies 17:31 UTC, before the push) match the forge. The validator's logic, run offline against the captured comments and the local commit range, reports ok (4 rows, 2 log entries, no failure). All four threads carry a reply and are resolved.
Hygiene: two Conventional commits with [#2876], author equal to committer, bodies naming the finding each answers; each carries an attribution footer, which no rule in the tree forbids. git diff --check and the commit-id check print nothing; the closing-keyword scan matches only Closes #2876 in the unchanged description.
Findings: F5 (Minor); it does not block.
Checked, no finding: the audit's three verification commands (each finds what it says, and a little more for four-statement), the progress-log entry, and the audit's related-artifacts path, which after the merge is a redirect stub that resolves, as the skills-move ADR allows.
Checks
On the loop's compute node at this head, against the merge base a388fe7cc (receipt server-gates-kranich-996): the repository's pre-commit gate and lint roster exit 0 (691 s wall on a loaded node), and the audit-record validator for this PR reports status ok with 4 rows, 2 log entries and 0 failures. The two new commits change documentation only; the package tests ran at an earlier head with the same code (2041 passed, 0 failed, 3 ignored). F5 checked against the bytes at posting: the diff 20cb3f156..a31c219ce replaces the round-1 log line's 16:53 UTC in place, and the process-pr-review skill at develop (lines 89 to 90) says a rewritten log entry is restored and a correction appended. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "Package Coverage Regression: completed/success; Package Coverage (torrust-tracker-primitives): completed/success; Package Coverage (torrust-tracker-udp-core): completed/success; Package Coverage (torrust-tracker-torrent-repository-benchmarking): completed/success; Package Coverage (torrust-tracker-axum-rest-api-server): completed/success; Package Coverage (torrust-tracker-udp-server): completed/success; Package Coverage (torrust-tracker-axum-http-server): completed/success; Package Coverage (torrust-tracker-swarm-coordination-registry): completed/success; Package Coverage (torrust-tracker-http-core): completed/success; Docker E2E: completed/skipped; Workspace Packaging: completed/success; Unit (nightly): in_progress/pending; Shipped Features: completed/success; Unit (stable): completed/success; Layer Boundary Bans: completed/success; Documented Clippy Allows: completed/success; Discover Package Coverage: completed/success; Generate Coverage Report: completed/success; Docs Lint: completed/success; Build on macos-latest (nightly): completed/success; Build on ubuntu-latest (stable): completed/success; Build on windows-latest (stable): completed/success; Build on windows-latest (nightly): completed/success; Build on macos-latest (stable): completed/success; Build on ubuntu-latest (nightly): completed/success; Test (Docker) (release): queued/pending". At posting, develop is 9e463cb0c.
|
ACK a31c219 — verified at this head that F3 and the F4 time are fixed in documentation-only commits, the audit record matches the captured threads and passes the validator's logic offline, and the trial merge with develop is clean with every referenced path resolving |
…pend its correction The F4 fix had rewritten the round-1 Processing Log entry in place; the log is append-only. Review finding F5 of PR 2888. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at c4def24693f843de3835520fc83d4c5629ff2fd7. Recomputed from the bytes at this head, against the merge base a388fe7cc; git merge-tree against develop 9e463cb0c writes a clean tree (Cargo.toml and the spec auto-merge), and every path the branch's files reference exists in the merged tree.
Since a31c219ce: one documentation commit; no code, manifest or lock file moved.
F5 (Minor): fixed. The round-1 Processing Log entry is byte-identical to its original text, the round-2 entry is unchanged, and a new 17:55 UTC entry states the forge's reply times (16:54:26 and 16:54:29 UTC) and names the in-place rewrite it corrects, as process-pr-review step 5 asks. F4's row now describes that fix, and its time stays correct.
Audit record: the new F5 row is FIXED/RESOLVED with the review ID, source and reply URLs, severity and resolution subject of the capture and the branch; the reply (17:55:33 UTC) precedes the push. The validator's logic, run offline against the captured comments and the local commit range, reports ok (5 rows, 3 log entries, no failure). All five threads carry a reply and are resolved.
Hygiene: one Conventional commit with [#2876], author equal to committer, body naming the finding it answers; it carries an attribution footer, which no rule in the tree forbids. git diff --check and the commit-id check print nothing; the closing-keyword scan matches only Closes #2876 in the unchanged description.
Findings: none.
Checked, no finding: the F4 and F5 verification commands (each finds what it says), the F4 row's two-line resolution reference (the first line is a branch subject), the new progress-log entry, and the merged tree's references.
Checks
On the loop's compute node at this head, against the merge base a388fe7cc (receipt server-gates-kranich-1002): the repository's pre-commit gate and lint roster exit 0 (519 s wall on a loaded node), and the audit-record validator for this PR reports status ok with 5 rows, 3 log entries and 0 failures. The new commit changes documentation only; the package tests ran at an earlier head with the same code (2041 passed, 0 failed, 3 ignored). F5's fix checked against the bytes at posting: the round-1 Processing Log entry at this head matches its text at 20cb3f156 line for line, and the correction is a new entry at 17:55 UTC. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "". At posting, develop is 9e463cb0c.
|
ACK c4def24 — verified at this head that F5 is fixed with the round-1 log entry restored byte for byte and the correction appended, the audit record matches the captured threads and passes the validator's logic offline, and the trial merge with develop is clean |
|
ACK c4def24 |
F6: F3 and F4 give their reply URL as the resolution reference, so the audit validator passes. F7: the audit names the skills' current paths. F8: the torrust#2824 F5 owner cell says torrust#2888 implemented the outcome. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssues/closed 524e12b docs(issues): [#2876] address review round 2 of PR 2895 (josecelano-bot) 2004123 docs(issues): [#2876] point the #2824 F5 owner cells at the archived spec (josecelano-bot) 6b3421e chore(issues): archive closed issue #2876 spec to docs/issues/closed (josecelano-bot) Pull request description: Archives the spec of #2876 (closed by #2888, merged 2026-11-16 21:49 UTC) from `docs/issues/open/` to `docs/issues/closed/`. - Verified #2876 is `CLOSED` on GitHub. - `ISSUE.md`: `status: done`, `spec-path` and `related-pr: 2888` set, `last-updated-utc` bumped, the archive checkpoint ticked and a progress-log entry added. The two reviewer checkpoints stay unticked: no reviewer filled them in. - `manual-verification-evidence.md` and `implementation-retrospective.md`: frontmatter points to the new path. - Parent EPIC #1347: row 13 set to `DONE` with the new path and a summary of what #2888 shipped; progress-log entry added. - Test-support ADR: the three links to the spec point to the new path. - #2824 spec and lessons: the F5 owner cells, which are live pointers, name the new path (review round 1, F1). - Left as they are, because they are historical records: the PR review audits of #2878 and #2888, and an older progress-log entry of #2876 that names the path it had then. - Review audit: `docs/pr-reviews/pr-2895-review/PR-REVIEW.md`. - `linter all` exit 0. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ACKs for top commit: josecelano: ACK 524e12b da2ce7: ACK 524e12b — verified at this head that F6 to F8 are fixed, the audit record passes the validator's logic offline against the captured threads, the commit-id check prints nothing and the trial merge with develop is clean Tree-SHA512: 6b50add264e44bda922f0981a761463fa1100834b7c2dfc01fd93894815ae43ade82e8463fc183f7bd0d6e8f5b51dee848711da59c1d4c7e2a7a2d4d85bcaac1
Closes #2876
Parent EPIC: #1347 (finding F5 of #2824). Spec:
docs/issues/open/2876-1347-peer-id-test-helper/ISSUE.md, merged through #2878. The maintainer answered Q1-Q7 in chat on 2026-11-16, accepting every recommendation; the answers are recorded in the spec.Summary
peer::Id::new, a test-only constructor that made ids no client sends, is gone from the public API oftorrust-tracker-primitives, and the peer fixture now sits behind atestingfeature, as the test-support ADR asks.peer::fixture::qbittorrent_peer_id(number: u32) -> Id(const fn):-qB4650-followed by the number as 12 zero-padded decimal digits, soqbittorrent_peer_id(42)is-qB4650-000000000042. The client registry names every id as qBittorrent, and distinct numbers give distinct ids. The maintainer approved its name, signature and format at the spec's design-review checkpoint.torrent-repository-benchmarkingtests): the peer builders take au32; the-1sentinel is the namedOTHER_PEER(1000, a number no scenario makes); the two0..408loops iterate overu32and convert toi32only forInfoHash::from(&i32)andwrite_i32, so the info hashes are unchanged.Id::newremoved, guarded by acompile_fail,E0599doctest onpeer::Idwith a companion that builds an id from 20 bytes.testingfeature onprimitives:peer::fixture(PeerBuilder, the helper and theDefaultimpls ofPeerandpeer::Id) compiles only with it. A path-only self dev-dependency enables it for the crate's own tests (ADR rule A.3); eight packages enable it from[dev-dependencies]:axum-http-server,axum-rest-api-server,http-core,swarm-coordination-registry,torrent-repository-benchmarking,udp-core,udp-serverand the root crate. No[dependencies]entry enables it.Peer::default()/Id::default(),PeerBuilder::seeder()andPeerBuilder::leecher()useqbittorrent_peer_id(0),(1)and(2)instead of-qB0000000000000000N, which named no client. No assertion depended on the old bytes.Defaultimpls and everyPeerBuildersetter.mockallmocks, and the ownership map has a row forpeer::fixture.Breaking changes
For the published
torrust-tracker-primitives3.0.0:peer::Id::newis removed, andpeer::fixtureand theDefaultimpls ofpeer::Peerandpeer::Idneed thetestingfeature. The crate already owes a major release (4.0.0, for #2454) in the #2583 plan; these add to it. The two commits that make them carry a!and aBREAKING CHANGE:footer.Packages touched
packages/primitives:src/peer.rs,Cargo.toml(feature, self dev-dependency, machete ignore list)packages/torrent-repository-benchmarking/tests/:common/torrent_peer_builder.rs,entry/mod.rs,repository/mod.rsCargo.toml(root) and theCargo.tomlof the seven packages listed above: one[dev-dependencies]entry each;Cargo.lockdocs/adrs/20261021190318_share_workspace_test_support_through_testing_features.md: the amendmentdocs/issues/open/2876-1347-peer-id-test-helper/: spec progress, test plan, manual verification and coverage evidence, retrospectiveValidation
All with the stable Rust toolchain (rustc and cargo 1.99.1) unless noted.
linter all: exit 0.cargo test --workspace: 4,101 passed, 0 failed (4,087 before the fixture tests).cargo test -p torrust-tracker-primitives: 125 unit tests and the doctests pass;cargo +nightly test -p torrust-tracker-primitives --doc(nightly Rust toolchain, which checks theE0599code) passes.compile_faildoctest fails whenId::newis put back.cargo check -p torrust-tracker-primitives(no features): exit 0. Each of the 34 workspace members was built on its own (cargo test -p <member> --no-run) to find the consumers, because a workspace build turns the feature on for all of them.cargo check --workspace --lib --binsexit 0, no warnings, at the start (with a throwaway gate) and on the final code.cargo run -p shipped-features-check -- --package torrust-trackerexit 0; the release tracker's tree has notestingfeature ofprimitives.Id::newids gaveNone.cargo machete --with-metadata: clean. It flagged the self dev-dependency (the package has notests/folder, so no code names the crate), which is now in the macheteignoredlist with the reason;quickcheckleft that list because a test now uses it directly.cargo package --workspace --no-verify: exit 0; the packagedprimitivesmanifest has no self dev-dependency.cargo llvm-cov, unit-only and aggregate):primitivesfrom 1,075 / 1,143 lines to 1,274 / 1,277; the 3 uncovered lines are Overhaul Packages Testing: Add tests fortorrust-tracker-primitivespackage #2824's deadDisplaybranch and two test-only lines.The manual scenarios used temporary, untracked scratch tests and throwaway gates; none of them is in this branch. The branch was rebased onto
developbefore opening.🤖 Generated with Claude Code