Skip to content

refactor(servers): [#2844] remove unused public shutdown error variants - #2858

Merged
josecelano merged 6 commits into
torrust:developfrom
josecelano-bot:2844-remove-unused-error-variants
Nov 14, 2026
Merged

josecelano merged 6 commits into
torrust:developfrom
josecelano-bot:2844-remove-unused-error-variants

Conversation

@josecelano-bot

@josecelano-bot josecelano-bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Implements #2844 (SI-25 of EPIC #1488): removes the nine public shutdown error variants that nothing constructs or matches, before the first publish (#2583).

  • axum-http-server::server::Error and axum-rest-api-server::server::Error: StartupNotificationDropped, StartupNotification, Stop.
  • udp-server::UdpError: StartupNotification, Launcher, FailedToStartOrStopServer, plus the stale doc comment.

Versioning (maintainer decision): no bump; packages stay at 0.1.0, the removal ships with the first publish's release notes.

Verification: workspace check warning-free, cargo test --workspace 4024 passed, linter all and pre-push checks green; manual M1-M3 (grep, SIGTERM exit 0 and rebind, bind-error exit 1) recorded in manual-verification-evidence.md.

Refs #2844 (the close-out PR moving the spec follows separately).

🤖 Generated with Claude Code

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 22641fc6b8e5b1a6a731a969f3aff12ea281a84f. Recomputed from the bytes at this head, against the merge base 24230dd01; git merge-tree against develop 24230dd01 writes the head's own tree with no conflict, since develop is the merge base.

Process: an implementation PR of an open spec, under create-issue (with its evidence template), commit-changes and open-pull-request. The spec-only PR merged first (#2848), as the ticked checkpoint says.

The change against its claim: the nine variants are gone, and nothing constructed or matched them at the merge base (a scripted search finds only the definitions and the udp-server doc comment, and no Self::, ::Stop or Launcher { source form). The remaining variants are built only on startup paths, the three packages stay at 0.1.0 and no manifest changes. The evidence's M1 command, rerun here, exits 1 at this head. Two doc comments still describe what was removed (F1, F3), and the M2 and M3 evidence records results without the commands behind them (F4).

Consistency: no link is added; in-progress is a status the frontmatter validator accepts for an open spec; the new words already appear across docs/.

Hygiene: two Conventional commits with [#2844], author = committer, empty bodies (allowed); each carries one attribution footer line (no rule in the tree on it), and the description carries one attribution footer line too. git diff --check is clean, the skill's PR-branch commit-id check prints nothing, and the closing-keyword scan finds no match in the title, the description or the commit messages. The title is not a Conventional Commits line (F2).

Findings

  • F1 Major: the HTTP server Error doc still lists the removed startup and stop failures.
  • F2 Major: the title, which becomes the merge subject, has no type(scope):.
  • F3 Minor: the REST API Error doc still says "or stopping".
  • F4 Minor: M2 and M3 lack commands, stamps and output; "five listeners" where the config starts six.
  • F5 Nit: related-pr is still null.
  • F6 Nit: the new progress-log entry follows a blank line.

Checked, no finding: the Refs link (the spec puts its completion review before closing); T2 and T3 in one commit (commit points are opportunities, and deviations belong to the completion review, still open); the EPIC row staying Planned (siblings update it at close-out); each enum now holding only Bind, Listener and Registration; the M3 message, which matches the Bind text.

Checks

On the loop's compute node at this head, against the merge base 24230dd01 (receipt server-gates-kranich-848): the repository's pre-commit gate and lint roster exit 0; the frontmatter check reports the same 15 errors and 4 warnings at this head as on develop, so the PR adds none. The package tests of the three changed crates (cargo test -p torrust-tracker-axum-http-server -p torrust-tracker-axum-rest-api-server -p torrust-tracker-udp-server, receipt pkgtest-2858-r1) exit 0: 584 passed, 0 failed, wall 127 s. F1 checked against the bytes at posting: packages/axum-http-server/src/server.rs lines 26-37 still describe startup-notification and shutdown failures, while the enum holds only Bind, Listener and Registration. GitHub checks at this head at posting time: "Package Coverage Regression: completed/success; Package Coverage (torrust-tracker-axum-http-server): completed/success; Package Coverage (torrust-tracker-axum-rest-api-server): completed/success; Package Coverage (torrust-tracker-udp-server): completed/success; Generate Coverage Report: completed/success; Discover Package Coverage: completed/success; Docker E2E: completed/skipped; Test (Docker) (release): in_progress/pending; Unit (stable): completed/success; Layer Boundary Bans: completed/success; Shipped Features: completed/success; Workspace Packaging: completed/success; Documented Clippy Allows: completed/success; Unit (nightly): completed/success; Docs Lint: completed/success; Build on ubuntu-latest (nightly): completed/success; Build on macos-latest (nightly): completed/success; Build on macos-latest (stable): completed/success; Build on windows-latest (stable): completed/success; Build on ubuntu-latest (stable): completed/success; Build on windows-latest (nightly): completed/success". At posting, develop is 24230dd01.

Comment thread packages/axum-http-server/src/server.rs Resolved

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.

🟡 Changes recommended

The verification record omits the commands, configuration, and captured output needed to substantiate the shutdown-deadline and same-port restart claims.

1 open issue
What changed in this PR

Implements SI-25 of the shutdown overhaul by removing nine unused public error variants before the affected crates’ first publish. No runtime behavior changes are intended.

Changes:

  • Removes three obsolete variants from each HTTP, REST API, and UDP server error enum.
  • Deletes the stale UDP comment explaining why legacy variants were retained.
  • Updates issue progress and verification evidence, recording the decision to keep versions at 0.1.0.
File Description
packages/​udp-server/​src/​server/​mod.rs Removes three unused variants and the stale legacy-path comment.
packages/​axum-rest-api-server/​src/​server.rs Removes three unused startup/shutdown error variants.
packages/​axum-http-server/​src/​server.rs Removes three unused startup/shutdown error variants.
docs/​issues/​open/​2844-1488-si-25-remove-unused-error-variants/​manual-verification-evidence.md Records variant searches, runtime checks, and automated-check results.
docs/​issues/​open/​2844-1488-si-25-remove-unused-error-variants/​ISSUE.md Updates implementation progress, acceptance criteria, and versioning decision.

Review effort: Balanced

@josecelano-bot josecelano-bot changed the title [#2844] Remove unused public shutdown error variants (SI-25) refactor(servers): [#2844] remove unused public shutdown error variants Nov 13, 2026

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at c33549a907fd7fb8cb5219dd9593eaf2e14d1b17. Recomputed from the bytes at this head, against the merge base 24230dd01; git merge-tree against develop 24230dd01 writes the head's own tree with no conflict.

Process: this round reads the one new commit, c33549a90 (fix(servers): [#2844] update Error docs and verification evidence after review), a fast-forward of 22641fc6b, together with the renamed title and the seven replies.

The change against its claim: F1 is fixed, and the HTTP Error doc now names the startup failures its remaining variants carry. F2 is fixed: the title is refactor(servers): [#2844] remove unused public shutdown error variants. F3, F5 and F6 are fixed. F4 is fixed in substance: M2 and M3 now carry commands, stamps, the six listeners and the bind error, whose text matches src/app.rs:59 and src/main.rs:45. The form of the M2 output block is F8.

Consistency: the cspell:ignore lntu comment covers the one new unknown word (setsockopt is already in the dictionary). MD041 and MD033 are off, so the comment above the heading lints.

Hygiene: author = committer; the new commit carries one attribution footer line (no rule in the tree on it), and the unchanged description carries one attribution footer line too. git diff --check is clean, the PR-branch commit-id check prints nothing, and the closing-keyword scan finds no match in the title, the description or the commit messages.

Findings

  • F7 Minor: all seven threads are answered and resolved, but the head has no audit record.
  • F8 Minor: the M2 block shows edited output as command output.
  • F9 Nit: the spec's last-updated-utc was not moved with its new log entry.

Verdict: COMMENT, with no blocking finding. The hold is F7: the threads were answered without the record process-pr-review asks for before the first reply.

Checked, no finding: the fix type on a commit that changes docs only (the skill prefers no history rewrite during review); the toolchain named as stable with no pin file in the tree; the M3 holder's SO_REUSEADDR, which cannot share a port with a listening socket; the T1 sentence, which matches the base search rerun here.

Checks

On the loop's compute node at this head, against the merge base 24230dd01 (receipt server-gates-kranich-852): the repository's pre-commit gate and lint roster exit 0; the frontmatter check reports the same 15 errors and 4 warnings at this head as on develop, so the PR adds none. The package tests of the three changed crates (cargo test -p torrust-tracker-axum-http-server -p torrust-tracker-axum-rest-api-server -p torrust-tracker-udp-server, receipt pkgtest-2858-r2) exit 0: 584 passed, 0 failed, wall 36 s. F7 checked against the bytes at posting: no path under docs/pr-reviews/pr-2858-review/ exists at this head. GitHub checks at this head at posting time: "". At posting, develop is 24230dd01.

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at c052a435a2739ce1b7e7b4fd3c3d53ff850d78ec. Recomputed from the bytes at this head, against the merge base 24230dd01; git merge-tree against develop 24230dd01 writes the head's own tree with no conflict.

Process: this round reads c052a435a (docs(issues): [#2844] add review audit record and tighten verification evidence), a fast-forward of c33549a90, together with the three replies and resolutions since the last review. The title and the description are unchanged.

The change against its claim: F7 is fixed in substance. docs/pr-reviews/pr-2858-review/PR-REVIEW.md is built from the template, logs the late start, and maps the branch id cited in the earlier replies to its subject (line 149); the three new replies cite the subject. F8 is fixed: the note above the M2 block says what is trimmed, and the two HTTP lines are now separate. F9 is fixed. F1 to F6 stay fixed, and all ten threads have a reply and are resolved.

Audit record: the validator's logic, run offline with the captured comments and the local commit subjects, fails with 8 failures. Rows F1 to F6 give a Source review ID other than the review 5899149477, and the F2 resolution reference is neither a commit subject nor a reply URL (F10). Rows C1 and F7 to F9, all ten reply URLs, the severities and the log order pass.

Hygiene: author = committer; the new commit carries one attribution footer line (no rule in the tree on it), and the unchanged description carries one attribution footer line too. git diff --check is clean, and the closing-keyword scan finds no match. The PR-branch commit-id check prints PR-branch commit id: 22641fc6b, from the F1 row (F10).

Findings

  • F10 Minor: the audit record fails its validator (8 failures), and its F1 row cites a branch commit.
  • F11 Nit: the record's reply time and the three 23:10 stamps do not match the capture and the commit time.
  • F12 Nit: the stamp note promises three stamps per run, but the block shows two.

Verdict: COMMENT, with no blocking finding. The hold is the audit validator, which fails at this head (F10).

Checked, no finding: the record's frontmatter and fields against docs/templates/PR-REVIEW-TEMPLATE.md; the automated reviewer's row C1; the late-start entry the skill asks for; the record's URLs, which the link checker does not fetch because it runs offline.

Checks

On the loop's compute node at this head, against the merge base 24230dd01 (receipt server-gates-kranich-854): the repository's pre-commit gate and lint roster exit 0; the frontmatter check reports the same 15 errors and 4 warnings at this head as on develop, so the PR adds none; the repository's audit validator on pr-2858-review exits 1 (10 rows, 2 log entries, 8 failures), which confirms F10. The package tests of the three changed crates (cargo test -p torrust-tracker-axum-http-server -p torrust-tracker-axum-rest-api-server -p torrust-tracker-udp-server, receipt pkgtest-2858-r3) exit 0: 584 passed, 0 failed, wall 22 s. Read on the forge: all ten review threads are answered and resolved. GitHub checks at this head at posting time: "". At posting, develop is 24230dd01.

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at e6a6ea2f93456a12100844e7c76d706c01538d41. Recomputed from the bytes at this head, against the merge base 24230dd01; git merge-tree against develop 24230dd01 writes the head's own tree with no conflict.

Process: this round reads 0d96324a6 (docs(issues): [#2844] fix audit record ids and stamps after review) and e6a6ea2f9 (docs(issues): [#2844] record round 3 findings in the review audit), both fast-forwards from c052a435a, together with the three replies and resolutions since the last review. The title and the description are unchanged.

The change against its claim: the nine variants are gone and nothing used them. Both Error docs describe only startup failures, and the three packages stay at 0.1.0. The code last changed in c33549a90. The evidence records M1 to M3 with their commands and says what is trimmed. F10 is fixed: rows F1 to F6 carry the review 5899149477, F2 cites its reply URL, and the branch commit is gone. F11 and F12 are fixed. One stamp of the F11 kind remains (F13).

Audit record: the validator's logic, run offline with the captured comments and the local commit subjects, passes (13 rows, 3 log entries, 0 failures). Each of the thirteen threads has one reply on its own thread, a row whose source is that thread, and a resolution.

Hygiene: author = committer on all six commits; each carries one attribution footer line (no rule in the tree on it), and the unchanged description carries one attribution footer line too. git diff --check is clean, the PR-branch commit-id check prints nothing, and the closing-keyword scan finds no match.

Findings

  • F13 Nit: two stamps still disagree with the commits that wrote the text.

Verdict: APPROVE. F13 does not block: it is a stamp that a later commit can correct.

Checked, no finding: the new rows' severities against their source brackets; the 23:30 log entry against the replies (23:30:03 to 23:30:08) and its commit (23:30:33); the ISSUE.md stamp, whose content last changed at 23:06.

Checks

On the loop's compute node at this head, against the merge base 24230dd01 (receipt server-gates-kranich-856): the repository's pre-commit gate and lint roster exit 0; the frontmatter check reports the same 15 errors and 4 warnings at this head as on develop, so the PR adds none; the repository's audit validator on pr-2858-review exits 0 (13 rows, 3 log entries, no failures). The package tests of the three changed crates (cargo test -p torrust-tracker-axum-http-server -p torrust-tracker-axum-rest-api-server -p torrust-tracker-udp-server, receipt pkgtest-2858-r4) exit 0 at 0d96324a6: 584 passed, 0 failed; the one later commit changes only the audit record. F13 checked against the bytes at posting: the round-1 entry at ISSUE.md:161 says 22:55 UTC, while the commit that wrote it is timed 22:52:09. Read on the forge: all thirteen review threads are answered and resolved. GitHub checks at this head at posting time: "". At posting, develop is 24230dd01.

@da2ce7

da2ce7 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

ACK e6a6ea2 — the nine unused shutdown error variants are removed with no remaining use and their docs corrected, the merge against develop is clean, and all thirteen review threads are answered, resolved and recorded with the audit validator passing at this head

@josecelano

Copy link
Copy Markdown
Member

ACK e6a6ea2

@josecelano
josecelano merged commit 9e5d3ff into torrust:develop Nov 14, 2026
24 checks passed
josecelano added a commit that referenced this pull request Nov 14, 2026
…/issues/closed

13404c7 docs(issues): [#2844] address the review of the close-out PR (josecelano-bot)
471fecc chore(issues): [#2844] archive the closed issue spec to docs/issues/closed (josecelano-bot)

Pull request description:

  Close-out of #2844 (SI-25, roadmap row 22 of EPIC #1488). Closes #2844. Documentation only.

  - Moved the spec from `docs/issues/open/` to `docs/issues/closed/`; `status: done`, `spec-path`, `last-updated-utc` updated, remaining workflow checkpoints ticked (the acceptance criteria were already ticked). No retrospective was needed (progress-log entry says why).
  - EPIC #1488 row 22 is now Done, with the repaired link and the merge note (PR #2858, no version bump).
  - Fixed the two stamps from the F13 nit of the PR #2858 review (22:52 in the progress log, current stamp in the evidence file) and added the F13 row to `docs/pr-reviews/pr-2858-review/PR-REVIEW.md`; `validate-audit-record.py` reports 0 failures.
  - `linter all` and the pre-commit hooks pass.

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

ACKs for top commit:
  da2ce7:
    ACK 13404c7 — F1 to F7 are fixed in the bytes at this head, the new audit passes the validator's logic offline against the captured comments, F13 of the PR 2858 record now resolves after merge, and the merge with develop is conflict-free
  josecelano:
    ACK 13404c7

Tree-SHA512: 360bafecb0d70bc40342709d5913105d9ca598ec5d23704e6371e8119f762e20c39aa9cdea6454baca1f1980c13ed16fea4f79957bfe133defcf59700e26c64b

This branch was previously deployed

1 inactive deployment
coverage — e6a6ea2f Deployed Nov 14, 2026 by josecelano-bot via Generate Coverage Report #3162
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