Repository navigation
test(hung-component-tracker): [#2847] verify the hung-component abort on a real tracker binary - #2911
Conversation
… into the library `app::run_until_shutdown_signal` now waits for SIGINT or SIGTERM, begins the shutdown, waits for every component up to the process deadline and maps the outcomes to the exit code. `main.rs` keeps only CLI parsing, startup and the startup-failure report, so a test-only executable can share the exact sequence. The moved events pin `target: "torrust_tracker"`, so their log lines are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t abort on a real tracker binary Add the test-only `torrust-tracker-hung-component-tracker` crate (not published, not a default member). Its binary starts the real tracker, adds one component that never stops and ignores its cancellation token, and runs the shared shutdown sequence. Its integration test signals the child with SIGTERM and SIGINT under a 4 s deadline and checks exit code 1 within the deadline plus a margin, and that the hung component and the health check API are aborted and named as incomplete. The test-design review is recorded in the issue folder. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…omponent abort M1 and M2 run the test binary with a 4 s deadline and SIGTERM or SIGINT: exit code 1 about 4.01 s after the signal, with hung_component and health_check_api aborted at the deadline (M3). M4 runs the shipped binary before and after the shutdown-sequence refactor: exit code 0 and identical normalized logs, targets included. Full logs are in evidence/. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ng-component test application-jobs.md: main calls app::run_until_shutdown_signal, and a component that never completes is aborted at the deadline together with the health check API, verified by the hung-component-tracker crate. packages.md lists the new crate. The SI-28 spec records T1 to T5 as done. Co-Authored-By: Claude Opus 5.5 <[email protected]>
60ce8e9 to
5064d17
Compare
|
ACK 5064d17 |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the shared shutdown refactor and hung-component regression-test additions.
No open issues 🎉
What changed in this PR
Implements #2847 (SI-28 of the shutdown overhaul in #1488) with process-level regression tests for hung-component shutdown. The test executable shares the production shutdown sequence without adding fault-injection hooks to the shipped binary.
Changes:
- Moves signal handling and shutdown reporting into
app::run_until_shutdown_signal, preserving log targets. - Adds a non-default, unpublished test crate covering SIGTERM and SIGINT, deadline timing, exit code 1, and aborted-component reporting.
- Records test-design and manual verification evidence, and updates architecture and package documentation.
| File | Description |
|---|---|
src/main.rs |
Delegates shutdown to the shared library function. |
src/app.rs |
Hosts shared signal handling, shutdown, and exit reporting. |
packages/hung-component-tracker/tests/hung_component_abort.rs |
Tests deadline aborts and failure exits for both signals. |
packages/hung-component-tracker/tests/common/mod.rs |
Manages child configuration, output, signaling, and cleanup. |
packages/hung-component-tracker/src/main.rs |
Starts the tracker with one never-completing component. |
packages/hung-component-tracker/README.md |
Documents the test executable and its usage. |
packages/hung-component-tracker/Cargo.toml |
Defines the unpublished test crate and dependencies. |
docs/packages.md |
Adds the crate to the package catalog. |
docs/issues/open/2847-1488-si-28-verify-hung-component-abort/test-design-review.md |
Records test design, timing rationale, and mutation checking. |
docs/issues/open/2847-1488-si-28-verify-hung-component-abort/manual-verification-evidence.md |
Records signal runs, before/after comparison, and coverage limits. |
docs/issues/open/2847-1488-si-28-verify-hung-component-abort/ISSUE.md |
Updates implementation progress and verification status. |
docs/issues/open/2847-1488-si-28-verify-hung-component-abort/evidence/m4-before.log |
Preserves pre-refactor graceful-shutdown evidence. |
docs/issues/open/2847-1488-si-28-verify-hung-component-abort/evidence/m4-after.log |
Preserves post-refactor graceful-shutdown evidence. |
docs/issues/open/2847-1488-si-28-verify-hung-component-abort/evidence/m2.log |
Preserves SIGINT deadline-abort evidence. |
docs/issues/open/2847-1488-si-28-verify-hung-component-abort/evidence/m1.log |
Preserves SIGTERM deadline-abort evidence. |
docs/architecture/application-jobs.md |
Describes shared shutdown, deadline aborts, and their limits. |
Cargo.toml |
Registers the test crate as a workspace member. |
Cargo.lock |
Records the new workspace package’s dependencies. |
Review effort: Balanced
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 5064d177e988271346669fd2dd17be76f1299d7c. Recomputed from the bytes at this head, against the merge base 09396a378 (round 1 measured the same patches on a544a58fb); git merge-tree against develop 09396a378 returns this head's own tree, which descends from it; the newer develop tip with the #2910 merge is not in this workspace, so that merge was not computed here.
Rebase: git range-diff marks all four patches =, the diff and the messages are byte-identical to round 1, and a544a58fb..09396a378 touches three planning and review files, none in this change. New since round 1: an automated review with no inline comment and an ACK comment; no thread exists and nothing needs a reply, so no audit record is due.
Process: test coverage with a refactor, checked against the add-workspace-member, commit-changes, open-pull-request, write-unit-test and write-markdown-docs skills and the spec's commit points; membership without default membership, admission under packages/ and the test-design review in the test commit hold.
The change against its claim: the moved shutdown functions match the old main.rs except for five target pins, and the inline sequence matches run_until_shutdown_signal. spawn_with adds the stop-last edge, so health_check_api waits for the later hung_component and both are aborted at P; the deadline starts inside wait_for_all, after the signal. The 20 quoted log lines are in the committed logs; M4 recomputes to 145 identical lines.
Consistency and hygiene: 26 relative links resolve; no new spelling words; Conventional subjects in the [#2847] form; author identity equals committer identity; each commit carries an attribution footer, which no rule in the tree forbids; git diff --check is clean; the PR-branch commit-id check prints nothing; one closing keyword, in the description, for the implemented issue.
Findings, carried over with unchanged bytes and lines: F1 (Minor) the release skill's bump steps miss the new root-crate requirement; F2 (Minor) a stale-build surprise said to be in the evidence is not; F3 (Minor) the discarded M4 run's stated cause cannot produce its order; F4 (Minor) src/AGENTS.md, packages/AGENTS.md and the task inventory are stale; F5 (Nit) no # Panics; F6 (Nit) the flag drops the shipped validation. None blocks.
Checked, no finding: budget validation, the environment scrub, kill and reap on every path, the mutation claim, the #![cfg(unix)] test root.
Checks
On the loop's compute node at this head, against the merge base 09396a378 (receipt server-gates-kranich-1099): the repository's pre-commit gate and lint roster exit 0 (52 s wall). The workspace runs were taken at the pre-rebase head 60ce8e98e, whose four patches git range-diff shows identical to this head's and whose tree differs from this head's only in three documentation files the rebase brought in from develop. In a fresh per-PR target directory there, cargo test --workspace passes 4187 tests with 0 failed and 5 ignored across 126 binaries (373 s wall), and cargo clippy --workspace --all-targets --all-features -- -D warnings is clean (67 s wall). cargo deny check exits 5 for the same license rejections and advisories as develop (RUSTSEC-2023-0071 for rsa, libsqlite3-sys, astral-tokio-tar), plus RUSTSEC-2026-0543 (chrono unmaintained), which comes from chrono 0.4.45 already in develop's lockfile; this pull request's lockfile change only adds its own package, so it changes nothing in that result. git merge-tree against the current develop 61e3fedcf writes a clean tree; the #2910 merge touches only documentation files outside this change. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "Package Coverage Regression: in_progress/pending; Package Coverage (torrust-tracker): completed/success; Docker E2E: completed/skipped; Layer Boundary Bans: completed/success; Shipped Features: completed/success; Unit (stable): in_progress/pending; Documented Clippy Allows: completed/success; Workspace Packaging: completed/success; Unit (nightly): in_progress/pending; Test (Docker) (release): in_progress/pending; Discover Package Coverage: completed/success; Generate Coverage Report: completed/success; Build on windows-latest (nightly): completed/success; Build on windows-latest (stable): completed/success; Build on macos-latest (stable): queued/pending; Build on macos-latest (nightly): queued/pending; Build on ubuntu-latest (stable): completed/success; Build on ubuntu-latest (nightly): completed/success; Docs Lint: completed/success". At posting, develop is 61e3fedcf.
|
ACK 5064d17 — the four rebased patches are byte-identical to the reviewed ones, the moved shutdown code matches the old main.rs apart from its pinned target, the test's assertions trace to the supervisor's stop-last edge and the committed evidence logs, and the head descends cleanly from develop 09396a3 |
|
ACK 5064d17 |
… release version bumps Steps 2 and 9 of the release-new-version skill named only the requirement in packages/e2e-tools; packages/hung-component-tracker adds a second one. Name both and give the command that lists them, so a bump cannot leave one behind. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ignal and the test CLI's flag run_until_shutdown_signal is public API now and can panic when a signal handler cannot be installed or the SIGTERM stream closes; add the `# Panics` section. The hung-component-tracker CLI comment said its flag matched the shipped one; it lacks the shipped check that rejects an empty path, so say so. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d list the new crate src/AGENTS.md still put the signal wait and job cancellation in main.rs, and the shutdown task inventory said main.rs holds the app container past wait_for_all; both now live in app::run_until_shutdown_signal. packages/AGENTS.md lists hung-component-tracker among the developer tools outside the layers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…iscarded M4 run's cause The evidence now records how building the pre-refactor binary into the shared target directory left a stale library build, and how each binary copy of V1 to V4 was confirmed (copy order, sizes, and nm finding run_until_shutdown_signal only in the branch binaries). The discarded M4 run's stated cause, lagging date stamps, cannot produce the reported order; its cause is recorded as unknown, and the spec's progress log is corrected and logs review round 1 of PR 2911. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Records da2ce7's findings F1 to F6 (non-blocking) and Copilot's review with no finding, the fix commit of each, the reply URLs, and the processing order: fixes committed, threads replied to and resolved, then one push. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
ACK 3f99f40 |
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 3f99f404df2dcb6418434057ea895c60176b18c6. Recomputed from the bytes at this head, against the merge base 09396a378; git merge-tree against develop a14a41ad4 writes a clean tree, and the one file both sides change, docs/packages.md, is changed in different tables.
Process: five commits fast-forward the reviewed 5064d177e, all documentation or doc comments, checked against process-pr-review (the new audit record), commit-changes, open-pull-request and the release skill they edit. The earlier commits are unchanged.
The change against its claim: each commit does what its message says, and every round-1 finding is fixed at this head. F1: both release bumps name the two manifests, and the listing command finds exactly those two. F2: the evidence records the stale build, the copy order and the nm check that tells the binaries apart. F3: the cause is recorded as unknown, and the 16:47 log entry is corrected with a marked note. F4: src/AGENTS.md, packages/AGENTS.md and both task-inventory places name run_until_shutdown_signal and the crate. F5: a # Panics section. F6: the comment states the missing empty-path check.
Consistency: the audit's six rows match the six threads; each reply sits on its own thread and names the fix commit's subject; the validator's checks pass offline (6 rows, 0 failures) with comments from the capture and subjects from 09396a378..HEAD, and its current-tree verification commands reproduce. 23 relative links resolve; no new spelling words.
Hygiene: Conventional subjects in the [#2847] form, author identity equals committer identity, bodies match their diffs; each commit carries an attribution footer, which no rule in the tree forbids; git diff --check is clean; the PR-branch commit-id check prints nothing; the only closing keyword is in the unchanged description.
Findings: none. F1 to F6 are fixed and their threads resolved.
Checked, no finding: the marked in-place correction of the progress log (the template asks only to append one line per update); the audit frontmatter follows its siblings; develop since the base touches no manifest, lockfile or source file of this change.
Checks
On the loop's compute node at this head, against the merge base 09396a378 (receipt server-gates-kranich-1105): the repository's pre-commit gate and lint roster exit 0 (257 s wall), and the audit validator passes the record (6 rows, 1 log entry, 0 failures). In a fresh per-PR target directory, cargo test -p torrust-tracker-hung-component-tracker -p torrust-tracker passes 293 tests with 0 failed across 21 binaries (72 s wall), and clippy for both packages with -D warnings is clean (19 s wall); the round's Rust changes are doc comments only, run here because they can trip documentation lints. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "Package Coverage (torrust-tracker): in_progress/pending; Docker E2E: completed/skipped; Workspace Packaging: completed/success; Shipped Features: completed/success; Unit (nightly): in_progress/pending; Layer Boundary Bans: completed/success; Unit (stable): in_progress/pending; Documented Clippy Allows: completed/success; Test (Docker) (release): in_progress/pending; Build on ubuntu-latest (stable): completed/success; Build on macos-latest (stable): completed/success; Build on macos-latest (nightly): completed/success; Build on windows-latest (stable): in_progress/pending; Build on ubuntu-latest (nightly): completed/success; Build on windows-latest (nightly): completed/success; Docs Lint: completed/success; Discover Package Coverage: completed/success; Generate Coverage Report: in_progress/pending". At posting, develop is a14a41ad4.
There was a problem hiding this comment.
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
2 open issues
Review effort: Lite
|
ACK 3f99f40 |
…thout copying it and fail on a reader panic The readiness wait copied the whole captured output on every 10 ms poll; it now checks it under the lock. The output reader threads' join results were discarded, so a reader panic would surface later as missing log lines; the normal paths now fail the test with a direct message, while Drop, which also runs during unwinding, still ignores them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… and R2 for PR 2911 Adds the two Copilot findings on the test helper, their fix commit and reply URLs to the audit, and logs the round in the SI-28 spec. Co-Authored-By: Claude Opus 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at c9889121fc4694194fa9a105ac6e04c7301c211a. Recomputed from the bytes at this head, against the merge base 09396a378; git merge-tree against develop a14a41ad4 writes a clean tree, and develop touches none of the three files this round changes.
Process: two commits fast-forward the reviewed 3f99f404d: a fixture change for two automated-review findings (R1, R2) and their audit rows, checked against process-pr-review, write-unit-test and commit-changes.
The change against its claim: both commits do what their messages say. The readiness poll now checks the output under the lock (output_contains, its only caller the poll), and output() still serves the panic messages and the final ChildExit. join_readers asserts each join on the exit and timeout paths; when it fires, drain(..) has already emptied the reader list, so Drop, which keeps ignoring join results, cannot panic a second time while unwinding. F1 to F6 stay fixed; their bytes are unchanged.
Consistency: the audit adds R1 and R2 with Minor (inferred), the template's form for a severity derived from prose; both replies sit on their own threads and name the fix commit's subject; all eight threads are resolved. The validator's checks pass offline (8 rows, 2 log entries, 0 failures), and the record's new verification commands reproduce.
Hygiene: Conventional subjects in the [#2847] form, author identity equals committer identity, bodies match their diffs; each commit carries an attribution footer, which no rule in the tree forbids; git diff --check is clean; the PR-branch commit-id check prints nothing; the only closing keyword is in the unchanged description.
Findings: F7 (Suggestion) a read error still ends a reader silently, so a clean join does not mean complete output; F8 (Nit) the # Panics section of signal_and_wait_for_exit does not name the new failure. Neither blocks.
Checked, no finding: on the timeout path a reader panic now replaces the timeout message, a fair priority since the output is incomplete; the new lines stay within the formatter's widths.
Checks
On the loop's compute node at this head, against the merge base 09396a378 (receipt server-gates-kranich-1115): the repository's pre-commit gate and lint roster exit 0 (194 s wall), and the audit validator passes the record (8 rows, 2 log entries, 0 failures). In the per-PR target directory, cargo test -p torrust-tracker-hung-component-tracker -p torrust-tracker passes 293 tests with 0 failed across 21 binaries (27 s wall), and cargo clippy for both packages with --all-targets -- -D warnings is clean (1 s wall, an incremental check that re-checked the changed crate, torrust-tracker-hung-component-tracker, and its test targets). The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "Package Coverage (torrust-tracker): in_progress/pending; Docker E2E: completed/skipped; Shipped Features: queued/pending; Unit (stable): queued/pending; Layer Boundary Bans: queued/pending; Unit (nightly): queued/pending; Workspace Packaging: queued/pending; Documented Clippy Allows: queued/pending; Build on macos-latest (nightly): queued/pending; Build on windows-latest (stable): in_progress/pending; Build on ubuntu-latest (stable): completed/success; Build on macos-latest (stable): queued/pending; Build on windows-latest (nightly): in_progress/pending; Build on ubuntu-latest (nightly): completed/success; Discover Package Coverage: completed/success; Generate Coverage Report: in_progress/pending; Test (Docker) (release): in_progress/pending; Docs Lint: completed/success". At posting, develop is a14a41ad4.
…rror and document the reader panic A read error or a non-UTF-8 line ended an output reader silently, so its join succeeded on incomplete output; it now panics, which join_readers reports. The `# Panics` section of signal_and_wait_for_exit names the reader panic. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r PR 2911 Adds da2ce7's two non-blocking findings on the test helper, their fix commit and reply URLs to the audit, and logs the round in the SI-28 spec. Co-Authored-By: Claude Opus 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 58c32fb4c2d6e3fec93e2397e645070a3981b4f4. Recomputed from the bytes at this head, against the merge base 09396a378; git merge-tree against develop a14a41ad4 writes a clean tree, and develop touches none of the three files this round changes.
Process: two commits fast-forward the reviewed c9889121f: the fixes for F7 and F8 and their audit rows, checked against process-pr-review, write-unit-test and commit-changes.
The change against its claim: both commits do what their messages say. F7 is fixed: the reader now does line.expect("read a line of the child output"), so a read error or a non-UTF-8 line panics the reader, which join_readers reports. The panic comes before the lock is taken, so it cannot poison the output mutex, and read_until retries interrupted reads, so a signal does not trigger it. F8 is fixed: the # Panics section of signal_and_wait_for_exit names the reader panic. F1 to F6 stay fixed; their bytes are unchanged.
Consistency: the audit adds F7 (Suggestion) and F8 (Nit), equal to the comment brackets; both replies sit on their own threads and name the fix commit's subject; all ten threads are resolved. The validator's checks pass offline (10 rows, 3 log entries, 0 failures), and the record's new verification commands reproduce.
Hygiene: Conventional subjects in the [#2847] form, author identity equals committer identity, bodies match their diffs; each commit carries an attribution footer, which no rule in the tree forbids; git diff --check is clean; the PR-branch commit-id check prints nothing; the only closing keyword is in the unchanged description.
Findings: none. F1 to F8 are fixed and their threads resolved.
Checked, no finding: a reader panic during the readiness wait still surfaces through that wait's own timeout, with the reader's message in the captured test output; the new comment and # Panics lines stay within the formatter's widths.
Checks
On the loop's compute node at this head, against the merge base 09396a378 (receipt server-gates-kranich-1121): the repository's pre-commit gate and lint roster exit 0 (141 s wall), and the audit validator passes the record (10 rows, 3 log entries, 0 failures). In the per-PR target directory, cargo test -p torrust-tracker-hung-component-tracker -p torrust-tracker passes 293 tests with 0 failed across 21 binaries (27 s wall), and cargo clippy for both packages with --all-targets -- -D warnings is clean (an incremental check that re-checked torrust-tracker-hung-component-tracker, the crate this round changes). F7's fix checked against the bytes at posting: line 251 of packages/hung-component-tracker/tests/common/mod.rs reads let line = line.expect("read a line of the child output");. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "". At posting, develop is a14a41ad4.
|
ACK 58c32fb |
…1488 row 25 done PR #2911 merged and issue #2847 is closed. Move the SI-28 spec to docs/issues/closed/, set status done, related-pr 2911 and the new spec path, tick the CI acceptance criterion (both tests ran in the PR's Unit stable and nightly jobs), and mark row 25 of the EPIC roadmap Done with the archived link. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…PIC #1488 row 25 done 5d1efbf docs(pr-reviews): [#2847] record Copilot's round 3 for PR 2929 and correct the F4 severity (josecelano-bot) 635b35d docs(pr-reviews): [#2847] record Copilot's round 2 findings F2 to F4 for PR 2929 (josecelano-bot) eb6e48b docs(pr-reviews): [#2847] state the medium-to-minor severity mapping in the PR 2929 audit (josecelano-bot) c7578ae docs(pr-reviews): [#2847] add review audit for PR 2929 round 1 (josecelano-bot) 41b031b docs(issues): [#2847] quote the evidence file's last-updated-utc timestamp (josecelano-bot) 558de61 chore(issues): [#2847] archive closed issue #2847 spec and mark EPIC #1488 row 25 done (josecelano-bot) Pull request description: Close-out of issue #2847 (SI-28 of EPIC #1488), after PR #2911 merged. Docs only. - Moved the spec folder `2847-1488-si-28-verify-hung-component-abort` from `docs/issues/open/` to `docs/issues/closed/`. - Updated its frontmatter: `status: done`, `related-pr: 2911`, the new `spec-path`, and the evidence file's `issue-spec`. - Ticked the "Test runs in CI" acceptance criterion. Both tests in `packages/hung-component-tracker/tests/hung_component_abort.rs` ran and passed in the Unit (stable) and Unit (nightly) jobs of PR #2911. - Marked row 25 of the EPIC #1488 roadmap as Done, with the archived link. - Verified that issue #2847 is `CLOSED` on GitHub. Pre-commit hooks passed, `linter all` included. The PR #2909 review record still names the old `open/` path; it is a historical record, so it is left unchanged. Refs #2847, #1488 🤖 Generated with [Claude Code](https://claude.com/claude-code) ACKs for top commit: josecelano: ACK 5d1efbf da2ce7: ACK 5d1efbf — the SI-28 spec folder is archived whole with its frontmatter, links and EPIC row 25 recomputed correct at this head, the audit's four rows match their threads and pass the validator's logic offline, and the merge with develop 8d932f3 is clean Tree-SHA512: 11e1981a5469106008c4bd4656e0c51f8fc71e02424ebca7a78938c94513c4dfbe1edf5635505f19e09a1673c6e4acb05cd2d16da8729fe906f54883f7526869

Summary
Implements SI-28 of EPIC #1488 as specified in the spec merged by PR #2909: an automated executable-boundary test that a component that never stops is aborted at the process shutdown deadline, and the process exits with code 1.
Closes #2847
Changes
wait_for_shutdown_signalandreport_shutdownmove fromsrc/main.rsintosrc/app.rs, behind the new publicapp::run_until_shutdown_signal(app_container, jobs) -> ExitCode(wait forSIGINT/SIGTERM,begin_shutdown,wait_for_all(P), map outcomes to the exit code).main.rskeeps only CLI parsing, startup and the startup-failure report. The moved events pintarget: "torrust_tracker", so their log lines are unchanged, target included.packages/hung-component-tracker(publish = false, workspace member, not a default member, so it never enters the container image or its test archives). Its binary starts the real tracker, reserves and spawnshung_component(a future that never completes and ignores its cancellation token), then callsapp::run_until_shutdown_signal. The shipped crate and binary contain no test code, feature or hook.packages/hung-component-tracker/tests/hung_component_abort.rs, one case per signal,deadline_in_secs = 4with drains of 1 s. It asserts the signal was handled, exit code 1, exit no earlier thanPand withinP+ 3 s,hung_componentandhealth_check_apilogged as aborted after the deadline, and exactly those two inincomplete_components. The child helper kills and reaps the child on every path. The prose-first test-design review is intest-design-review.md, reviewed by the maintainer before commit.manual-verification-evidence.md, logs inevidence/: M1/M2 exit code 1 about 4.01 s afterSIGTERM/SIGINT; M3 the health check API is aborted with the hung component and does not delay the exit; M4 the shipped binary before and after the refactor exits 0 with identical normalized logs (145 lines). The case-4 limit (a component blocking its thread is not stopped by the abort) is stated.docs/architecture/application-jobs.mddescribes the shared shutdown function and the hung-component abort;docs/packages.mdlists the crate. No shutdown doc called the path unverified.Validation
cargo test -p torrust-tracker --all-targets --all-features: all green, including the native-tracker shutdown tests in roottests/(they cover the refactor).cargo test -p torrust-tracker-hung-component-tracker: both cases pass (about 4 s each). Mutation check: withhung_componentreturningCompleted, both fail on the exit code (status 0).cargo clippy --all-targets --all-features -- -D warnings,linter all,cargo machete,cargo metadata,docker build --target recipe --file Containerfile .: pass.Commits
After merge, a close-out PR moves the spec to
docs/issues/closed/and marks row 25 of EPIC #1488 done.🤖 Generated with Claude Code