Repository navigation
Description
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-libclone, 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-lib0.2.0to 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
- A published
torrust-server-libversion provides an additive wait primitive that resolves from an injectedCancellationTokenwithout subscribing to OS signals. - Existing
global_shutdown_signal(),shutdown_signal(),shutdown_signal_with_message(), andHaltedremain source- and behavior-compatible. - The new primitive does not take or expose
Halted;Startedstartup signaling remains unaffected. - The tracker consumes the exact published crate version, not an unpublished Git dependency.
- Focused server-lib tests prove token cancellation and legacy behavior; tracker coverage compiles against the new API.
- Future-consumer guidance assigns graceful-stop controller ownership and joining to SI-10 and later component migrations.
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.
Activity
docs(issues): record issue torrust#2234 setup
docs(issues): record server-lib PR for torrust#2234
docs(issues): record issue torrust#2234 completion evidence
docs(issues): add issue specification for torrust#2234
docs(issues): record issue torrust#2234 setup
docs(issues): record server-lib PR for torrust#2234
docs(issues): record issue torrust#2234 completion evidence
docs(issues): add issue specification for torrust#2234
docs(issues): record issue torrust#2234 setup
docs(issues): record server-lib PR for torrust#2234
docs(issues): record issue torrust#2234 completion evidence
docs(issues): mark torrust#2234 in review
docs(issues): add issue specification for torrust#2234
docs(issues): record issue torrust#2234 setup
docs(issues): record server-lib PR for torrust#2234
docs(issues): record issue torrust#2234 completion evidence
docs(issues): mark torrust#2234 in review
Merge torrust#2236: chore(deps): [torrust#2234] update torrust-server…
Merge #2275: docs(issues): [#2274] add issue specification
Merge #2336: feat(health-check-api): [#2324] migrate token lifecycle
chore(issues): archive closed issue specs torrust#2157, torrust#2159, t…
Merge #2340: chore(issues): archive closed issue specs