Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ semantic-links:
- packages/axum-server/src/custom_axum_server.rs
- clippy.toml
- docs/adrs/20260830124000_place_adrs_by_decision_scope.md
- docs/issues/open/2776-2411-axum-server-0-9-timeouts/ISSUE.md
- docs/issues/closed/2776-2411-axum-server-0-9-timeouts/ISSUE.md
- .github/skills/dev/planning/create-adr/SKILL.md
---

Expand Down Expand Up @@ -78,7 +78,7 @@ A request that has arrived and whose handler is too slow still gets `408`, from
## References

- Issue [#2776](https://github.com/torrust/torrust-tracker/issues/2776) and its spec,
`docs/issues/open/2776-2411-axum-server-0-9-timeouts/ISSUE.md`
`docs/issues/closed/2776-2411-axum-server-0-9-timeouts/ISSUE.md`
- `axum-server` 0.9.0, `Server::first_request_timeout`
- Reproduction repository: <https://github.com/josecelano/axum-server-timeout>
- RFC 9110, section 15.5.9 (`408 Request Timeout`)
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
schema-version: 1
doc-type: issue
issue-type: bug
status: in-progress
status: done
priority: p2
epic: 2411
github-issue: 2776
spec-path: docs/issues/open/2776-2411-axum-server-0-9-timeouts/ISSUE.md
spec-path: docs/issues/closed/2776-2411-axum-server-0-9-timeouts/ISSUE.md
branch: "2776-axum-server-0-9-timeouts-spec"
related-pr: null
last-updated-utc: "2026-11-11 11:03"
related-pr: 2813
last-updated-utc: "2026-11-11 16:08"
semantic-links:
skill-links:
- create-issue
Expand Down Expand Up @@ -205,19 +205,19 @@ with GPG.

### Workflow Checkpoints

- [x] Folder-style spec drafted in `docs/issues/open/2776-2411-axum-server-0-9-timeouts/ISSUE.md`
- [x] Folder-style spec drafted in `docs/issues/closed/2776-2411-axum-server-0-9-timeouts/ISSUE.md`
Comment thread
josecelano-bot marked this conversation as resolved.
Resolved
- [x] Spec reviewed and approved by user/maintainer
- [x] GitHub issue created and issue number added to this spec (#2776)
- [ ] (Optional, recommended for complex issues) Spec-only PR merged into `develop` before implementation
- [x] Implementation completed
- [x] Automatic verification completed (`linter all`, relevant tests, and any pre-push checks)
- [x] Manual verification scenarios executed and recorded in issue-local `manual-verification-evidence.md`
- [x] Acceptance criteria reviewed after implementation and updated with evidence
- [ ] Evidence-based implementation completion review recorded: issue-local retrospective created for material discoveries, or progress log states why none was needed
- [x] Evidence-based implementation completion review recorded: issue-local retrospective created for material discoveries, or progress log states why none was needed
Comment thread
josecelano-bot marked this conversation as resolved.
Resolved
- [ ] Reviewer validated acceptance criteria and updated checkboxes
- [ ] Independent reviewer reports recorded in issue-local `agent-review-reports.md` when reviewers received this folder-style specification
- [ ] Committer verified spec progress is up to date before commit
- [ ] Issue closed and spec moved from `docs/issues/open/` to `docs/issues/closed/`
- [x] Issue closed and spec moved from `docs/issues/open/` to `docs/issues/closed/`

### Progress Log

Expand All @@ -230,6 +230,7 @@ with GPG.
- 2026-11-11 09:53 UTC - Claude Code (Claude Sonnet 5.5) - Added the ADR on closing idle connections without a `408` (silent close, revisit through an upstream `axum-server` feature if proxies report confusing logs). Merged `develop` into the branch to resolve conflicts with #2807 and #2812.
- 2026-11-11 10:29 UTC - Claude Code (Claude Sonnet 5.5) - Added the silent-connection test (plaintext and TLS) to the HTTP tracker and REST API packages, next to the existing health check API one. They fail when a listener bypasses the shared constructor: red run in `evidence/red-run-service-tests.txt`. Added the root `clippy.toml` `disallowed-methods` guard for the `axum-server` listener constructors, a documented `allow` in `custom_axum_server.rs`, comments at every call site, and switched the `token_aware_drain` example to the shared constructor.
- 2026-11-11 11:03 UTC - Claude Code (Claude Sonnet 5.5) - Review round 2 (da2ce7, findings F9 to F29 of their numbering): the ADR moved to `docs/adrs/` because the placement ADR puts protocol behaviour at the root; the README states the HTTP/2 condition (a client that answers pings is not time-bounded); the `signals.rs` test listener and the `token_aware_drain` example use the shared constructor, and `clippy.toml` also forbids `axum::serve` and the unix constructors; stamps use commit times, attributions to the maintainer are dropped and AC4 reads "no worse than with the wrapper". Audit: `docs/pr-reviews/pr-2813-review/PR-REVIEW.md`.
- 2026-11-11 12:30 UTC - Claude Code (Claude Sonnet 5.5) - PR #2813 merged (merge commit `a83f3ef29`) after two review rounds; the audit and retrospective are in `docs/pr-reviews/pr-2813-review/`. Spec moved to `docs/issues/closed/`. T8 / AC7 stay with the maintainer: #324, #612, #613 and #603 remain open until he reviews them.
Comment thread
josecelano-bot marked this conversation as resolved.
Resolved
Comment thread
josecelano-bot marked this conversation as resolved.
Resolved

## Acceptance Criteria

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
doc-type: manual-verification-evidence
issue-spec: docs/issues/open/2776-2411-axum-server-0-9-timeouts/ISSUE.md
last-updated-utc: "2026-11-11 11:03"
issue-spec: docs/issues/closed/2776-2411-axum-server-0-9-timeouts/ISSUE.md
Comment thread
josecelano-bot marked this conversation as resolved.
Resolved
last-updated-utc: "2026-11-11 13:50"
---

# Manual Verification Evidence
Expand Down
7 changes: 4 additions & 3 deletions docs/issues/open/2411-spam-and-abuse-resistance/EPIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ epic: null
github-issue: 2411
spec-path: docs/issues/open/2411-spam-and-abuse-resistance/EPIC.md
epic-owner: josecelano
last-updated-utc: "2026-11-10 17:20"
last-updated-utc: "2026-11-11 16:08"
semantic-links:
skill-links:
- create-issue
Expand Down Expand Up @@ -54,7 +54,7 @@ Add a row for every new case. "Source" says where it was found.
| ID | Case | Affected | Effect | Status | Source |
| --- | --- | --- | --- | --- | --- |
| A1 | No shared configurable request-rate policy | UDP, HTTP, REST API, health check | Aggregate work can exceed capacity despite existing local protections | Confirmed: no service has a request-rate policy; HTTP, REST API and health check have no concurrency or connection limit; UDP has only connection-ID banning and an approximate active-request ring. Hypothesis: the capacity at which aggregate work degrades service; confirm by measuring throughput and latency under parallel load on an isolated local tracker | Known limitation |
| A2 | Connections without a client timeout | HTTP, REST API, health check | Idle connections hold resources | Mitigated by #2776 (`axum-server` 0.9): every Axum listener, plaintext and TLS, closes a connection that sends no complete first request within 5 s (`Server::first_request_timeout`), and closes one that is idle after a response (5 s for HTTP/1, about 10 s for HTTP/2); a TLS handshake that does not complete is closed after 10 s. Verified at runtime on the final build ([evidence](../2776-2411-axum-server-0-9-timeouts/manual-verification-evidence.md)). The server closes the connection without a `408`; the values are not configurable | #324, #2776 |
| A2 | Connections without a client timeout | HTTP, REST API, health check | Idle connections hold resources | Mitigated by #2776 (`axum-server` 0.9): every Axum listener, plaintext and TLS, closes a connection that sends no complete first request within 5 s (`Server::first_request_timeout`), and closes one that is idle after a response (5 s for HTTP/1, about 10 s for HTTP/2); a TLS handshake that does not complete is closed after 10 s. Verified at runtime on the final build ([evidence](../../closed/2776-2411-axum-server-0-9-timeouts/manual-verification-evidence.md)). The server closes the connection without a `408`; the values are not configurable | #324, #2776 |
Comment thread
josecelano-bot marked this conversation as resolved.
Resolved
| A3 | HTTP scrape exceeds the documented 74 info-hash limit | HTTP tracker | Local requests returned 75 and 1000 entries; overload impact not measured | Decided in #2417: HTTP keeps the first 100 as a per-request policy cap ([ADR](../../../adrs/20261005124222_cap_scrape_info_hashes_per_protocol.md)); total load still needs rate limiting | [HTTP limit evidence](../../closed/2417-2411-verify-http-scrape-info-hash-limit/manual-verification-evidence.md) |
| A4 | Announce for new info hashes adds torrents to memory when policy permits | UDP, HTTP tracker | Memory is retained while peers remain active; expiry and optional peerless cleanup affect retention | Confirmed: with the default `listed = false` every info hash is authorized and its first announce adds a swarm, with no cap on the number of swarms; a swarm stays until its peers expire and peerless cleanup removes it, and stays indefinitely when `remove_peerless_torrents = false` or cleanup is disabled. Hypothesis: memory per swarm and its growth rate; confirm by measuring resident memory against distinct announced info hashes | SI-22 session, 2026-10-02 |
| A5 | First announce of an unknown torrent reads the database when persistence is enabled | UDP, HTTP tracker | Database load from random info hashes | Confirmed: an announce for a swarm absent from memory reads the database once when `persistent_torrent_completed_stat` is enabled (default `false`); the swarm it then adds (A4) prevents re-reads until eviction. Hypothesis: database load at a given rate of new info hashes; confirm by counting queries and latency on an isolated local tracker | `AnnounceHandler::load_downloads_metric_if_needed` |
Expand Down Expand Up @@ -114,7 +114,8 @@ Each control bounds one cost locally; none bounds aggregate work across requests
| --- | --- | --- | --- | --- |
| 1 | #324 - Denial of Service attack factor | None (pre-dates specs) | TODO | Existing open issue; linked as a sub-issue |
| 2 | #2417 - Verify whether HTTP scrape enforces the 74 info-hash limit | [ISSUE.md](../../closed/2417-2411-verify-http-scrape-info-hash-limit/ISSUE.md) | DONE | A3 |
| 3 | #[To be assigned] - Rate-limiting design | Not drafted | TODO | Highest-impact mitigation for its effort (A1); deferred until after v4.0.0 |
| 3 | #2776 - Adopt `axum-server` 0.9 timeouts and close idle-connection gaps | [ISSUE.md](../../closed/2776-2411-axum-server-0-9-timeouts/ISSUE.md) | DONE | A2 |
| 4 | #[To be assigned] - Rate-limiting design | Not drafted | TODO | Highest-impact mitigation for its effort (A1); deferred until after v4.0.0 |

## Delivery Strategy

Expand Down
Loading
Loading