Repository navigation
Description
Subissue 1 of sub-EPIC #2482 (Reorganize test support code shared between workspace packages), itself a sub-EPIC of EPIC #1669 (Overhaul: Packages). It blocks every other #2482 subissue. Not blocked.
Goal
Record, as one approved ADR backed by verified Cargo behaviour, the rules by which workspace packages share test support code, and turn the result into a migration plan of drafted subissues for the other rows of #2482, so no package moves test code before the rules exist.
Why
#2482 found five test support patterns (A to E). Two hurt: public unconditional testing modules that put nine test-only dependency edges into production builds (pattern A), and a shared test-helpers crate that has become a coupling hub (pattern B). DEC-13 chose the public module on a wrong premise: tracker-core/src/test_helpers.rs is #[cfg(test)] and private. The EPIC lists options O1 to O8 and three mechanisms O1a to O1c, whose trade-offs rest on Cargo behaviour nobody has recorded with commands. #2582 failed in CI because of one unchecked assumption about a self dev-dependency.
Tasks
- D1: verify the Cargo rules (MV1 to MV4) in scratch workspaces on stable and on 1.88.0; record commands, manifests and results in
manual-verification-evidence.md. - D2: write the ADR in
docs/adrs/: criteria, all options with strengths, weaknesses and the reason for each rejection, one rule per pattern A to E, the ownership map, and the mechanism for a package's own targets if O1 is chosen. The maintainer decides before it is written and approves it. - D3: amend DEC-13 with a new DEC entry linking the ADR.
- D4: draft rows 2 to 8 of Reorganize test support code shared between workspace packages (EPIC #1669) #2482 (row 8 only if O1 is chosen) with destination, order and the Overhaul: Tracker Shutdown #1488 gating (Stop event producers before event listeners #2416, Migrate the REST API test environment to the token lifecycle #2449, Migrate the health-check API test environment to the token lifecycle #2450); update the Reorganize test support code shared between workspace packages (EPIC #1669) #2482 Subissues table. No GitHub issues for them yet.
- D5: link the drafts from findings 1 and 2 of the 2026-10-06 coupling report.
Acceptance criteria
- MV1 to MV4 and a packaging baseline are recorded with exact commands and results; contradictions of the EPIC were raised with the maintainer.
- The ADR is approved by the maintainer and registered in the ADR index.
- DEC-13 is amended by a new DEC entry that links the ADR.
- Rows 2 to 8 are drafts with
epic: 2482, and every inventory item has a destination and a draft. - Findings 1 and 2 of the 2026-10-06 coupling report link the drafts; the 2026-10-17 report is unchanged.
- The change set is documentation only.
Spec
docs/issues/open/2618-2482-decide-test-support-rules/ISSUE.md (added by the spec-only PR).
Activity
docs(issues): [#2618] open the spec for deciding how packages share t…
Merge #2619: docs(issues): [#2618] specify how packages share test su…
docs(issues): [torrust#2618] rerun the production-build probe with an…
docs(adrs): [torrust#2618] correct the ADR statements on test_helpers…
docs(issues): [torrust#2618] align the spec and the retrospective wit…
docs(adrs): [torrust#2618] say the test_helpers module adds an empty …
docs(issues): [#2618] record the Cargo verification for sharing test …
docs(issues): [#2618] correct the inventory: http-core and udp-core u…
docs(issues): [#2618] record that a self dev-dependency needs no test…
docs(adrs): [#2618] decide how packages share test support code
docs(issues): [#2618] amend DEC-13 with DEC-18 for the test support r…
docs(issues): [#2482] draft the move of the test-helpers protocol hel…
3 remaining items
docs(issues): [#2482] draft gating the udp-server test environment
docs(issues): [#2482] draft gating the axum-http-server test environment
docs(issues): [#2482] draft gating the axum-rest-api-server test envi…
docs(issues): [#2482] draft gating the axum-health-check-api-server t…
docs(issues): [#2618] record the migration plan and the acceptance ch…
docs(issues): [#2618] record that a self dev-dependency ships the fea…
docs(adrs): [#2618] build shipped artifacts on their own with explici…
docs(issues): [#2618] record the review findings and the container de…
docs(issues): [#2618] count rows 2 to 9 and qualify the evidence clai…
docs(issues): [#2618] record the independent reviews, the retrospecti…
Merge torrust#2624: docs(adrs): [torrust#2618] decide how packages sh…
docs(issues): [torrust#2618] restore the 16:38 log path, cite the mer…
chore(issues): archive closed issue #2618 spec to docs/issues/closed
Merge #2625: chore(issues): archive closed issue #2618 spec to docs/i…
docs(issues): [torrust#3037] leave the reviewer and committer checkpo…