Skip to content

feat(udp-server): [#2448] migrate the standalone UDP environment and example to the token lifecycle - #2459

Merged
josecelano merged 12 commits into
torrust:developfrom
josecelano:2448-migrate-standalone-udp-environment
Oct 7, 2026
Merged

josecelano merged 12 commits into
torrust:developfrom
josecelano:2448-migrate-standalone-udp-environment

Conversation

@josecelano

Copy link
Copy Markdown
Member

Closes #2448.

Part of EPIC #1488 (SI-17). The UDP counterpart of SI-16 (#2412, PR #2439).

Changes

  • UDP test environment (packages/udp-server/src/testing/environment.rs): starts the server through Server::start_with_cancellation with a fresh token per start. The three event receivers are taken before the start, and the listeners are spawned only after it succeeds, so a failed start leaves no detached listener. stop() cancels once and joins the receive loop and the three listeners, reporting every failure after all four join; it no longer aborts listeners and has no outer timeout (the receive-loop drain is already bounded). The running state is private, behind the existing Started/Unstarted aliases.
  • Health-check API contract test: stops the UDP environment with Environment::stop() instead of the removed server field.
  • udp_only_public_tracker example: installs SIGINT and Unix SIGTERM handlers in main before printing readiness (Ctrl-C on non-Unix), then calls Environment::stop().
  • Task inventory: findings 4 and 8 record the migrated UDP consumer; the REST API and health-check API test environments (SI-23, SI-24) are the remaining legacy users.
  • Spec progress, evidence, and the Task Reviewer report under docs/issues/open/2448-1488-si-17-migrate-standalone-udp-environment/.

Behavior change

Before: SIGINT made the example panic (exit 101); SIGTERM stopped only the server and left the process running. After: both signals stop it in order, exit 0, and release the socket (evidence V1-V3).

Tests

Five new environment tests replace the sleep-based it_should_make_and_stop_udp_server; each was proven by a mutation that makes it fail (aborted listener, listener spawned before the start, pre-cancelled token, early return before joining, stop() that does not await the receive loop). Unlike HTTP, the UDP socket is freed only when the receive-loop task ends, so the socket test also guards the await.

Validation

  • cargo test -p torrust-tracker-udp-server: 216 unit + 12 integration + 1 doc
  • cargo test -p torrust-tracker-axum-health-check-api-server: 3 + 8
  • linter all, pre-commit, and pre-push checks pass (nightly rustc 1.101.0-nightly (ea137335b 2026-10-05), stable rustc 1.99.0)
  • Manual scenarios M1-M4 in manual-verification-evidence.md
  • Task Reviewer: REVIEW PASSED; findings handled in the spec's progress log

Copilot AI balanced review requested due to automatic review settings October 6, 2026 16:19
@josecelano josecelano self-assigned this Oct 6, 2026
@josecelano
josecelano requested a review from da2ce7 October 6, 2026 16:20

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.

Copilot review overview

🟡 Changes recommended

Dropping a running environment without calling stop() leaves the receive loop running and its UDP socket bound.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Migrates the standalone UDP environment to the token-based shutdown lifecycle for #2448, part of EPIC #1488.

Changes:

  • Cancels and joins the receive loop and three event listeners.
  • Routes example shutdown signals through Environment::stop().
  • Adds lifecycle tests and updates verification records.
File Description
packages/​udp-server/​src/​testing/​environment.rs Implements token lifecycle and regression tests.
packages/​udp-server/​examples/​udp_only_public_tracker.rs Handles shutdown signals in the example.
packages/​axum-health-check-api-server/​tests/​server/​contract.rs Stops UDP through the environment API.
docs/​issues/​open/​2448-1488-si-17-migrate-standalone-udp-environment/​manual-verification-evidence.md Records signal and socket verification.
docs/​issues/​open/​2448-1488-si-17-migrate-standalone-udp-environment/​ISSUE.md Updates progress and acceptance evidence.
docs/​issues/​open/​2448-1488-si-17-migrate-standalone-udp-environment/​agent-review-reports.md Records implementation review results.
docs/​features/​shutdown-process/​task-inventory.md Updates migrated and remaining legacy consumers.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@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 9308b90f678be736d07d18ad497a4ddf80d9ec5e (round 1). Recomputed from the bytes at this head, against develop at 9be79fc5a.

SI-17 of EPIC #1488: the UDP test Environment now starts through Server::start_with_cancellation with a fresh token per start and stop() cancels once and joins the receive loop and the three event listeners instead of aborting them; the one direct server consumer (health-check contract test) moves to Environment::stop(); udp_only_public_tracker stops on SIGINT or Unix SIGTERM at its own main. 7 files, +681/-151, 6 commits, no manifest change.

Environment vs D1-D7. D1 stop(self) -> Environment<Stopped> is unchanged (environment.rs:215, base :188) and panics only after join_owned_tasks joins all four (:225-227, tokio::join! at :311), naming each task and telling a returned error from a JoinError (:320-324). D2 token per start (:114). D3 that token reaches the receive loop's biased select (launcher.rs:353-367) and the listeners (:142/148/154); stop cancels it once (:223). D4 receivers at :120-122, listeners only after :137; bind failure returns before any spawn (states.rs:205-209). D5 no outer timeout: the loop drains then aborts and joins (launcher.rs:90-106), each listener selects cancelled() first, and event publishing is a non-blocking broadcast send, so no unbounded await on the stop path. D6 state private (:31-56); the removed public fields had only the migrated consumer (fact 6). Same shape as the HTTP environment; bind_to exists because CancellationRunning returns () (states.rs:77-81).

Tests. Five AAA-labelled it_should_... tests; reasoning from the code, each fails under its recorded mutation (A: JoinError panics the three stop-path tests; B: extra Arc holder at :466-470, cloned before spawn; C: restart client times out at :507; D: yield_now at :526 leaves 0 of 3 finished; E: UdpSocket::bind at :483). environment.rs goes from 3 to 7 tests, the PR's net four. One legacy service.server.stop() remains, the REST API one (contract.rs:121). Task Reviewer Minor and Nits 2, 4, 5 fixed; 3 and 6 kept with reasons.

Example and evidence. Unix handlers installed at udp_only_public_tracker.rs:92, before readiness at :94; non-Unix ctrl_c() documented at :123-124; main returns normally after stop(). Every quoted output line in V1-V4 is a string the code at that tree prints (base environment.rs:214 panic; :94/:95/:98/:105; launcher.rs:15/:523); -888840697 is the client's fixed transaction id.

Spec, inventory, reports. status: in-progress and related-pr: null match the SI-16 and #2452 specs at merge (archival updates them, cleanup-completed-issues/SKILL.md:105); stamp 16:15 = last entry; AC cells hold (no abort( in environment.rs, no tokio::signal under packages/udp-server/src); inventory findings 4 and 8 hold (REST and health-check environments still stop through the legacy path). Two inconsistencies: F1, F2.

Hygiene. Conventional subjects with [#2448], author = committer, author times ordered, no bodies or trailers, no Rust line over 130 columns, every relative link resolves. Type choice: F3.

Findings

  • F1 [Minor, blocking]: T5 still TODO while all its work is recorded done.
  • F2 [Minor, blocking]: the Task Reviewer report cites PR-branch commit ids that a rebase removed.
  • F3 [Nit]: refactor understates the PR title and the environment commit.

Checked, no finding

  • D1-D7 at the lines above; no stop hang, no detached task after a failed start, removed fields sanctioned by D6.
  • Failed-start test pins the panic to the server start (:460-465) and compares holder counts, so it cannot pass on an unrelated panic.
  • Join-order test matches the exact failure text, so a listener failure would also fail it.
  • Restart and client waits bounded by TEST_DEADLINE (10 s); a hang becomes a deadline panic.
  • Commit Points: T0 evidence with T1-T2 in the first commit; T3, T4 and T5 commits as planned.
  • Evidence commands runnable as written (the unified client accepts udp:// URLs).
  • Progress log in order; retrospective skip recorded in the 16:02 entry.

Note on Copilot's review (16:35:00Z): its F1, the drop path, is confirmed at the bytes. At the base, dropping a running environment without stop() dropped the legacy halt sender, which the launcher treats as a stop request (launcher.rs:516-519), so the receive loop drained and released its socket; at this head, dropping Environment<Running> detaches the four handles with the token never cancelled, so the socket stays bound until the runtime shuts down. The spec's Design and Ownership Review says the drop path "keeps today's behavior" (ISSUE.md:186-187), which no longer holds; no current caller is affected, and a drop guard on the token in Running would restore self-stopping. It is left under Copilot's finding rather than numbered again here. The ids above (F1–F3) are this review's and were assigned independently of Copilot's; the audit record reassigns on collision as process-pr-review/SKILL.md prescribes.

Checks

On the loop's compute hub at this head, base develop 9be79fc5a (receipt server-gates-krkavec-104): pre-commit profile gate exit 0 (75 s), clippy-allow-reasons --base-ref 9be79fc5a exit 0, tree clean after the gate; linter markdown, linter cspell, linter lychee exit 0; cargo +stable test --workspace --all-targets --all-features: 3016 passed, 0 failed (71 s); cargo +nightly clippy --workspace --all-targets --all-features -- -D warnings: 0 diagnostics. GitHub checks at this head at posting time: 3 completed/skipped; 18 completed/success. At posting, develop is 9be79fc5a, this head's base.

@josecelano
josecelano force-pushed the 2448-migrate-standalone-udp-environment branch from 9308b90 to 1b71e71 Compare October 6, 2026 18:12
@josecelano josecelano changed the title refactor(udp-server): [#2448] migrate the standalone UDP environment and example to the token lifecycle feat(udp-server): [#2448] migrate the standalone UDP environment and example to the token lifecycle Oct 6, 2026
da2ce7
da2ce7 previously approved these changes Oct 6, 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 1b71e713db56fab598e44bd2ac8c8b40f57fe7ae (round 2). Recomputed from the bytes at this head, against develop at 3efbc28ce.

The push rebases the round-1 tip onto 3efbc28ce unchanged (range-diff: six =; the develop delta is the archive of the #2245 spec and shares no file with this PR) and adds three commits: the drop guard, the F2 subject fix and the F1 spec update.

Drop guard. Running holds cancel_on_drop: DropGuard (environment.rs:44), built from the start's fresh token once the server and listeners are up (:171); the tasks hold clones of that one token (:137 receive loop, :145/151/157 listeners). stop() destructures the state and runs cancel_on_drop.disarm().cancel() (:226) before join_owned_tasks (:228-230): disarm hands back the token without cancelling it, so the token is cancelled exactly once and the four joins are as in round 1. Dropping Environment<Running> drops the guard, which cancels the shared token; the receive loop's biased select then drains and returns (launcher.rs:353-367), releasing the socket, and each listener's biased cancelled() branch ends it. No child or second token exists, so no clone can keep a task alive; a failed start panics at the expect before the guard exists, as in round 1; EnvContainer and bind_to are untouched. The rewritten drop-path paragraph (ISSUE.md:186-190) matches the code: drop cancels but cannot wait, and only stop() joins. The new test (:490-507) records the address the environment actually bound (bind_address(), :243-245), drops the environment and polls UdpSocket::bind under TEST_DEADLINE; without the guard the detached loop keeps the socket and the test fails at the deadline. No other test drops an environment, and the failed-start and restart tests are unaffected.

Round-1 findings.

  • F1 fixed: T5 DONE with its evidence (ISSUE.md:218), committer checkpoint ticked (:259), stamp 18:03 equals the last entry, whose "confirmed by da2ce7" is accurate.
  • F2 fixed: the report names the four reviewed commits by subject (agent-review-reports.md:19-24); the only commit id left in the three spec docs is the develop base 693162bb8, and the other hex tokens are toolchain build hashes, an info-hash and a transaction id.
  • F3 open (Nit, non-blocking): the PR title is still refactor(udp-server) at capture; the 18:03 entry says it becomes feat(udp-server).

Record. There is no docs/pr-reviews/pr-2459-review/PR-REVIEW.md yet and no reply: rows for Copilot's F1 and da2ce7 F1-F3, with replies, are owed before any thread is resolved (process-pr-review/SKILL.md:85-87, :205-207). The fixes may come first ("Update the audit progressively and commit it separately from product fixes", :101-102), so this is not blocking.

Hygiene. Nine Conventional subjects with [#2448] (fix fits the guard), author = committer, author times ordered, no bodies or trailers, no manifest or lockfile change (tokio-util is already a udp-server dependency, Cargo.toml:33, and DropGuard sits in its sync module next to CancellationToken), no Rust line over 130 columns, rustfmt layout by eye.

Findings

None new.

Checked, no finding

  • Rebase clean: six =, three new commits, no file shared with the develop delta.
  • No double cancel and no cancel-before-join race.
  • New test labelled Arrange/Act/Assert, not vacuous, bounded by TEST_DEADLINE.
  • environment.rs has 8 tests and no abort(.
  • The Running and stop() docs match the code.

Checks

On the loop's compute hub at this head, base develop 3efbc28ce (receipt server-gates-krkavec-116): pre-commit profile gate exit 0 (72 s), clippy-allow-reasons --base-ref 3efbc28ce exit 0, tree clean after the gate; linter markdown, linter cspell, linter lychee exit 0; cargo +stable test --workspace --all-targets --all-features: 3017 passed, 0 failed (72 s); cargo +nightly clippy --workspace --all-targets --all-features -- -D warnings: 0 diagnostics. GitHub checks at this head at posting time: "3 completed/skipped; 18 completed/success". At posting, develop is 3efbc28ce, this head's base; the PR title now reads feat(udp-server), so F3 is moot. The loop resolves its F1, F2 and F3 threads; an audit record for the posted findings is owed, non-blocking.

@da2ce7

da2ce7 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

ACK 1b71e71 — the drop guard cancels the environment token exactly once on stop() and on drop, the F1 and F2 fixes hold, and the branch is a clean rebase onto 3efbc28

@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 c829de8b28debaf348c455d37850cb75f13181f3 (round 3). Recomputed from the bytes at this head, against develop at 3efbc28ce.

The push adds one commit on top of the round-2 tip (range-diff: nine =, one new) carrying docs/pr-reviews/pr-2459-review/PR-REVIEW.md (+144) and nothing else: no code, manifest or lockfile change.

The record. Its F1 is Copilot's drop-path finding, and its F2-F4 are my F1-F3, renumbered as process-pr-review/SKILL.md:57-61 requires because my F1 collides with Copilot's; the original ids are kept in the detail entries. Against the capture:

  • Every Source URL and Source review ID matches its comment.
  • Every Reply URL is an author reply on the same thread (18:48:50-18:48:55Z).
  • Severities match the posted brackets (Major, Minor, Minor, Nit), and all four rows are ORIGINAL.
  • The three FIXED rows cite subjects that are on the branch.
  • F4's NO_ACTION with its reply URL follows the #2363 precedent for a fix made outside the repository: the title now reads feat(udp-server), renamed at 18:48:28Z.
  • The intro's claims hold: Copilot's "Balanced" effort and High severity badge, and my round-1 body confirming Copilot's F1. So do the detail entries, including "219 unit" (two tests arrived from #2452 between the T0 base and the merge base, plus this PR's five).
  • The Processing Log is chronological, and each stamp precedes its commit. It does not mention the round-2 approval, which the skill does not require: a verdict with no request gets no row (:50-52).

One cell is false at capture (F4 below), and two template blocks are trimmed (F5).

Carry-forward. Everything in my round-2 review stands: the nine earlier commits are unchanged, the record contains no letter-bearing 7-40 hex token, and its frontmatter paths resolve.

Hygiene. The new subject docs(pr-reviews): record Copilot and da2ce7 reviews on #2459 carries no [#2448]. Only the PR title must carry the issue reference (open-pull-request/SKILL.md:98), so this is not a finding. Author = committer, 20:05:06Z after 18:09:11Z, no body or trailer, no banned token. Table rows are one line each, and the prose is wrapped as the template's is.

Findings

  • F4 [Minor, blocking]: F1's Thread state reads RESOLVED while Copilot's thread is unresolved at capture.
  • F5 [Minor, non-blocking]: the Status Values and Completion Rules blocks are not the template's verbatim text.

(F4 and F5 continue my own series; the record's F2-F4 are my F1-F3.)

Checked, no finding

  • Renumbering, Reply URLs, severities, FIXED resolution subjects.
  • F4 row NO_ACTION/RESOLVED per the #2363 precedent.
  • Log order and stamps; the 18:12 entry's commit, rebase and push times.
  • No commit id in the record; no code change since round 2.

Checks

On the loop's compute hub at this head, base develop 3efbc28ce (receipt server-gates-krkavec-120): pre-commit profile gate exit 0 (74 s), clippy-allow-reasons --base-ref 3efbc28ce exit 0, tree clean after the gate; linter markdown, linter cspell, linter lychee exit 0; whole-workspace cargo +stable test --all-targets --all-features: 3017 passed, 0 failed (71 s); cargo +nightly clippy --workspace --all-targets --all-features -- -D warnings: exit 0, 0 diagnostics (13 s); validate-audit-record.py --pr-number 2459 over the live review comments: 4 rows, 3 log entries, 0 failures (it does not compare Thread state with the live thread, so F4 is a review finding, not a validator one). GitHub checks at this head at posting time: "1 completed/skipped, 16 completed/success, 1 in_progress/null". At posting, develop is 3efbc28ce, this head's base; Copilot's thread is still unresolved at posting.

@josecelano
josecelano force-pushed the 2448-migrate-standalone-udp-environment branch from c829de8 to 5258a94 Compare October 6, 2026 20:31
da2ce7
da2ce7 previously approved these changes Oct 6, 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 5258a94792fed9312548cc93afb66534a78083a1 (round 4). Recomputed from the bytes at this head, against develop at 460385256.

The push rebases the round-3 tip onto 460385256 unchanged (range-diff: ten =). The develop delta is documents for #2457 and the #2417 archive and shares no file with this PR. The push also adds one commit that restores the record's template blocks.

F4 and F5.

  • F4 fixed by the author's action, with no commit: Copilot's thread is resolved at capture, so the F1 row's RESOLVED is true, and so is the 19:33 UTC entry's "the threads are resolved after it is pushed".
  • F5 fixed: the Status Values and Completion Rules sections of docs/pr-reviews/pr-2459-review/PR-REVIEW.md are now line-for-line identical to docs/templates/PR-REVIEW-TEMPLATE.md, including its wrapping. The Ownership section differs only in its filled placeholder.

Record log. The record has no rows yet for my round-3 F4 and F5 (review 5434121120), no Processing Log entry for that round, and no reply on either thread. process-pr-review/SKILL.md asks for a row per finding (:57-61, renumbered past the record's F4), a reply before resolving (:85-87) and progressive updates (:101-102). As in round 2, this is owed before those threads close; it is not a finding, because both fixes are verified.

Carry-forward. The ten earlier commits are byte-identical after the rebase. My round-2 and round-3 verification stands: the drop guard, the F1/F2 fixes and the record's other cells. The record still has no letter-bearing hex token and no relative link.

Hygiene. Eleven commits; author = committer; author times ordered (20:26:56Z after 20:05:06Z); one rebase (committed 20:29:47-51Z); no bodies or trailers; no manifest or lockfile change; no banned token. The new text is the template's own wrapping, copied verbatim.

Findings

None new.

Checked, no finding

  • Rebase clean, with no file shared with the develop delta.
  • Record blocks verbatim; Copilot's thread resolved; the F1 row and the 19:33 entry true.
  • No code change since round 2.

Checks

On the loop's compute hub at this head, base develop 460385256 (receipt server-gates-krkavec-122): pre-commit profile gate exit 0 (72 s), clippy-allow-reasons --base-ref 460385256 exit 0, tree clean after the gate; linter markdown, linter cspell, linter lychee exit 0; whole-workspace cargo +stable test --all-targets --all-features: 3017 passed, 0 failed (71 s); cargo +nightly clippy --workspace --all-targets --all-features -- -D warnings: exit 0, 0 diagnostics (12 s); validate-audit-record.py --pr-number 2459 over the live review comments: 4 rows, 3 log entries, 0 failures. GitHub checks at this head at posting time: "1 completed/skipped, 7 completed/success, 9 in_progress/null". At posting, develop is 460385256, this head's base.

@da2ce7

da2ce7 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

ACK 5258a94 — the drop guard and the F1/F2 fixes verified in round 2 stand, the audit record verified in round 3 now carries the template's status and completion blocks verbatim with Copilot's thread resolved, and the branch is a clean rebase onto 4603852

@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 888b83b41d8dc30a1d6161674fb8d8f35176a7b2 (round 5). Recomputed from the bytes at this head, against develop at 460385256.

The push adds one commit on top of the round-4 tip (range-diff: eleven =, one new) that appends +45/-0 to docs/pr-reviews/pr-2459-review/PR-REVIEW.md: the rounds 2-4 narrative, rows F5 and F6, their details and one log entry. The record's F5/F6 are my round-3 F4/F5 under the record's own numbering.

Rows F5 and F6. Both cite review 5434121120 (round 3) with Reviewer finding IDs F4 and F5. Each Source URL is my comment (r4200046641, r4200046652), and each Reply URL is the author's reply on that same thread (r4203606180 at 06:00:56Z, r4203606338 at 06:00:57Z). Author class Human; Severity Minor matches my [Minor] labels; both rows are ORIGINAL; both threads are resolved at capture. F6 is FIXED and cites the round-4 commit's subject, which is on the branch. F5 is NO_ACTION/RESOLVED with its reply URL: the fix was a thread resolution with no commit subject, the same out-of-repo pattern the record uses for F4 (#2363 precedent). Renumbering past the taken F4 follows process-pr-review/SKILL.md:57-61. F5's "GraphQL shows Copilot's thread resolved (20:25:02 UTC)" cannot be checked from the capture, which carries no resolution times.

Narrative and log. The round-2 and round-3 descriptions match the review states, heads and times. Round 4 is described as "APPROVED, 20:39 UTC", which was true when written; this push has since dismissed it, and the skill has no rule on recording a review's final state. The new log entry keeps the template's stamp form and order (06:02 UTC, before the 06:04:26Z commit). Its times match the capture: replies at 06:00:56-06:00:57Z, develop 5 commits ahead. Its "force-pushed (20:31:50)" is one second before the timeline's 20:31:51Z. The "Late entry for 2026-10-06" wording breaks no rule: the template only requires entries to be appended.

Carry-forward. The eleven earlier commits are byte-identical, so my rounds 2-4 verification stands (the drop guard, the fixes, the earlier rows, the template blocks). The record has no letter-bearing hex token and no relative link, and every discussion id it cites is in the capture.

Hygiene. Twelve commits; author = committer; author times ordered (06:04:26Z after 20:26:56Z); no body or trailer; no manifest or lockfile change; no banned token. The new prose is wrapped like the file's existing prose.

Findings

None new.

Checked, no finding

  • F5/F6 cells against reviews, comments and threads.
  • Numbering, reply placement, the FIXED subject on the branch.
  • Log order, stamp form and times.
  • No code change since round 2.

Checks

On the loop's compute hub at this head, base develop 460385256 (receipt server-gates-krkavec-123): pre-commit profile gate exit 0 (76 s), clippy-allow-reasons --base-ref 460385256 exit 0, tree clean after the gate; linter markdown, linter cspell, linter lychee exit 0; whole-workspace cargo +stable test --all-targets --all-features: 3017 passed, 0 failed (73 s); cargo +nightly clippy --workspace --all-targets --all-features -- -D warnings: exit 0, 0 diagnostics (13 s); validate-audit-record.py --pr-number 2459 over the live review comments: 6 rows, 4 log entries, 0 failures. GitHub checks at this head at posting time: "3 completed/skipped, 18 completed/success". At posting, develop is 460385256, this head's base.

@da2ce7

da2ce7 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

ACK 888b83b — the drop guard and the F1/F2 fixes verified in round 2 stand, the audit record verified in rounds 3-4 now carries the rounds 2-4 rows and log entry true to the review capture, and the branch is a clean rebase onto 4603852

@josecelano

Copy link
Copy Markdown
Member Author

ACK 888b83b

@josecelano
josecelano merged commit 604b26c into torrust:develop Oct 7, 2026
21 checks passed
@josecelano
josecelano deleted the 2448-migrate-standalone-udp-environment branch October 7, 2026 08:39
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Oct 7, 2026
Move the SI-17 spec to docs/issues/closed/ after PR torrust#2459 merged and torrust#2448 closed. Repair the spec's relative links to SI-23 and SI-24, point every live reference at the new path, and mark EPIC torrust#1488 sequence 13 done.
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Oct 7, 2026
…review history

The closing progress-log entry said da2ce7 approved rounds 2 to 4. The torrust#2459 audit records an approval dismissed by a push, a change request, and an approval, and the merge rests on da2ce7's ACK of the later final head. Say that da2ce7 approved the final head instead (PR torrust#2465 review finding F2, da2ce7 F1).
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Oct 7, 2026
Move the SI-17 spec to docs/issues/closed/ after PR torrust#2459 merged and torrust#2448 closed. Repair the spec's relative links to SI-23 and SI-24, point every live reference at the new path, and mark EPIC torrust#1488 sequence 13 done.
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Oct 7, 2026
…review history

The closing progress-log entry said da2ce7 approved rounds 2 to 4. The torrust#2459 audit records an approval dismissed by a push, a change request, and an approval, and the merge rests on da2ce7's ACK of the later final head. Say that da2ce7 approved the final head instead (PR torrust#2465 review finding F2, da2ce7 F1).
josecelano added a commit that referenced this pull request Oct 7, 2026
14108b0 docs(pr-reviews): record da2ce7 round 4 on #2465 (Jose Celano)
25637b8 docs(pr-reviews): record N/A as the #2465 F1 reviewer finding ID (Jose Celano)
6bad035 docs(pr-reviews): record the #2465 duplicates F3 and F4 as NO_ACTION/SUPERSEDED (Jose Celano)
9d4680a docs(pr-reviews): copy the template's Status Values and Completion Rules verbatim into the #2465 record (Jose Celano)
23e0cee docs(pr-reviews): record da2ce7 rounds 2-3 on #2465 (Jose Celano)
3e40bf8 docs(pr-reviews): record the Copilot and da2ce7 reviews on #2465 (Jose Celano)
c7e010b docs(issues): [#2448] correct the archive entry's #2459 review history (Jose Celano)
cf09152 docs(issues): refresh EPIC #1488 status snapshot date (Jose Celano)
5ef249d chore(issues): archive closed issue #2448 spec (Jose Celano)

Pull request description:

  Related to #2448 (closed by #2459) and EPIC #1488.

  Archives the SI-17 spec after #2459 merged:

  - Moves `docs/issues/open/2448-1488-si-17-migrate-standalone-udp-environment/` to `docs/issues/closed/`.
  - Spec: `status: done`, `related-pr: 2459`, last checkpoint ticked, closing progress-log entry. Its relative links to SI-23 and SI-24 now point into `docs/issues/open/` (the move would otherwise break them, as found in #2457).
  - EPIC #1488: roadmap row 13 marked Done. Findings 2 and 8 now name only the REST API and health-check API test environments (SI-23, SI-24) as remaining legacy-stop users.
  - Updates links to the old path: SI-3 draft and its verification notes, SI-22 EPIC, SI-23 spec, and the PR #2451 and #2459 audit records' frontmatter.

  Docs-only; `linter all` and the pre-commit and pre-push hooks pass.

ACKs for top commit:
  josecelano:
    ACK 14108b0
  da2ce7:
    ACK 14108b0 — the record of all five reviews (Copilot's and da2ce7's rounds 1, 2, 3 and 5) verified cell by cell against the capture, with the F4-F6 record fixes (verbatim blocks, NO_ACTION/SUPERSEDED duplicates, N/A reviewer ID) and the three content fixes carried unchanged on the rebase onto 30e6b71

Tree-SHA512: 991a18ac1e8bad7ae00921c06a8169b771d0df0917a579beceb616fbc18d5e82c4788ce3a3403102f90d4a64d1be79d7dcb0ef52efe189e863fd6b5f50534b84
josecelano added a commit that referenced this pull request Oct 8, 2026
…SI-23 and SI-24 specs

0f5270e docs(pr-reviews): add the PR #2483 review audit (Jose Celano)
d9f8b54 docs(issues): refresh the SI-18 and SI-19 update timestamps (Jose Celano)
0d7cf4d docs(issues): describe the SI-23 and SI-24 drop path as cancellation only (Jose Celano)
26e259f docs(issues): restore the #2471 post-green design-review checkpoint (Jose Celano)
ce3ac3d docs(issues): record the #2471 reproduction's symptom and hypothesis (Jose Celano)
2801ab2 docs(issues): record D20, independent test-environment tokens (Jose Celano)
d0cf7bd docs(issues): require the drop path in SI-23 and SI-24 (Jose Celano)
00c8a9b docs(issues): refresh SI-22 specs with lessons from SI-17 (Jose Celano)
4f456ef docs(issues): add #2471 to the shutdown EPIC roadmap (Jose Celano)
e2a0b1e docs(issues): add issue specification for #2471 (Jose Celano)

Pull request description:

  Related to #2471

  Spec-only PR. It adds the specification for #2471 and refreshes the SI-22, SI-23 and SI-24 specs with lessons from SI-17 (#2448, #2459) and the recent archive PRs (#2457, #2465). No code changes.

  ## Summary

  - **#2471 spec (new):** dropping the HTTP test environment without `stop()` leaves its server running and its port bound. It's a regression from SI-16 (#2439); the UDP environment got the fix in #2459. The bug was reproduced on `develop` with a temporary test, which is recorded in `manual-verification-evidence.md` and was not committed. The fix is a `DropGuard`, as in the UDP environment, and comes in its own PR.
  - **EPIC #1488 roadmap:** #2471 is inserted as sequence 14, before SI-22, because SI-22 T9 changes the same file. The later rows and the "EPIC position" lines in the SI-22, SI-23, SI-24, SI-18 and SI-19 specs are renumbered.
  - **SI-22 (#2410, #2413, #2416):**
    - T9 keeps SI-17's join-all failure reporting, cancels both tokens on drop, and adds the late-event test for UDP as well as HTTP. T9 now waits for #2471.
    - New decision D20: the test environments use independent server and listener tokens, each with its own `DropGuard`, mirroring `JobManager`'s per-component tokens. The parent-child token option is rejected.
    - T1 records the test environments' listener chains.
    - T2a finds links to the moved jobs doc with `rg`, because `lychee.toml` skips `docs/issues/closed/`. Historical records keep the old path (maintainer decision).
    - T2b adds the `DropGuard` rule to the glossary.
    - Stale state is updated: spec-only PR #2421 merged, SI-16 and SI-17 done, #2413's branch and parent line.
  - **SI-23 (#2449) and SI-24 (#2450):** "Drop path: unchanged" was wrong, because moving from the halt sender to a token loses the stop-on-drop behavior, as happened in SI-16. Both specs now require a `DropGuard`, a T1 drop test, and AC7.

  ## Files

  Only `docs/issues/`:

  - `docs/issues/open/2471-1488-fix-http-environment-drop-path/` (new: `ISSUE.md`, `manual-verification-evidence.md`)
  - `docs/issues/open/1488-overhaul-tracker-shutdown/ISSUE.md`
  - `docs/issues/open/2410-1488-si-22-process-queued-events-before-listeners-stop/EPIC.md`
  - `docs/issues/open/2413-2410-si-22-1-document-event-flows-and-draft-adr/ISSUE.md`
  - `docs/issues/open/2416-2410-si-22-4-stop-producers-before-listeners/ISSUE.md`
  - `docs/issues/open/2449-1488-si-23-migrate-rest-api-test-environment/ISSUE.md`
  - `docs/issues/open/2450-1488-si-24-migrate-health-check-api-test-environment/ISSUE.md`
  - `docs/issues/drafts/1488-si-18-deprecate-legacy-shutdown-api/ISSUE.md` and `docs/issues/drafts/1488-si-19-remove-legacy-shutdown-api/ISSUE.md` (roadmap position only)

  ## Validation

  - Pre-commit checks pass for every commit (`linter all`, frontmatter validation, `cargo machete`, doc tests).
  - Pre-push checks pass (nightly fmt, check and docs; stable test suite).
  - #2471 is linked as a sub-issue of #1488.

ACKs for top commit:
  josecelano:
    ACK 0f5270e

Tree-SHA512: 59b4bfc4b07c9fc30c44c778f5638c52e2ec85499df0251eaacf0372f653aa0e3c9a470cd1b5ee22046a29afd7678b3da4d29d6c104b3b30daf8b4035d1fb5fa
josecelano added a commit that referenced this pull request Oct 16, 2026
…opped without stop()

The running state held a plain CancellationToken, and dropping a token does
not cancel it, so a test environment dropped without stop() kept its server
running and its address bound. Hold the token as a DropGuard, as the UDP
environment does since #2459, and disarm it in stop().

Add a regression test that drops a started environment and waits for its
binding to be released. It failed before the fix with a 10 s timeout.

Co-authored-by: Copilot <[email protected]>

This branch was previously deployed

1 inactive deployment
coverage — 888b83b4 Deployed Oct 7, 2026 by josecelano via Generate Coverage Report #2469
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.

Migrate standalone UDP environment and example to the token lifecycle

3 participants