Repository navigation
test(test-helpers): [#2996] share the assert_names_no_source_path test helper - #3041
josecelano merged 24 commits into
Conversation
…rce_path helper Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…_source_path helper Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…s_no_source_path helper Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…names_no_source_path helper in rest api and udp server tests Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…o_source_path definitions Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…gress of SI-8 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 10 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
[Low impact] The PR appears safe to merge; no actionable issues remain. SummaryShares
Reviews (3) · Last reviewed commit: "docs(pr-reviews): [#2996] record the rep..." · Reviewed by Greptile |
…ertions test module Greptile review finding F1 of PR 3041: the repository guide asks for short imported names over full paths. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… of round 1 in the PR 3041 audit Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
ACK 8b5170f |
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 8b5170f418aace461d942264a66fced6908def8d. Recomputed from the bytes at this head, against the merge base 64c6394ce; git merge-tree against develop d89ab84bd merges without conflict, and the merged tree holds exactly five definitions and no import of a deleted copy.
Process: a test-helper refactor carrying spec progress and a review audit, governed by write-unit-test, commit-changes, open-pull-request and process-pr-review (with create-issue for the spec), all repository skills.
The change against its claim: the body of the shared function in packages/test-helpers/src/assertions.rs is identical, after indentation, to the four kept copies, with the same fragment list and panic wording, so AC4 holds. The five removed copies are gone, every caller imports torrust_tracker_test_helpers::assertions, each switched package already dev-depends on test-helpers, and every touched test module is under #[cfg(test)] or tests/. The reasons in the new doc comments hold: test-helpers depends on configuration, which depends on primitives, and neither http-protocol nor axum-server has a test-helpers edge. packages/test-helpers/ is a test-only prefix of the source-location checker. The V1 line numbers match this head.
Consistency: the merge b2ce9fb equals the automatic merge of its parents and brings in the three merges its subject names. No stale import path remains, the frontmatter values are accepted values, and the dictionary is unchanged.
Hygiene: Conventional subjects with [#2996]. Author equals committer on all ten commits. git diff --check is clean and the commit-id check prints nothing. The only closing-keyword match in the description is the issue this PR implements; the title and the commit messages have none. Every non-merge commit carries one attribution footer, and so does the description; no rule in the tree forbids them. The audit-record validator passes offline against the captured threads.
Findings: F1 (Minor) the rustlib/src case is caught by src/ first, so the test would pass without that fragment; F2 (Nit) the five AC evidence cells are identical; F3 (Nit) last-updated-utc is stale; F4 (Nit) the new doc lines run past max_width. None blocks.
Checked, no finding: import order under rustfmt.toml; #[track_caller] reaches the caller through the loop; the clean message holds no fragment; the one review thread has a reply and an audit row.
Checks
On the loop's compute node at this head, against the merge base 64c6394ce (receipt server-gates-kranich-1422): the repository's pre-commit gate and lint roster exit 0 (489 s wall), and the audit validator reports ok with 1 row, 2 log entries and 0 failures. In the per-PR target directory, with every workspace crate recompiled at this head, cargo test --workspace passes 4680 tests with 0 failed and 5 ignored across 136 binaries (597 s wall), cargo clippy --workspace --all-targets --all-features -- -D warnings is clean (46 s wall), and cargo deny check exits 5 with exactly the error set current develop has (464 errors). Checked against the bytes at posting: in packages/test-helpers/src/assertions.rs the fragment list checks "src/" (line 29) before "rustlib/src" (line 32), and the test message at line 61, failed in /toolchain/lib/rustlib/src/rust, also contains src/, so the test passes without the rustlib/src fragment, as F1 says. The head was confirmed with git ls-remote before posting. 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-test-helpers): completed/success; Package Coverage (torrust-tracker-primitives): completed/success; Package Coverage (torrust-tracker-axum-server): completed/success; Package Coverage (torrust-tracker-configuration): completed/success; Package Coverage (torrust-tracker-axum-http-server): completed/success; Package Coverage (torrust-tracker-axum-rest-api-server): completed/success; Package Coverage (torrust-tracker-http-protocol): completed/success; Package Coverage (torrust-tracker-core): completed/success; Docker E2E: completed/skipped; Layer Boundary Bans: completed/success; Source Locations: completed/success; Workspace Packaging: completed/success; Documented Clippy Allows: completed/success; Unit (nightly): completed/success; Unit (stable): completed/success; Shipped Features: completed/success; Docs Lint: completed/success; Test (Docker) (release): completed/success; Discover Package Coverage: 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 macos-latest (stable): completed/success; Build on ubuntu-latest (nightly): completed/success; Generate Coverage Report: completed/success; Build on windows-latest (nightly): completed/success; Persistence Benchmark SQLite3: completed/success; Persistence Benchmark PostgreSQL: completed/success; Persistence Benchmark MySQL: completed/success; Database Compatibility PostgreSQL (16): completed/success; Database Compatibility PostgreSQL (17): completed/success; Database Compatibility PostgreSQL (14): completed/success; Database Compatibility PostgreSQL (15): completed/success; Database Compatibility MySQL (8.4): completed/success; Database Compatibility MySQL (8.0): completed/success; CodeRabbit: completed/neutral; Greptile Review: completed/success". At posting, develop is d89ab84bd.
|
ACK 8b5170f |
…ames its own fragment da2ce7 review finding F1 of PR 3041: the rustlib/src message also held src/, so removing rustlib/src from the list left the test passing. Each message now holds one fragment, and the test checks that the panic text names it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the kept assert_names_no_source_path copies da2ce7 review finding F4 of PR 3041: four doc lines ran past max_width = 130; they now wrap near 100 columns like the rest of the paragraph. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dence and refresh the SI-8 spec metadata da2ce7 review findings F2 and F3 of PR 3041: AC4 gets the V3 wording check, AC1 the V4 red check, V1 is re-run after the doc wrap, and last-updated-utc is current. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…its audit Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
ACK f3bbee8 |
…ads of round 2 in the PR 3041 audit Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
ACK ad0351a — verified at this head that each rejected test message pins its own fragment, the cross-link lines are wrapped, the evidence cites each finding by its audit reference, and the audit records every thread's reply and resolution and validates offline |
…ails to reject da2ce7 review Nit of PR 3041 (audit finding F11): an accepted message failed with "it should reject the message: ()" without naming the case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ing message Co-Authored-By: Claude Opus 5.5 <[email protected]>
… correct three audit entries Co-Authored-By: Claude Opus 5.5 <[email protected]>
… PR 3041 audit Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
ACK b325dc4 |
da2ce7
left a comment
There was a problem hiding this comment.
APPROVE at b325dc4ad.
Since the approval at ad0351ab5:
5e0127c0dmakes a fragment case that is not rejected name its message (alet ... elsewith apanic!naming the message), which answers the inline point atpackages/test-helpers/src/assertions.rs:65.931354a4erecords the re-run whose failure text matches that newpanic!message.a71db8b45corrects the head named for review 6057005909, the stamp check and the author class of the four rows that gaveUnknown, answering the other three points of review 6057270149.b325dc4adfills in the reply references and resolutions of the four new rows.
Checked at this head: every point of review 6057270149 is answered in the bytes; the change since a71db8b45 is confined to the audit record; the audit validator reports ok with 11 rows, 8 log entries and 0 failures; and every review thread opened before b325dc4ad has a reply, an audit row and a resolution.
Checks
On the loop's compute node, against the merge base 64c6394ce: at a71db8b45, which holds the last code change (5e0127c0d), the repository's pre-commit gate and lint roster exit 0, and with every workspace crate recompiled cargo test --workspace passes 4680 tests with 0 failed and 5 ignored across 136 binaries, cargo clippy --workspace --all-targets --all-features -- -D warnings is clean, and cargo deny check exits 5 with the same error set develop has, line for line (2026-11-25). Since then only the audit record changed (git diff --name-only a71db8b45 b325dc4ad lists docs/pr-reviews/pr-3041-review/PR-REVIEW.md alone), and at this head the gate exits 0 again and the audit validator reports ok with 11 rows, 8 log entries and 0 failures. Checked against the bytes at posting: 5e0127c0d changes packages/test-helpers/src/assertions.rs alone, 3 lines added and 1 removed. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "Docker E2E: completed/skipped; Layer Boundary Bans: completed/success; Unit (stable): in_progress/pending; Workspace Packaging: completed/success; Shipped Features: completed/success; Unit (nightly): in_progress/pending; Source Locations: completed/success; Documented Clippy Allows: completed/success; Docs Lint: completed/success; Generate Coverage Report: queued/pending; Discover Package Coverage: queued/pending; Test (Docker) (release): queued/pending; Persistence Benchmark SQLite3: queued/pending; Persistence Benchmark MySQL: queued/pending; Persistence Benchmark PostgreSQL: queued/pending; Build on ubuntu-latest (nightly): completed/success; Build on windows-latest (nightly): completed/success; Build on windows-latest (stable): completed/success; Build on ubuntu-latest (stable): completed/success; Build on macos-latest (nightly): completed/success; Build on macos-latest (stable): completed/success; Database Compatibility PostgreSQL (17): queued/pending; Database Compatibility PostgreSQL (16): queued/pending; Database Compatibility PostgreSQL (14): queued/pending; Database Compatibility PostgreSQL (15): queued/pending; Database Compatibility MySQL (8.4): queued/pending; Database Compatibility MySQL (8.0): queued/pending; CodeRabbit: completed/neutral". At posting, develop is 07f65806a.
|
ACK b325dc4 — the fragment-case message change, its evidence re-run and the review audit record recomputed from the bytes at this head, with the workspace tests passing and the audit validator passing |
|
ACK b325dc4 |
…the tracker-core test import conflicts with torrust#3042 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…n the SI-8 evidence after the merge of develop Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
ACK b7a98ab |
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at b7a98ab41975a04db840aa72ec390faa4fbc0ccc. Recomputed from the bytes at this head, against the merge base cad54cb9b; git merge-tree against develop cad54cb9b returns this head's own tree, since the head already contains develop, and that tree holds exactly five definitions and no import of a removed copy.
Process: since b325dc4ad the branch takes develop in through f93a406 and refreshes its evidence in b7a98ab. The open-pull-request skill requires such an update when a branch conflicts with develop, and this one did.
The change against its claim: the automatic merge conflicts in four tracker-core files, where cad54cb added assert_holds_no_secret beside the local source-path copy that this branch removes. f93a406 resolves each as the branch intends. test_helpers.rs keeps the new secret helper and drops the copy. handler.rs, service.rs and driver/mod.rs import the secret helper from the crate and the source-path helper from torrust_tracker_test_helpers::assertions. Every call of either helper in the workspace resolves within its own module, and every other file of the merge equals the automatic merge. b7a98ab moves the configuration lines of V1 and V3 to 400 and 412, which match this head. The three new lines above them come from the merged redaction of secret options, and the other four files keep their line numbers.
Audit: the record is unchanged since b325dc4, which filled in replies 4694763427, 4694763965, 4694764349 and 4694764807 and set their rows to RESOLVED. All ten threads have a reply, a row and a resolution, and the audit validator passes offline against the captured threads. Review 6057766533 carries no inline comment and no request.
Hygiene: author equals committer on both commits. git diff --check against the new base is clean and the commit-id check prints nothing. The only closing-keyword match is the description's Closes #2996. Each new commit carries one attribution footer, and no rule in the tree forbids it.
Findings: none.
Checked, no finding: the diff against cad54cb9b touches the same 22 files as before; the import groups stay in rustfmt order; develop's own commits are outside this review.
Checks
On the loop's compute node at this head, against the merge base cad54cb9b: the repository's pre-commit gate and lint roster exit 0 (180 s wall); with every workspace crate recompiled cargo test --workspace passes 4809 tests with 0 failed and 5 ignored across 140 binaries; cargo clippy --workspace --all-targets --all-features -- -D warnings is clean; cargo deny check exits 5 with the same error set develop has, line for line; and the audit validator reports ok with 11 rows, 8 log entries and 0 failures (2026-11-25). Checked against the bytes at posting: at this head packages/tracker-core/src/test_helpers.rs:255 still defines assert_holds_no_secret, and no copy of assert_names_no_source_path is left in packages/tracker-core, as the merge resolution described above keeps it. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "Package Coverage (torrust-tracker-primitives): queued/pending; Package Coverage (torrust-tracker-configuration): queued/pending; Package Coverage (torrust-tracker-axum-server): queued/pending; Package Coverage (torrust-tracker-core): queued/pending; Package Coverage (torrust-tracker-axum-rest-api-server): queued/pending; Package Coverage (torrust-tracker-test-helpers): queued/pending; Package Coverage (torrust-tracker-udp-server): queued/pending; Package Coverage (torrust-tracker-axum-http-server): queued/pending; Package Coverage (torrust-tracker-http-protocol): queued/pending; Build on windows-latest (nightly): in_progress/pending; Build on ubuntu-latest (nightly): completed/success; Build on windows-latest (stable): in_progress/pending; Build on macos-latest (nightly): in_progress/pending; Build on ubuntu-latest (stable): completed/success; Build on macos-latest (stable): completed/success; Docs Lint: completed/success; Discover Package Coverage: completed/success; Generate Coverage Report: in_progress/pending; Test (Docker) (release): queued/pending; Docker E2E: completed/skipped; Documented Clippy Allows: queued/pending; Layer Boundary Bans: queued/pending; Unit (nightly): queued/pending; Workspace Packaging: queued/pending; Unit (stable): queued/pending; Source Locations: queued/pending; Shipped Features: in_progress/pending; Persistence Benchmark PostgreSQL: queued/pending; Persistence Benchmark SQLite3: in_progress/pending; Persistence Benchmark MySQL: completed/success; Database Compatibility PostgreSQL (17): in_progress/pending; Database Compatibility MySQL (8.4): queued/pending; Database Compatibility PostgreSQL (15): queued/pending; Database Compatibility PostgreSQL (16): in_progress/pending; Database Compatibility PostgreSQL (14): in_progress/pending; Database Compatibility MySQL (8.0): completed/success; CodeRabbit: completed/neutral". At posting, develop is cad54cb9b.
|
ACK b7a98ab — verified at this head that the merge of develop resolves the four tracker-core import conflicts onto the shared source-path helper and the crate's secret helper, the evidence line numbers match, and the audit records every thread's reply and resolution and validates offline |
|
@claude review |
|
ACK b7a98ab |
…ssues/closed 6709dc4 docs(pr-reviews): [#2996] record the reply of round 3 in the PR 3057 audit (josecelano-bot) 8ee6ede docs(pr-reviews): [#2996] bring the PR 3057 audit in line with the review template (josecelano-bot) af5004c docs(pr-reviews): [#2996] record the reply of round 2 in the PR 3057 audit (josecelano-bot) 94c37a5 docs(pr-reviews): [#2996] record review round 2 of PR 3057 in its audit (josecelano-bot) 3432f25 docs(issues): [#2996] state which reviews the SI-8 reviewer-reports checkpoint excludes (josecelano-bot) ecfc5b2 docs(pr-reviews): [#2996] record review round 1 of PR 3057 in its audit (josecelano-bot) 80b0087 docs(issues): [#2996] correct the SI-8 progress log and checkpoint wording after review (josecelano-bot) e29642b chore(issues): [#2996] archive the SI-8 spec to docs/issues/closed and mark it DONE in EPIC #2912 (josecelano-bot) Pull request description: Sub-issue SI-8 of EPIC #2912. Related to #2996, which pull request #3041 already closed. This pull request is the close-out: it archives the SI-8 specification and marks it done in the EPIC; it changes no code. The specification moves from `docs/issues/open/2996-2912-si-8-share-assert-names-no-source-path/` to `docs/issues/closed/`, with `status: done`, `related-pr: 3041`, the workflow checkpoints ticked, the retrospective decision ("none needed" was recorded in PR #3041) and a progress-log entry that records the merge and the four review rounds. The spec's link to the parent EPIC now points to `../../open/2912-remove-source-locations-from-errors/EPIC.md`, so it resolves from the closed folder; its evidence file points to the new spec path. In `docs/issues/open/2912-remove-source-locations-from-errors/EPIC.md`, row 8 of the `Subissues` table now names the closed spec and reads DONE, the `last-updated-utc` stamp is refreshed, and the progress log records that nine copies of the helper are now five definitions. Files: the moved `ISSUE.md` and `manual-verification-evidence.md` of #2996 and the EPIC. Validation: `linter all` exits 0; no current document still links the old `docs/issues/open/2996-...` path (checked with `rg`; apart from the spec's own first checkpoint, only the historical review audits of PR 3001 and PR 3041 keep it, in commands recorded as run at the time); the open-pull-request commit-id check is empty. After this merges, SI-1 to SI-8 are all done, and the remaining EPIC work is the two upstream issues the maintainer opens. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Updated project documentation to reflect completed work, current tracking status, and revised references. * Added a review record capturing findings and their resolutions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ACKs for top commit: josecelano: ACK 6709dc4 da2ce7: ACK 6709dc4 — the only change since the approved head is the audit record brought in line with the review template, and the record's validator passes Tree-SHA512: d5204487a0f180d45207a61a5302cba8e7212d8b541f3b5b13244ce20cda653cb6d22d075ff22db1c89b7ebaadc7dc60681704249a437a8d6c56ed33a6f11d3d
Sub-issue SI-8 of EPIC #2912. Closes #2996. This pull request defines the test helper
assert_names_no_source_pathonce intorrust-tracker-test-helpersand removes five of its nine copies; it changes no production code and adds no dependency.The shared function lives in
packages/test-helpers/src/assertions.rs, with a unit test for a clean message and one for each of the seven source-path fragments.tracker-core,axum-http-server(unit and integration tests),axum-rest-api-serverandudp-serveralready dev-depend ontest-helpers, so their copies are deleted and their tests import the shared function. The four definitions that cannot use it stay, as the specification decided:http-protocol(no dev-dependency, none added),primitivesandconfiguration(a dev-dependency would be a cycle) andaxum-server(no dev-dependency, none added). Each of the five definitions now has a doc comment that names the other four by path, says why it is separate, and says to change all five together. The twoaxum-http-servercopies said "the failure reason"; all five now say "the error message must not hold a source path, but it contains ...". No test pins that wording.Files:
packages/test-helpers/src/{lib.rs,assertions.rs}, the test modules of the four switched packages, the doc comments inhttp-protocol,primitives,configurationandaxum-server, and the specification folderdocs/issues/open/2996-2912-si-8-share-assert-names-no-source-path/(progress, acceptance criteria,manual-verification-evidence.md).Validation:
linter allpasses;cargo testpasses fortest-helpers,tracker-core,axum-http-server,axum-rest-api-server,udp-server,http-protocol,primitives,configurationandaxum-server, also after merging the latestdevelop.grep -rn "fn assert_names_no_source_path" packagesfinds exactly five definitions, and noCargo.toml,Cargo.lockordeny.tomlfile changes. A scratchtracker-coretest that passedpackages/x.rs:1to the shared helper failed at the test's own line with the unified message; that scratch file is not part of this branch. The open-pull-request commit-id check is empty.packages/test-helpers/is exempt from thesource-location-check, so no allow-list entry is needed for the#[track_caller]function.Not done here: archiving the specification and marking row 8 of the EPIC table done, which follow in the close-out pull request once this is merged.
🤖 Generated with Claude Code
Summary by CodeRabbit