Repository navigation
feat(signals)!: remove legacy shutdown API and release 0.6.0 - #6
Conversation
Removes Halted, shutdown_signal, shutdown_signal_with_message and global_shutdown_signal (deprecated since 0.5.0), drops the tokio signal feature and derive_more, adds the 0.6.0 changelog. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
ACK 699132d |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the deprecated shutdown API removal and associated 0.6.0 updates.
No open issues 🎉
What changed in this PR
Prepares torrust-server-lib 0.6.0 by removing the shutdown API deprecated in 0.5.0, completing the migration to caller-owned cancellation described in issue #5. Publishing remains outside this PR’s scope.
Changes:
- Removes the four legacy shutdown symbols and their test while retaining
Startedandcancellation_signal. - Drops
derive_moreand Tokio’ssignalfeature, updating the lockfile accordingly. - Bumps the version to 0.6.0 and documents the breaking changes and migration guidance.
| File | Description |
|---|---|
src/signals.rs |
Removes the legacy shutdown API and test; updates cancellation documentation. |
CHANGELOG.md |
Adds the 0.6.0 removal notes and points to migration steps. |
Cargo.toml |
Bumps the version and removes unused dependencies and features. |
Cargo.lock |
Updates the crate version and removes unused dependency entries. |
Review effort: Balanced
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 699132d271edbc8b49fa96e78889087de65bac42 (post-merge). Recomputed from the bytes at this head, against the merge base 0ad8ca094; git merge-tree against main 0ad8ca094 writes tree 587a4e64, identical to the head's own tree: no conflicts, the head is one commit directly on main.
Label: POST_MERGE_FINDINGS. The PR merged at 2026-11-10T13:14:34Z as 2dd04f494, while this round was running, so this review records no verdict and no ACK; the round found nothing blocking, and its one Suggestion stands at the merged head for a follow-up before the 0.6.0 release is published.
Process: with no review skills here, CHANGELOG.md, the CI workflow and the deprecation PR (#4) are the precedent, and the tracker's review-pr, commit-changes and open-pull-request skills apply by analogy.
The change against its claim: the four items carrying #[deprecated] at 0ad8ca094 (Halted, global_shutdown_signal, shutdown_signal, shutdown_signal_with_message) are removed with their legacy test, and nothing else public changes: Started and cancellation_signal keep declaration and body, and the derive_more::Display import and the one doc link to a removed item go too. Two dependency edges go away, torrust-server-lib -> derive_more and tokio -> signal-hook-registry (the signal feature); the nine packages removed from Cargo.lock are exactly those unreachable once both are cut, and no retained package changes version or checksum. 0.5.0 to 0.6.0 is the breaking bump on 0.x, and the changelog entry names every removed item and the feature and dependency drop, and points to the 0.5.0 migration steps in the earlier entry's format.
Downstream: the tracker's six manifests require "0.5.0", a caret range that excludes 0.6.0, so nothing moves until its planned removal step raises them; develop still imports Halted in eight files, shutdown_signal_with_message in axum-server and global_shutdown_signal in udp-server, all of which that step removes. Every tracker crate calling tokio::signal enables the feature itself.
Hygiene: Conventional subject with the ! marker; the body matches the diff; author equals committer; one attribution footer, which no rule in either tree forbids and which the earlier commits share; git diff --check is clean; the only closing keyword is Closes #5 in the description, which the diff implements.
Findings: F1 (Suggestion, inline, non-blocking).
Checked, no finding: no unused import or dead code is left; import grouping matches rustfmt.toml; tests go from ten to nine, minus the legacy test; no file outside the changelog names a removed item, README.md and src/lib.rs included; the description matches the diff, and its title's "release" is the version preparation it says is not yet published.
Checks
On the loop's compute node at this head, against main 0ad8ca094 (receipts server-gates-kranich-586 and -586b): cargo +nightly fmt --check, cargo build --locked --all-targets, cargo test --workspace --locked (9 passed; 10 at main, the difference being the removed legacy test), cargo clippy --all-targets --all-features --locked -- -D warnings, cargo doc --no-deps with warnings denied and linter all all exit 0, and the tree is left clean. Downstream, the tracker at develop 1df1ecdf0 with its six torrust-server-lib requirements raised to 0.6.0 and patched to this head stops at torrust-tracker-axum-server (E0432, unresolved signals::Halted and signals::shutdown_signal_with_message), as expected: its "0.5.0" requirements keep it on 0.5 until its own removal step (tracker issue 2801) lands. GitHub checks at this head at posting time: "Lint and Test: completed/success". At posting, main is 2dd04f494 (the merge of this PR).
| [dependencies] | ||
| derive_more = { version = "2", features = [ "as_ref", "constructor", "display", "from" ] } | ||
| tokio = { version = "1", features = [ "macros", "net", "rt-multi-thread", "signal", "sync" ] } | ||
| tokio = { version = "1", features = [ "macros", "net", "rt-multi-thread", "sync" ] } |
There was a problem hiding this comment.
[Suggestion][F1] Library code no longer needs tokio's macros, net or rt-multi-thread; 0.6.0 is the cheap window to trim them
After this change the non-test code uses only tokio::sync::Mutex (sync) and tokio::task::JoinHandle (rt). The last non-test use of macros was tokio::select! in the removed global_shutdown_signal and shutdown_signal; net and rt-multi-thread have no user at either commit. #[tokio::test] still needs macros and rt, which a dev-dependency can carry.
Dropping a feature from a published dependency is itself breaking for a consumer that relies on feature unification, so this release is the moment it costs nothing extra, for example tokio = { version = "1", features = [ "rt", "sync" ] } with [dev-dependencies] tokio = { version = "1", features = [ "macros", "rt" ] } and a changelog line. Optional: the tracker enables all of these itself, and keeping them is harmless.
…gacy shutdown API 752fc2e docs(pr-reviews): [#2803] stamp the round 4 log entry at its last reply (josecelano-bot) db644e5 docs(pr-reviews): [#2803] state only what ran in the audit record (josecelano-bot) f46af57 docs(pr-reviews): [#2803] correct the review audit record (josecelano-bot) 21fd021 docs(issues): [#2801] correct the stamps and wording of the SI-19 spec (josecelano-bot) fbef08d docs(pr-reviews): [#2803] add the review audit record (josecelano-bot) 4b90bc8 docs(issues): [#2801] reconcile the SI-19 spec with the second review (josecelano-bot) d8436d5 docs(issues): [#2801] require the implementation completion review (josecelano-bot) 4026002 docs(issues): [#2801] address review of the SI-19 specification (josecelano-bot) 2da190d docs(issues): [#2801] add specification to remove the legacy shutdown API (josecelano-bot) 6cec1c3 docs(issues): refresh SI-19 draft after SI-18 completion (josecelano-bot) Pull request description: Specification-only pull request for #2801 (SI-19, roadmap row 19 of EPIC #1488). Related to #2801. It contains no implementation. ## Summary - Opens SI-19 as issue #2801: the breaking removal of what SI-18 (#2751) deprecated, namely the `Halted`-based shutdown API, the legacy start/stop entry points, the root `HaltSignal` and `NestedServerTask`, and library-level OS-signal subscriptions. The `Started` API stays. - Refreshes the draft after SI-18 closed: the start gate carries evidence for each item, checked against `develop` at `1df1ecdf0`. - Records the maintainer's approval (chat, 2026-11-10) that ends the `torrust-server-lib` 0.5.x window, with 0.6.0 as the library removal release and 4.0.0 as the root release target. - Records that the last gate item is met: `torrust-server-lib` 0.6.0 is published (torrust/torrust-server-lib#5, PR torrust/torrust-server-lib/pull/6, `max_version` 0.6.0 on crates.io). It is an external dependency this task waits for. The bump lands with the removals in T4, because 0.6.0 removes `Halted` and an earlier bump would not build. - Splits the supervisor consolidation out of scope (a refactor, and Removal Constraint 1 forbids widening the breaking surface). - Adds the template sections (architectural decisions, design and ownership review, implementation plan T1 to T6, commit points, progress tracking, verification plan, acceptance verification, risks, completion review, references) and renames `verification.md` to `manual-verification-evidence.md`. - Adds the review audit record `docs/pr-reviews/pr-2803-review/PR-REVIEW.md`. ## Files touched - `docs/issues/open/2801-1488-si-19-remove-legacy-shutdown-api/` (moved from `docs/issues/drafts/1488-si-19-remove-legacy-shutdown-api/`): `ISSUE.md` and `manual-verification-evidence.md`. - `docs/issues/open/1488-overhaul-tracker-shutdown/ISSUE.md`: roadmap row 19 now links the open spec. - The closed SI-23 and SI-24 specs: related-artifact paths updated to the new location. - `docs/pr-reviews/pr-2803-review/PR-REVIEW.md`: the audit of the reviews of this pull request. ## Validation - `linter markdown`, `linter cspell` and the pre-commit hooks (including the frontmatter validator) pass; the diff contains only Markdown files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ACKs for top commit: josecelano: ACK 752fc2e da2ce7: ACK 752fc2e — the one new audit commit fast-forwards db644e5 and closes F19, its F21 row, details, reply and log stamps match the captured forge data, the audit validator's logic and the verbatim commit-id check pass at this head, and the merge into develop af8d84d is conflict-free Tree-SHA512: c170668b8a6fa64a6bfea630dba6de4e0e97128c835605b62b64a4a4838824c17a189e188ddd342ee532d123b9b4eda5a8679d7cedc3823c986872cfdba483a5
…rary OS signals 5103f88 docs(pr-reviews): [#2807] record the seventh review round in the audit (josecelano-bot) 5a15d70 docs(pr-reviews): [#2807] record the sixth review round in the audit (josecelano-bot) 3b43612 docs(pr-reviews): [#2807] record the fifth review round in the audit (josecelano-bot) 703e342 docs(pr-reviews): [#2807] record the fourth review round in the audit (josecelano-bot) be0fd0d docs(pr-reviews): [#2807] correct the audit verification of the 0.6.0 sweep (josecelano-bot) 91e1bc6 docs(issues): [#2801] stamp the second round log entry at its commit minute (josecelano-bot) 3f2b357 docs(issues): [#2801] describe the verification configuration as a reduced copy (josecelano-bot) 17b006b docs(issues): [#2801] cite the merge of the torrust-server-lib PR in the evidence (josecelano-bot) 584089e docs(pr-reviews): [#2807] align the audit with the bytes and record the second round (josecelano-bot) 0557f31 docs(issues): [#2801] state only what the evidence shows about the 0.6.0 publication (josecelano-bot) 8d02004 docs(issues): [#2801] log the second review round in the SI-19 spec (josecelano-bot) 62f4fc4 docs(issues): [#2801] point the spec branch at the implementation branch (josecelano-bot) 21b251e docs(issues): [#2801] say that live specs still describe the removed API (josecelano-bot) decf74b docs(issues): [#2801] record the ten signal verification invocations (josecelano-bot) 9b74ade docs(issues): [#2801] paste the real live-spec search and its full output (josecelano-bot) f742998 docs(pr-reviews): [#2807] add the review audit record (josecelano-bot) 2a7aaaa docs(issues): [#2801] correct the SI-19 spec and evidence after the review (josecelano-bot) eba3e38 refactor: [#2801] cover the token-aware server owner and fix the docs left by the removal (josecelano-bot) d816542 docs(issues): [#2801] record the verification evidence of the legacy shutdown API removal (josecelano-bot) 553088f docs(shutdown-process): [#2801] record the removal of the legacy shutdown API (josecelano-bot) bc3548b refactor: [#2801] remove HaltSignal and NestedServerTask and bump torrust-server-lib to 0.6.0 (josecelano-bot) ef59834 refactor(axum-servers): [#2801] remove the legacy Halted shutdown API (josecelano-bot) c39f46b refactor(udp-server): [#2801] remove the legacy Halted shutdown API (josecelano-bot) Pull request description: Implements #2801 (SI-19, roadmap row 19 of EPIC #1488): the breaking removal of what SI-18 (#2751) deprecated. Closes #2801. ## Summary - Removes the `Halted`-based shutdown API: `axum-server`'s `graceful_shutdown`; the legacy `start`, `start_with_health_check`, `stop`, `Running` states, aliases (`RunningHttpServer`, `RunningApiServer`, `RunningUdpServer`), `Running::new`, `halt_task`, `rx_halt` and `RunningServer` of the HTTP, REST API, health-check API and UDP servers; the legacy UDP launcher adapter (`Launcher::run_with_graceful_shutdown`, `Spawner::spawn_launcher`, `LaunchRequest`); and the root `HaltSignal` and `NestedServerTask`. - Removes the last library-level OS-signal subscription (`global_shutdown_signal` in the UDP launcher). Only executables (`src/main.rs`, `src/console/profiling.rs`, the standalone examples) and the `tracker_client check` monitor subscribe to signals. - Bumps `torrust-server-lib` to 0.6.0 (published; removal in torrust/torrust-server-lib#5 and PR torrust/torrust-server-lib/pull/6) in every `Cargo.toml`, and drops the dependency from `axum-server`, which no longer uses it. - Removes the tests that only covered removed paths. Each package keeps the token-aware tests for the same behavior; the token-path drain test of the HTTP server asserts that the server keeps its bind address. - Updates the migration guide, the task inventory and the shutdown-process README, and records the verification in `manual-verification-evidence.md`. - Out of scope, left in place: the now-unused public `Error::Stop`, `StartupNotification` and `StartupNotificationDropped` variants of the HTTP and REST servers (not deprecated), and the supervisor consolidation (a separate follow-up). ## Verification - `cargo check --workspace --all-targets`: warning-free. `cargo test --workspace` before the review rounds: 3947 passed, 0 failed. The review rounds since then delete one duplicate HTTP test and add one owner-abort test (`manager`); the package tests of the six changed packages passed again at the second round head (245 passed; the run recorded in review 5845706883). - A search for the removed symbols in `.rs` and `.toml` files finds nothing. - SIGINT and SIGTERM sent to the direct PID of the tracker and of the four standalone examples: each exits 0 in about 0.1 s with one shutdown sequence and no listener left. - Container: the image builds with its 1778 in-image tests passing (a first build failed once on a flaky health-check API test that passes on rerun, recorded in the evidence); `docker stop -t 35` and SIGINT exit 0 in about 0.2 s. - `linter all`: markdown, cspell, links, YAML, TOML, rustfmt and shellcheck passed on the last run. The evidence is in `docs/issues/open/2801-1488-si-19-remove-legacy-shutdown-api/manual-verification-evidence.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ACKs for top commit: da2ce7: ACK 5103f88 — the round-7 audit entries match the forge record apart from one non-blocking nit and pass the validator's checks, every other path is byte-identical to the previous head, and the merge into develop is conflict-free josecelano: ACK 5103f88 Tree-SHA512: 5cf7a97a7c906b44f44a9a58c6e501a98aa14f8cc4ee232943b071b8ae5aff31a8ef39d29df9acd1d45d0fd402c3432c1531bdc6eb5f390a75e565d66100cd00
Closes #5
Removes the legacy shutdown API deprecated since 0.5.0 and prepares release 0.6.0.
torrust_server_lib::signals:Halted,shutdown_signal,shutdown_signal_with_message,global_shutdown_signal, and their test.Startedandcancellation_signalare kept.tokiosignalfeature and thederive_moredependency (Cargo.lockrefreshed).CHANGELOG.mdhas a## 0.6.0/### Removedsection pointing to the 0.5.0 migration steps.Not published to crates.io: the maintainer publishes 0.6.0 as part of torrust-tracker SI-19 (EPIC 1488).
Checks:
linter all,cargo clippy --all-targets -- -D warnings,cargo testpass.🤖 Generated with Claude Code