You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(tracker-core): [#2681] gate the torrent metrics mock behind a testing feature - #2688
Subissue 3 of sub-EPIC #2482 (row 3: gate tracker-core's test modules and mocks), the first row that adds a testing feature to a real crate. The spec merged in #2682; the design decisions are recorded there (D1 to D6).
What changes
Rule C: peer_tests, test_helpers and whitelist::test_helpers are private #[cfg(test)] modules, no longer empty public modules in the API.
Rule D: MockTorrentMetricsStore, the one mock other packages use (http-core and udp-core unit tests), is generated behind the new non-default testing feature (testing = ["dep:mockall"], mockall is now an optional dependency). The other three mocks are used by no other package, so they use #[cfg_attr(test, automock)] (ADR rule D.2); the ADR gets an amendment note narrowing rule D.1 ("all four"), as the maintainer decided on 2026-10-28.
tracker-core's own targets use a path-only self dev-dependency (ADR option O1c) and http-core and udp-core enable the feature from their [dev-dependencies]. No [dependencies] entry or default chain enables testing.
deny.toml: torrust-tracker-core is listed as its own wrapper, which the self dev-dependency requires (cargo deny check bans fails without it). It is in the same commit as the manifest change.
The inventory marks patterns C and D resolved. The evidence is in manual-verification-evidence.md (V0 to V8), and there is an implementation retrospective for rows 4 to 7.
Verification
A default tracker-core build has no direct mockall dependency (cargo tree -p torrust-tracker-core -e normal --depth 1) and mockall is absent from the normal graph of http-core and udp-core (cargo tree -i mockall), while their tests still compile (red before their dev-dependency entries, green after).
Test counts are equal before and after in 12 commands (the three packages, plain, --all-features, --all-targets --all-features and --doc --all-features); no required-features is used.
The Shipped Features job's check is green on the real tree, and red (exit 1) when the feature is put on a [dependencies] entry or in default. The shipped-profile binary has no Mock* or mockall strings, with a positive control.
cargo machete --with-metadata, cargo deny check bans, cargo +stable package --workspace --no-verify and the pre-push script pass. An independent pre-PR review returned PASS WITH FINDINGS; its findings are fixed or answered in the evidence (V8).
Notes for reviewers
The pattern is breaking for a crate that is not yet published (pub mod to private, the mocks leaving the default API); First publish of the unpublished workspace crates #2583 decides versions and this PR does not touch its spec.
MockWhitelistStore and MockSchemaMigrator are used by no test; they stay under cfg(test) to keep this change behaviour-preserving. Deleting them is a separate cleanup.
Rows 4 to 7 reuse the pattern, including the deny.toml self-wrapper entry.
The reason will be displayed to describe this comment to others. Learn more.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR gates tracker-core’s shared testing mock behind a non-default testing feature and makes internal test helper modules private, reducing test-only API surface and removing mockall from default dependency graphs.
Changes:
Make peer_tests, test_helpers, and whitelist::test_helpers private #[cfg(test)] modules (no longer public API).
Gate MockTorrentMetricsStore behind a new non-default testing feature (with mockall as an optional dependency); keep other mocks under cfg(test).
Enable tracker-core’s testing feature from http-core/udp-core dev-dependencies; update deny.toml and add verification/docs artifacts.
File
Description
packages/udp-core/Cargo.toml
Enables tracker-core/testing for udp-core unit tests via dev-dependency.
packages/http-core/Cargo.toml
Enables tracker-core/testing for http-core unit tests via dev-dependency.
packages/tracker-core/Cargo.toml
Adds testing feature, makes mockall optional, and adds a self dev-dependency to enable the feature for local test targets.
packages/tracker-core/src/lib.rs
Makes test helper modules private and #[cfg(test)].
packages/tracker-core/src/whitelist/mod.rs
Makes whitelist::test_helpers private and #[cfg(test)].
packages/tracker-core/src/test_helpers.rs
Adjusts inner test module visibility/comments for private test helpers.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The verification transcript does not establish that the override tested the inspected shipped-profile binary, because the integration-test run can rebuild it in Cargo’s target directory.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Test the preserved shipped-profile binary, not a rebuildable target path
The override points into Cargo's target directory, which the preceding integration-test run can rebuild, so this transcript does not establish that it tested the shipped-profile binary inspected earlier. Copy that binary to a separate path immediately after building it, use the copy as TORRUST_TRACKER_BINARY, and record the actual result.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed at 4980517d87eeb641882c5b72a3b17612b12fbd0d. Recomputed from the bytes at this head, against the merge base 0edeb136c; git merge-tree against develop968099d93 exited 0 with no conflicts.
Against the spec and the ADR: the six design decisions are implemented, and inventory patterns C and D are resolved. The dated D.1 note preserves the original text and follows the amendment already specified at the base; the repository process contains no blanket prohibition on such notes.
The gating: the shared metrics mock is feature-gated, the other three mocks and helpers are test-only, and the three feature-enabling dependency edges are dev-only. Edition 2024 implies resolver 3 here; those dev features do not enter an ordinary shipped-binary build. The self wrapper permits the self edge without exempting other direct dependents.
The tests: all three packages retain identical test-attribute counts and test bodies. The helper search gives 28 references in 19 files; all callers remain inside test configurations. Compilation and execution belong to the separate verification run.
The records: source/reply IDs and resolved thread states match the capture. The retained-copy procedure addresses F4's artifact-selection defect. Audit prose nevertheless gives a false visibility rationale, records later events under an earlier time, omits run provenance, and omits inferred-severity markers.
Hygiene: twelve commits, 21 files, +591/−61; subjects have the expected form and issue tag. Diff whitespace checks and the verbatim PR-branch commit-id check are clean. The body keyword scan names only the intended issue. All changed Markdown relative targets and fragments resolve.
The bot: F1/F2 may reasonably remain NO_ACTION, but their recorded visibility explanation must be corrected; F3's disposition is sound. F4's procedure is corrected, with historical execution limited to the supplied transcript.
Findings: F5 to F8 correct the review record and the evidence: the code they describe is right, and each can be repaired after merge with an appended correction, so none blocks. APPROVE.
Checked, no finding: production behavior, feature defaults, dependency placement, trait API, preserved tests, ADR coverage, lockfile self edge, wrapper isolation, local links, and conflict-free integration. Detailed findings are inline.
Checks
On the loop's compute hub at this head, against the merge base 0edeb136c, the #2682 merge (receipt server-gates-sojka-467; develop has since moved to 968099d93, the #2683 merge): pre-commit profile gate exit 0 (106 s); linter markdown, linter cspell, linter lychee exit 0; frontmatter-validator --all: 16 errors / 4 warnings at this head and 16 / 4 at the base re-measured, the same 20 diagnostics by path and category, none in the files this PR touches; the audit validator over docs/pr-reviews/pr-2688-review/PR-REVIEW.md with the review comments and commit list captured at gate time: ok, 4 rows, 2 log entries, 0 failures. cargo test passes at this head and at the base with the same counts: torrust-tracker-core 185, torrust-tracker-http-core 194, torrust-tracker-udp-core 106 (3 ignored). cargo check -p torrust-tracker-core --lib exits 0 with no features and with testing; cargo clippy over the three packages with all targets and features and -D warnings: exit 0. cargo tree -p torrust-tracker -e normal,build -i mockall finds no mockall at this head, against a 24-line tree at the base; torrust-tracker-core is built without testing under the shipped binary; cargo deny check bans passes at both. On the merge of this head into develop968099d93 (tree 87f83e872), the three packages' tests pass with --locked (485 tests). GitHub checks at this head at posting time: "Publish (Development): completed/skipped; Publish (Release): completed/skipped; Context: completed/success; Package Coverage Regression: completed/success; Package Coverage (torrust-tracker-udp-core): completed/success; Package Coverage (torrust-tracker-events): completed/success; Package Coverage (torrust-tracker-axum-http-server): completed/success; Package Coverage (torrust-tracker-configuration): completed/success; Package Coverage (torrust-tracker-core): completed/success; Package Coverage (torrust-tracker-udp-server): completed/success; Package Coverage (torrust-tracker): completed/success; Package Coverage (torrust-tracker-axum-server): completed/success; Package Coverage (torrust-tracker-axum-health-check-api-server): completed/success; Package Coverage (torrust-tracker-http-core): completed/success; Package Coverage (torrust-tracker-axum-rest-api-server): completed/success; Docker E2E: completed/skipped; Layer Boundary Bans: completed/success; Workspace Packaging: completed/success; Shipped Features: completed/success; Unit (nightly): completed/success; Unit (stable): completed/success; Documented Clippy Allows: completed/success; Test (Docker) (release): completed/success; Database Compatibility PostgreSQL (17): completed/success; Database Compatibility MySQL (8.4): completed/success; Database Compatibility PostgreSQL (15): completed/success; Database Compatibility PostgreSQL (16): completed/success; Database Compatibility PostgreSQL (14): completed/success; Database Compatibility MySQL (8.0): completed/success; Generate Coverage Report: completed/success; Discover Package Coverage: completed/success; Build on windows-latest (nightly): completed/success; Build on windows-latest (stable): completed/success; Build on ubuntu-latest (nightly): completed/success; Build on macos-latest (nightly): completed/success; Build on ubuntu-latest (stable): completed/success; Persistence Benchmark MySQL: completed/success; Persistence Benchmark PostgreSQL: completed/success; Build on macos-latest (stable): completed/success; Persistence Benchmark SQLite3: completed/success; Docs Lint: completed/success". At posting, develop is 968099d93.
ACK 4980517 — the tracker-core test gating recomputed at this head: helpers and three mocks under cfg(test), the metrics mock behind the testing feature reached only from dev-dependencies, test counts unchanged, and no mockall under the shipped binary.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed at 55696ce552bee57398c5ab71710ad615eb217ab2. Recomputed from the bytes at this head, against the round-1 head 4980517d8 and the merge base 0edeb136c; git merge-tree against develop968099d93 exited 0 with no conflicts.
What moved: five documentation commits touch only the spec, evidence and audit. No file outside docs/ differs from round 1; the gating, tests, manifests, lockfile and dependency policy are unchanged. Subjects, scopes, issue tags, author/committer equality, footers and whitespace were checked.
F5: the references split into 27 root-helper uses and one whitelist-helper use. The private test-only parent explains privacy; the root restriction resolves to crate visibility, while the whitelist restriction reaches its caller. The corrected lint rationale is consistent with the workspace configuration; clippy was not run here.
F6: commit times support the appended corrections, including the five/six-commit distinction. Existing log entries are preserved. The capture has the original request and the later request at 11:24:49 UTC, followed by dismissal at 11:24:50 UTC.
F7: the named tested artifact has identical code to the named code commit. V9's stamp pairs and three disclosed clock reversals recompute, and its output counts fit the source tests. Some state-check commands remain absent: F9 continues F7.
F8 and audit: inferred qualifiers, author classes, categories, relationships, dispositions, reply IDs and captured thread states agree. Historical execution and precise resolution times cannot be certified from these captures.
Hygiene: the branch-id check is empty; relative links resolve; changed-file metadata was checked; the description matches only Closes #2681.
Findings: F9 (Minor, nonblocking).
Checked, no finding: implementation preservation, visibility correction, chronology correction, severity provenance, audit references and merge compatibility. APPROVE.
Checks
On the loop's compute hub at this head, against the merge base 0edeb136c (receipt server-gates-sojka-495): pre-commit profile gate exit 0 (112 s); linter markdown, linter cspell, linter lychee exit 0; frontmatter-validator --all: 16 errors / 4 warnings at this head and 16 / 4 at the base re-measured, none in the files this PR touches; the audit validator over docs/pr-reviews/pr-2688-review/PR-REVIEW.md with the review comments and commit list captured at gate time: ok, 8 rows, 4 log entries, 0 failures. The paths that differ from the round-1 head 4980517d8 are the three documentation files this round edits, and git diff --quiet outside docs/ exits 0, so the round-1 test, feature-build, clippy, cargo tree and cargo deny results (receipt server-gates-sojka-467) stand for this code. git merge-tree of this head into develop968099d93 is clean (tree 0a134ad49). GitHub checks at this head at posting time: "Publish (Development): completed/skipped; Publish (Release): completed/skipped; Context: completed/success; Package Coverage Regression: completed/success; Package Coverage (torrust-tracker-axum-http-server): completed/success; Package Coverage (torrust-tracker-events): completed/success; Package Coverage (torrust-tracker-udp-core): completed/success; Package Coverage (torrust-tracker-axum-rest-api-server): completed/success; Package Coverage (torrust-tracker-core): completed/success; Package Coverage (torrust-tracker): completed/success; Package Coverage (torrust-tracker-axum-health-check-api-server): completed/success; Package Coverage (torrust-tracker-configuration): completed/success; Package Coverage (torrust-tracker-udp-server): completed/success; Package Coverage (torrust-tracker-axum-server): completed/success; Package Coverage (torrust-tracker-http-core): completed/success; Docker E2E: completed/skipped; Build on macos-latest (stable): completed/success; Build on ubuntu-latest (nightly): completed/success; Build on macos-latest (nightly): completed/success; Build on windows-latest (stable): completed/success; Layer Boundary Bans: completed/success; Unit (nightly): completed/success; Workspace Packaging: completed/success; Database Compatibility MySQL (8.0): completed/success; Build on ubuntu-latest (stable): completed/success; Persistence Benchmark MySQL: completed/success; Persistence Benchmark SQLite3: completed/success; Database Compatibility PostgreSQL (16): completed/success; Generate Coverage Report: completed/success; Database Compatibility PostgreSQL (15): completed/success; Shipped Features: completed/success; Unit (stable): completed/success; Database Compatibility PostgreSQL (17): completed/success; Database Compatibility PostgreSQL (14): completed/success; Test (Docker) (release): completed/success; Build on windows-latest (nightly): completed/success; Discover Package Coverage: completed/success; Documented Clippy Allows: completed/success; Persistence Benchmark PostgreSQL: completed/success; Database Compatibility MySQL (8.4): completed/success; Docs Lint: completed/success". At posting, develop is 968099d93.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed at ec12c791a034728a5793052f4e012b297fcce03f. Recomputed from the bytes at this head, against the round-2 head 55696ce55 and the merge base 0edeb136c; git merge-tree against develop968099d93 exited 0 with no conflicts.
What moved: two commits change three documentation files and one dictionary entry; no code or manifest differs from either earlier reviewed head. Both commit subjects fit their diffs, and whitespace checks pass. The added word preserves the dictionary's existing order.
F9: the embedded script expands to all 57 V9 steps in exactly the transcript order, with compatible commands and output filters. The transcript is unchanged; its three clock reversals recompute. Restore scopes and the final status invocation are now explicit. This closes F9 and the remaining F7 concern; compatibility does not independently authenticate the unavailable original temporary file.
Audit and spec: F9's source, reply, severity, relationship and resolved thread state match the capture. The spec adds a progress entry without changing acceptance criteria. F10 identifies a new chronology error in the audit's last log entry.
Hygiene: the skill's verbatim branch-id check prints nothing; its closing-keyword scan finds only Closes #2681. Local links resolve across all changed Markdown files.
Findings: F10, Minor and nonblocking, continues F6. APPROVE: no blocking finding stands.
Checked, no finding: documentation-only scope, F9/F7 command provenance, commit subjects and attribution footers, dictionary order, metadata, reply mappings, local links, branch-id hygiene and merge compatibility.
Checks
On the loop's compute hub at this head, against the merge base 0edeb136c (receipt server-gates-sojka-496): pre-commit profile gate exit 0 (85 s); linter markdown, linter cspell, linter lychee exit 0; frontmatter-validator --all: 16 errors / 4 warnings at this head and 16 / 4 at the base re-measured, none in the files this PR touches; the audit validator over docs/pr-reviews/pr-2688-review/PR-REVIEW.md with the review comments and commit list captured at gate time: ok, 9 rows, 5 log entries, 0 failures. The paths that differ from the round-2 head 55696ce55 are the three documentation files this round edits and project-words.txt, and git diff --quiet outside those exits 0, so the round-1 test, feature-build, clippy, cargo tree and cargo deny results (receipt server-gates-sojka-467) stand for this code. git merge-tree of this head into develop968099d93 is clean (tree baed8ef6d). GitHub checks at this head at posting time: "Publish (Development): completed/skipped; Publish (Release): completed/skipped; Context: completed/success; Package Coverage Regression: completed/success; Package Coverage (torrust-tracker-udp-server): completed/success; Package Coverage (torrust-tracker-udp-core): completed/success; Package Coverage (torrust-tracker-http-core): completed/success; Package Coverage (torrust-tracker-events): completed/success; Package Coverage (torrust-tracker-core): completed/success; Package Coverage (torrust-tracker-configuration): completed/success; Package Coverage (torrust-tracker-axum-health-check-api-server): completed/success; Package Coverage (torrust-tracker-axum-rest-api-server): completed/success; Package Coverage (torrust-tracker-axum-server): completed/success; Package Coverage (torrust-tracker-axum-http-server): completed/success; Package Coverage (torrust-tracker): completed/success; Docker E2E: completed/skipped; Layer Boundary Bans: completed/success; Unit (nightly): completed/success; Documented Clippy Allows: completed/success; Shipped Features: completed/success; Unit (stable): completed/success; Workspace Packaging: completed/success; Database Compatibility PostgreSQL (16): completed/success; Persistence Benchmark MySQL: completed/success; Database Compatibility PostgreSQL (17): completed/success; Database Compatibility PostgreSQL (15): completed/success; Docs Lint: completed/success; Persistence Benchmark PostgreSQL: completed/success; Database Compatibility MySQL (8.4): completed/success; Discover Package Coverage: completed/success; Database Compatibility MySQL (8.0): completed/success; Test (Docker) (release): completed/success; Build on ubuntu-latest (nightly): completed/success; Persistence Benchmark SQLite3: completed/success; Build on macos-latest (stable): completed/success; Build on windows-latest (stable): completed/success; Build on windows-latest (nightly): completed/success; Build on ubuntu-latest (stable): completed/success; Database Compatibility PostgreSQL (14): completed/success; Generate Coverage Report: completed/success; Build on macos-latest (nightly): completed/success". At posting, develop is 968099d93.
- 2026-10-28 17:37 UTC - Round 2: the re-requested review 5687032971 arrived with no open issue and one review-body finding without a thread (F4). It was reproduced (the plain test run rebuilds the target binary), fixed in the evidence in its own signed commit, and recorded as `FIXED`/`NON_RESOLVABLE`. This record is committed and pushed after the fix; da2ce7 is re-requested after the push.
- 2026-10-29 11:18 UTC - Correction to the 2026-10-28 17:37 UTC entry (finding F6 of this review; the earlier entries are kept as written). That entry was stamped 17:37 and described the F4 fix as already made in its own signed commit and da2ce7 as re-requested after the push. The recorded events are: the F4 fix commit was created at 2026-10-28 17:38:29 UTC and the audit update commit at 17:39:18 UTC (commit times from `git log`), so the entry was written before its fix existed. The PR timeline shows `review_requested` events for da2ce7 only at 2026-10-28 16:57:01 UTC and for Copilot at 16:57:00 and 17:19:54 UTC. The statements that da2ce7 is re-requested after the push in the 17:22 and 17:37 entries were intended actions: the REST requests made after the pushes listed da2ce7 as pending but produced no new timeline event, so no re-request event is recorded. From here on an intended or attempted action is written as such, and an event is stamped after it completes.
- 2026-10-29 11:21 UTC - Round 3 (completed events): da2ce7's review 5694275942 (APPROVED, 2026-10-29 07:35:54 UTC) and ACK comment 6490827285 had four inline findings, F5 to F8. Each claim was checked against the tree and the timeline and confirmed. The maintainer authorized pushing the corrections after the ACK (2026-10-29). The fix commits were created at 2026-10-29 11:16:59 UTC (F5), 11:18:15 UTC (F6), 11:19:39 UTC (F7) and 11:20:21 UTC (F8). Replies were posted at 11:21:09, 11:21:12, 11:21:14 and 11:21:16 UTC and the four threads were resolved afterwards. Not yet events when this entry was written: the push of these commits and the request to da2ce7 to review the new head; the ACK on the earlier head is stale.
- 2026-10-29 11:55 UTC - Round 4 (completed events): da2ce7's review 5697124103 (APPROVED, 2026-10-29 11:44:41 UTC) and ACK comment 6495757274 on the head pushed at 2026-10-29 11:24:49 UTC had one inline finding, F9. It was confirmed against the evidence and the retained script. The maintainer authorized one more push (2026-10-29). The fix commit was created at 2026-10-29 11:54:13 UTC, the reply was posted at 11:54:46 UTC and the thread was resolved afterwards. Not yet events when this entry was written: the push of this record and the request to da2ce7 to review the new head; the ACK on the previous head is stale. Re-requests of da2ce7 so far: the REST request after the push of 11:24:49 UTC was a no-op because he was still pending (no new timeline event), and the next one is a pending action, not an event, until the timeline shows it.
The reason will be displayed to describe this comment to others. Learn more.
[Minor][F10] Correct the recorded review-request chronology (continues F6)
The final sentence says the request after the previous push was a no-op with no timeline event. The captured timeline instead contains event 34577909888: review_requested for da2ce7 at 2026-10-29 11:24:49 UTC, followed by dismissal of review 5694275942 at 11:24:50. Thus 11:24:49 is an evidenced request time; the capture does not establish it as the exact push time. Append a correction preserving this entry, identify the completed request, and distinguish any separate attempted no-op from that event. The processing skill's event-provenance rule at lines 111–116 applies here. The subsequent request at 11:57:58 was still future when this 11:55 entry was written and need not be described as completed then. Nonblocking: this repairs review history after merge without changing or misdescribing the code.
The reason will be displayed to describe this comment to others. Learn more.
FOLLOW_UP, approved by the maintainer (#2688 (comment)): this finding was still open when PR #2688 merged. Verified against the PR timeline: review_requested for da2ce7 at 2026-10-29 11:24:49 UTC (event 34577909888) is a real recorded request, followed by review_dismissed at 11:24:50 UTC. The correction is tracked as finding F10 of this audit and carried in the follow-up pull request for the issue #2681 archive, #2689, which touches only this audit file (append-only, no code change). This thread stays open and is resolved once that pull request merges.
Follow-up approved (maintainer, josecelano): finding F10 (review 5697492766, inline thread at docs/pr-reviews/pr-2688-review/PR-REVIEW.md:185 — the audit wrongly said the post-push re-request of da2ce7 produced no timeline event, when the timeline shows review_requested for da2ce7 at 2026-10-29 11:24:49 UTC, event 34577909888) was unprocessed when this pull request merged. Disposition: append-only correction of the audit (chronology fix, no code change) carried in the follow-up archive PR for issue #2681 (chore/archive-issue-2681-spec), not on this merged branch. The thread stays FOLLOW_UP/OPEN, with the archive PR link, until that PR merges; it is then resolved by reply, and the audit row in this PR's record is left as recorded here rather than opening a second docs PR. Approved in chat on 2026-10-29; this comment is posted at 2026-10-29 13:06:51 UTC (shortly after approval) as the durable record required by the process-pr-review post-merge workflow.
…ssues/closed
7642cf1 docs(issues): [#2681] fix the chronological order of the row-3 completion log entry and keep the F10 chronology precise (Jose Celano)
1100613 docs(pr-reviews): [#2681] record the post-merge finding F10 of PR 2688 with maintainer approval (Jose Celano)
262b772 chore(issues): archive closed issue #2681 spec to docs/issues/closed (Jose Celano)
Pull request description:
Archives the spec for issue #2681 (closed by the merge of PR #2688) from `docs/issues/open/` to `docs/issues/closed/`, and sets row 3 of the #2482 Subissues table to DONE.
- Verified issue #2681 is `CLOSED` on GitHub (closed when PR #2688 merged, which carried the closing keyword for that issue)
- Updated frontmatter (`status: done`, `spec-path`, `related-pr: 2688`, `last-updated-utc`) and the last workflow checkpoint
- Repaired every live reference to the old `docs/issues/open/2681-...` path: the #2482 EPIC row and Progress Log, the inventory destination table, the ADR's dated amendment note, the evidence and retrospective frontmatter, and the `related-artifacts` of the two PR review audits (#2682, #2688)
- Pre-commit hooks passed
This PR also carries the approved post-merge correction for PR #2688's finding F10 (an audit chronology note), per the maintainer's durable approval at <#2688 (comment)>: an append-only fix to `docs/pr-reviews/pr-2688-review/PR-REVIEW.md` only, no code change. The row stays `FOLLOW_UP`/`OPEN` in that audit; the GitHub thread is replied to and resolved once this PR merges.
ACKs for top commit:
da2ce7:
ACK 7642cf1 — verified the docs-only delta, chronology fixes, audit source mappings, local links and clean merge at this head
josecelano:
ACK 7642cf1
Tree-SHA512: ab973f0af54244b49d721db5c73039ee6d85067e60db9cb75d623c52aac46ee768e79ccbfb666515bcf87a72612ba41ae1e10700b9660f69b6e22a580823c271
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2681
Subissue 3 of sub-EPIC #2482 (row 3: gate
tracker-core's test modules and mocks), the first row that adds atestingfeature to a real crate. The spec merged in #2682; the design decisions are recorded there (D1 to D6).What changes
peer_tests,test_helpersandwhitelist::test_helpersare private#[cfg(test)]modules, no longer empty public modules in the API.MockTorrentMetricsStore, the one mock other packages use (http-coreandudp-coreunit tests), is generated behind the new non-defaulttestingfeature (testing = ["dep:mockall"],mockallis now an optional dependency). The other three mocks are used by no other package, so they use#[cfg_attr(test, automock)](ADR rule D.2); the ADR gets an amendment note narrowing rule D.1 ("all four"), as the maintainer decided on 2026-10-28.tracker-core's own targets use a path-only self dev-dependency (ADR option O1c) andhttp-coreandudp-coreenable the feature from their[dev-dependencies]. No[dependencies]entry ordefaultchain enablestesting.deny.toml:torrust-tracker-coreis listed as its own wrapper, which the self dev-dependency requires (cargo deny check bansfails without it). It is in the same commit as the manifest change.manual-verification-evidence.md(V0 to V8), and there is an implementation retrospective for rows 4 to 7.Verification
tracker-corebuild has no directmockalldependency (cargo tree -p torrust-tracker-core -e normal --depth 1) andmockallis absent from the normal graph ofhttp-coreandudp-core(cargo tree -i mockall), while their tests still compile (red before their dev-dependency entries, green after).--all-features,--all-targets --all-featuresand--doc --all-features); norequired-featuresis used.Shipped Featuresjob's check is green on the real tree, and red (exit 1) when the feature is put on a[dependencies]entry or indefault. The shipped-profile binary has noMock*ormockallstrings, with a positive control.cargo machete --with-metadata,cargo deny check bans,cargo +stable package --workspace --no-verifyand the pre-push script pass. An independent pre-PR review returned PASS WITH FINDINGS; its findings are fixed or answered in the evidence (V8).Notes for reviewers
pub modto private, the mocks leaving the default API); First publish of the unpublished workspace crates #2583 decides versions and this PR does not touch its spec.MockWhitelistStoreandMockSchemaMigratorare used by no test; they stay undercfg(test)to keep this change behaviour-preserving. Deleting them is a separate cleanup.deny.tomlself-wrapper entry.