Parent EPIC: #1488 - Overhaul: Tracker Shutdown (roadmap sequence 5, draft SI-2).
Goal
Add and release an additive torrust-server-lib shutdown-wait primitive that resolves from an injected CancellationToken without subscribing to OS signals. Update the tracker to consume that released crate version without migrating existing server consumers.
Scope
- Implement the primitive directly in the existing
torrust/torrust-server-lib clone, with deterministic token-cancellation and legacy-compatibility tests.
- Preserve
global_shutdown_signal(), shutdown_signal(), shutdown_signal_with_message(), Halted, and existing server start APIs unchanged.
- Open, merge, and publish the focused server-lib change; then update this tracker from
torrust-server-lib 0.2.0 to the exact published version.
- Add tracker-side contract coverage confirming the new API is available while existing consumers retain their legacy paths.
- Keep Axum drain-controller ownership and joining out of this task: SI-10 owns the joinable drain helper and SI-11 through SI-17 own individual consumer migrations.
Acceptance Criteria
Verification
Run server-lib formatting, Clippy, tests, and cargo publish --dry-run; then run tracker linter all, cargo machete, focused server tests, workspace documentation tests, and pre-push checks. Record release and manual cancellation evidence in the issue-local documentation.
Full reviewed specification, including ownership, commit points, manual verification, and risks: docs/issues/open/<issue-number>-1488-si-2-remove-global-shutdown-signal/ISSUE.md after promotion.
Related: #1586, #1588, #2132, #2169, #2221.
Parent EPIC: #1488 - Overhaul: Tracker Shutdown (roadmap sequence 5, draft SI-2).
Goal
Add and release an additive
torrust-server-libshutdown-wait primitive that resolves from an injectedCancellationTokenwithout subscribing to OS signals. Update the tracker to consume that released crate version without migrating existing server consumers.Scope
torrust/torrust-server-libclone, with deterministic token-cancellation and legacy-compatibility tests.global_shutdown_signal(),shutdown_signal(),shutdown_signal_with_message(),Halted, and existing server start APIs unchanged.torrust-server-lib0.2.0to the exact published version.Acceptance Criteria
torrust-server-libversion provides an additive wait primitive that resolves from an injectedCancellationTokenwithout subscribing to OS signals.global_shutdown_signal(),shutdown_signal(),shutdown_signal_with_message(), andHaltedremain source- and behavior-compatible.Halted;Startedstartup signaling remains unaffected.Verification
Run server-lib formatting, Clippy, tests, and
cargo publish --dry-run; then run trackerlinter all,cargo machete, focused server tests, workspace documentation tests, and pre-push checks. Record release and manual cancellation evidence in the issue-local documentation.Full reviewed specification, including ownership, commit points, manual verification, and risks:
docs/issues/open/<issue-number>-1488-si-2-remove-global-shutdown-signal/ISSUE.mdafter promotion.Related: #1586, #1588, #2132, #2169, #2221.