Skip to content

docs(issues): [#2745] add the axum-rest-api-server test environment gating spec - #2746

Merged
josecelano merged 7 commits into
torrust:developfrom
josecelano-bot:2745-2482-gate-axum-rest-api-server-test-environment-spec
Nov 6, 2026
Merged

josecelano merged 7 commits into
torrust:developfrom
josecelano-bot:2745-2482-gate-axum-rest-api-server-test-environment-spec

Conversation

@josecelano-bot

Copy link
Copy Markdown
Contributor

Related to #2745

Spec-only PR for row 6 of sub-EPIC #2482: it adds the refreshed specification for gating the axum-rest-api-server test environment behind a non-default testing feature (ADR 20261021190318, rule A). It changes no code.

What this adds

Decisions recorded in the spec

  • Six forced dependencies plus torrust-clock (after deleting an unused CurrentClock alias) become optional behind testing.
  • The package has no examples, so none are added.
  • Labels and the sub-issue link are done by the maintainer's account on his explicit OK.

The implementation follows in a separate PR after this one merges.

🤖 Generated with Claude Code

josecelano-bot and others added 4 commits November 6, 2026 09:14
…vironment spec and record maintainer decisions

Re-verified the draft against torrust/develop, added the dependency audit and baseline counts, and recorded the decisions: torrust-clock becomes the seventh optional dependency after deleting a dead alias, no examples, labels via josecelano on explicit OK.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…onment spec and link it from the EPIC

Moves the spec to docs/issues/open/, sets the issue number, marks row 6 IN_PROGRESS and updates the links in the EPIC, inventory, coupling report and the torrust#2637 spec.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@josecelano
josecelano requested review from da2ce7 and a balanced review from Copilot November 6, 2026 09:26
@josecelano josecelano self-assigned this Nov 6, 2026

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.

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.

Copilot review overview

1 open issue
What changed in this PR

Adds the open spec for issue #2745 (EPIC #2482 row 6) describing how to gate axum-rest-api-server’s test environment behind a non-default testing feature, and updates existing docs to link to the new open spec instead of the prior draft.

Changes:

  • Add the refreshed spec document under docs/issues/open/.../ISSUE.md and remove the old draft spec.
  • Update EPIC/inventory/coupling report and related issue spec to link to the open spec path.
  • Update EPIC row 6 metadata/status and add a progress-log entry for the spec/issue creation.
File Description
docs/​issues/​open/​2745-2482-gate-axum-rest-api-server-test-environment/​ISSUE.md Adds the refreshed open spec for gating axum-rest-api-server test env behind testing.
docs/​issues/​open/​2637-1347-add-tests-axum-rest-api-server/​ISSUE.md Updates references from the old draft spec path to the new open spec path.
docs/​issues/​open/​2482-1669-reorganize-shared-test-support/​test-support-inventory.md Updates EPIC inventory row 6 to link to the new open spec.
docs/​issues/​open/​2482-1669-reorganize-shared-test-support/​EPIC.md Updates EPIC row 6 to #2745 + links to the open spec; updates narrative/progress log.
docs/​issues/​open/​1669-overhaul-packages/​workspace-coupling-report-2026-10-06.md Updates coupling report link to point to the open spec.
docs/​issues/​drafts/​2482-gate-axum-rest-api-server-test-environment/​ISSUE.md Removes the old draft spec now superseded by the open spec.

Review effort: Lite

@josecelano

Copy link
Copy Markdown
Member

ACK cfc77fd

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.

🔵 Needs a closer look

The dependency audit incorrectly retains url as a normal dependency despite its only direct use being in tests and an existing dev-dependency already covering it.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Low severity Remove url from normal dependencies; retain its dev-dependency

docs/​issues/​open/​2745-2482-gate-axum-rest-api-server-test-environment/​ISSUE.md:75

The audit misses url: its only direct crate reference is in tests/server/v1/contract/context/health_check.rs:5, and Cargo.toml already lists it as a dev-dependency. Production health_check_url uses the value returned by ServiceBinding::url() without referring to the url crate, so this row incorrectly preserves a test-only normal dependency. Record removal of the normal url entry while retaining the existing dev-dependency, as required by the full dependency audit.

1 resolved since last review

Review effort: Balanced

@josecelano
josecelano merged commit 6da1883 into torrust:develop Nov 6, 2026
1 check passed
josecelano added a commit that referenced this pull request Nov 6, 2026
…vironment behind a testing feature

4dbd876 docs(pr-reviews): [#2745] record round 2 of the PR 2747 review (josecelano-bot)
dfa24c3 docs(packages): [#2745] remove the seven testing-only axum-rest edges from the dependency diagram (josecelano-bot)
fb78219 docs(pr-reviews): [#2745] record round 1 of the PR 2747 review (josecelano-bot)
35acbaf docs(issues): [#2745] record the verification evidence and update the spec (josecelano-bot)
3d4e883 docs(axum-rest-api-server): [#2745] replace the stale test module note and resolve the inventory row (josecelano-bot)
66e3eff test(axum-health-check-api-server): [#2745] enable the REST API testing feature in dev-dependencies (josecelano-bot)
ad3d91b refactor(axum-rest-api-server): [#2745] gate the test environment behind a testing feature (josecelano-bot)

Pull request description:

  Closes #2745

  Row 6 of sub-EPIC #2482: applies rule A of ADR 20261021190318 to `axum-rest-api-server`. The spec merged in #2746.

  ## What changes

  - `src/testing/` compiles only with the new non-default `testing` feature (test support outside semver; not in `default` or docs.rs metadata).
  - Seven dependencies become optional behind it: `torrust-tracker-core`, `torrust-tracker-http-core`, `torrust-tracker-udp-core`, `torrust-tracker-udp-server`, `torrust-tracker-swarm-coordination-registry`, `torrust-tracker-rest-api-client` and `torrust-clock` (35 direct normal dependencies become 28).
  - The unused `CurrentClock` alias (the only production use of `torrust-clock`) is deleted; the stale `rest-api-core` note in `src/testing/mod.rs` is replaced.
  - The package's own targets enable the feature through a path-only self dev-dependency, with its `deny.toml` wrapper in the same commit; `axum-health-check-api-server` enables it from its `[dev-dependencies]`.
  - The package has no examples, so none are added. No behaviour changes.

  ## Verification

  Evidence is in `docs/issues/open/2745-2482-gate-axum-rest-api-server-test-environment/manual-verification-evidence.md`.

  - Plain `cargo test` (no `--all-features`) keeps the baseline counts: `axum-rest-api-server` 162 unit + 58 integration, `axum-health-check-api-server` 15 + 11 (measured, equal with and without `--all-features`).
  - `cargo check -p torrust-tracker-axum-rest-api-server --lib` with no features passes; the depth-1 tree has none of the seven.
  - Shipped Features check passes (and fails with the feature on a `[dependencies]` edge); `cargo deny check bans` passes (and fails without the self wrapper); machete, `cargo package --workspace --no-verify` and the nightly all-targets check pass.
  - Container recipe: `torrust-cargo-chef` 0.1.79 `prepare --external-only` then `cook --tests --workspace --all-features` exit 0.

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

ACKs for top commit:
  josecelano:
    ACK 4dbd876

Tree-SHA512: f25251bc7fb31b9eea9c2468ce8b097a1e2e3368e5ece8e7e157092e5828d56f6826a70eef64e0ab7c29545188d5c31d1e5c654390db510ed9f9cbe243a7212c
@da2ce7

da2ce7 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Post-merge note: this pull request requested a review from this account and was closed without one at its final head. A post-merge review will not be done: It changed only an issue specification, EPIC, inventory and report links and a review record under docs/, with no executable code, build or CI effect.

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.

4 participants