Repository navigation
fix(tests): [#2393] ignore racing port tests and rewrite those that need no real port - #2859
Conversation
… port range Fixtures that bound port 0, read the address and dropped the socket let a parallel test claim the port before the tested server bound it. Move the port reservation to torrust-tracker-test-helpers and use it in the axum-http-server, axum-rest-api-server, axum-health-check-api-server, udp-server and main-application fixtures. Record the work in the issue spec. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…helper docs Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
ACK 0e43f34 |
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
5 open issues
This module was moved into a general-purposetest-helperscrate, but the docs still contain… · New The candidate-port iterator generation is duplicated inreserve_free_portsand… · New The candidate-port iterator generation is duplicated inreserve_free_portsand… · New The commit log entries above include a consistent timestamp format (date + time + timezone), but… · New Usingheld[0]relies on implicit knowledge thatreserve_from(1, …)always returns exactly one… · New
What changed in this PR
Moves loopback port reservation into the shared torrust-tracker-test-helpers crate and updates tests to use ports below the OS ephemeral range to reduce bind races in parallel runs.
Changes:
- Introduces
torrust-tracker-test-helpers::portswith shared port reservation and new TCP/UDP address helpers. - Replaces test fixtures that used
bind(…:0)+ drop patterns withreserve_free_tcp_address()/reserve_free_udp_address(). - Updates the open issue spec/audit log documenting the completed remediation tasks.
| File | Description |
|---|---|
| tests/common/native_tracker/ports.rs | Re-exports port reservation from the shared test-helpers crate. |
| src/bootstrap/jobs/udp_tracker.rs | Uses reserved UDP address helper for bindability tests. |
| src/bootstrap/jobs/health_check_api.rs | Uses reserved TCP address helper for health-check bind tests. |
| src/app.rs | Uses reserved UDP address helper in app-level tests. |
| packages/udp-server/src/server/mod.rs | Uses reserved UDP address helper in UDP server tests. |
| packages/test-helpers/src/ports.rs | Adds the shared port reservation implementation + TCP/UDP helpers and tests. |
| packages/test-helpers/src/lib.rs | Exposes the new ports module. |
| packages/axum-rest-api-server/src/server.rs | Replaces port-0 probe fixtures with reserved TCP addresses. |
| packages/axum-http-server/src/server.rs | Replaces port-0 probe fixture with reserved TCP address and adds rationale comment. |
| packages/axum-health-check-api-server/src/server.rs | Replaces port-0 probe fixture with reserved TCP address. |
| packages/axum-health-check-api-server/src/environment.rs | Replaces port-0 probe fixture with reserved TCP address. |
| docs/issues/open/2393-2392-test-port-allocation-races/ISSUE.md | Marks remediation tasks done and records implementation/audit notes. |
Review effort: Lite
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 0e43f34a99982e780b7a635b96e8f677f9823828. Recomputed from the bytes at this head, against the merge base 24230dd01; git merge-tree against develop 24230dd01 merges without conflict and yields the head's own tree.
Process: a bug fix under fix-bug, with create-issue, write-unit-test, commit-changes and open-pull-request. The code follows that process. The spec and the PR body do not: they record steps that were not run, and they close the issue while its own completion steps are open.
The change against its claim: the helper moves into torrust-tracker-test-helpers::ports with its logic and tests unchanged and only its docs reworded. It gains TCP and UDP address wrappers and one test, and the root tests/common copy becomes a re-export. All nine port-zero-drop fixtures, across eight files, now draw below 32768. Imports stay used, and every consumer already declares the dev-dependency. #2581 delivered T4: its commits are on the base, and its evidence holds the red proof. The audit's "listener kept open" examples hold their listener. The spec claims more than the bytes show (F1-F4).
Consistency: no moved path is cited live, and only archived records name the old file. The changed Markdown adds no links, and the dictionary is unchanged.
Hygiene: two commits, author equals committer, [#2393] scope form, bodies match diffs. Each commit ends with an attribution footer, and no rule in the tree forbids it. git diff --check is clean. The PR-branch commit-id check prints nothing. The closing-keyword scan matches only Closes #2393 in the body (F2), and nothing in the title or the commits.
Findings: F1 Major, T2-T5 marked DONE without the outputs they name. F2 Major, the body closes the issue while T6, the AC review and M2-M4 are open. F3 Minor, the red-run and nine-run claims. F4 Minor, release assertions missing from the audit. F5 Minor, the draw range overlaps the fixed ports 17091-17094. F6 Minor, the log entry format. F7 Nit, the doc wrap. F8 Suggestion, the duplicated candidate generator. F9 Nit, the README and catalog. F10 Nit, a missing qualifier.
Checked, no finding: the reserve_from budget logic, the fake-binder tests, the # Panics sections and the must_use attributes. No unit-test binary in the five touched crates starts a child process, so the helper's fork caveat does not reach the new call sites. The unused_imports allow follows tests/common/mod.rs.
Checks
On the loop's compute node at this head, against the merge base 24230dd01 (receipt server-gates-kranich-861): the repository's pre-commit gate and lint roster exit 0 (91 s wall). The package tests of the six changed crates (cargo test -p torrust-tracker-test-helpers -p torrust-tracker-axum-health-check-api-server -p torrust-tracker-axum-http-server -p torrust-tracker-axum-rest-api-server -p torrust-tracker-udp-server -p torrust-tracker, receipt pkgtest-2859-r1) exit 0: 877 passed, 0 failed across 33 test binaries, wall 79 s. One green run says nothing about the race itself (F3). F2 checked against the bytes at posting: the body's first line is Closes #2393, while the spec at this head reads status: planned with T6 and M2 to M4 TODO. F5 checked against the bytes: SCENARIO_PORTS is 10_000..32_768. GitHub checks at this head at posting time: "Package Coverage Regression: completed/success; Package Coverage (torrust-tracker-axum-rest-api-server): completed/success; Package Coverage (torrust-tracker-axum-health-check-api-server): completed/success; Package Coverage (torrust-tracker-test-helpers): completed/success; Package Coverage (torrust-tracker): completed/success; Package Coverage (torrust-tracker-udp-server): completed/success; Package Coverage (torrust-tracker-axum-http-server): completed/success; Test (Docker) (release): queued/pending; Docs Lint: completed/success; Docker E2E: completed/skipped; Documented Clippy Allows: completed/success; Shipped Features: completed/success; Workspace Packaging: completed/success; Layer Boundary Bans: completed/success; Unit (stable): completed/success; Unit (nightly): completed/success; Generate Coverage Report: completed/success; Discover Package Coverage: completed/success; Build on windows-latest (stable): completed/success; Build on windows-latest (nightly): completed/success; Build on ubuntu-latest (stable): completed/success; Build on macos-latest (nightly): completed/success; Build on ubuntu-latest (nightly): completed/success; Build on macos-latest (stable): completed/success". At posting, develop is 24230dd01.
…hanges The scope of torrust#2393 narrowed to a quick patch that removes the flakiness, without a new helper or production API change. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… that need no real port Disable nine tests that bind port 0, drop the socket and reuse the address, and rewrite three tests that never needed a pre-selected port. Record the inventory and the per-test decisions in the issue spec. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
ACK 7f8eef0 |
Nine more tests stop or drop a server that bound port 0, then rebind the released port to prove it was freed. A concurrent port-0 bind can receive the same port in between, which is the assertion the original V1 failure hit. Ignore them and add them to the per-test decisions. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…me and model Co-Authored-By: Claude Opus 5.5 <[email protected]>
…vidence entries by the new scope Co-Authored-By: Claude Opus 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 7f8eef0dc661c07f8c9685751927609b5e0a9923. Recomputed from the bytes at this head, against the merge base 24230dd01; git merge-tree against develop 9e5d3ff95 merges without conflict. Develop's three overlapping files change only error enums, not the tests this PR touches.
Process: unchanged (fix-bug, create-issue, commit-changes, open-pull-request), plus process-pr-review now that threads exist.
The change against its claim: dacd851d8 restores the base tree exactly; its diff against 24230dd01 is empty. 7f8eef0dc adds nine #[ignore = "flaky port race, see #2393"] attributes. Every remaining caller of a pre-selected port-zero fixture is now ignored. Three tests are rewritten correctly: the UDP test asserts against running.local_addr, the job name uses the configured port 0, and 127.0.0.1:1 is outside every port-zero range. No test is deleted, and the inventory's "ports only parsed" claim holds.
Open findings since the previous round: F1, F3, F5, F7, F8, F9 and F10 are resolved, either by the revert or by the rewritten plan. F2, F4 and F6 remain open.
Consistency: the changed Markdown adds no links, and no moved path remains.
Hygiene: author equals committer, and the bodies match their diffs. Both new commits end with an attribution footer, which no rule in the tree forbids. git diff --check is clean. The PR-branch commit-id check prints nothing. The closing-keyword scan matches only body line 1.
Findings: F2 Major (still open), the body closes the issue while T5 is blocked and the ignore attributes point at it. F4 Minor (still open), four active release re-binds are left out of the inventory. F6 Minor (still open), the log entry format. F11 Minor, required bug-spec sections were deleted. F12 Minor, M1 and M4 do not exist. F13 Nit, stale task references. F14 Minor, no replies to the 15 threads and no audit record.
Checked, no finding: the ignore attributes carry reasons and compile under #[tokio::test], every changed test keeps the imports it uses, and the rewritten tests keep their assertions.
Checks
On the loop's compute node at this head, against the merge base 24230dd01 (receipt server-gates-kranich-873): the repository's pre-commit gate and lint roster exit 0 (78 s wall). The package tests of the five changed crates (cargo test -p torrust-tracker-axum-health-check-api-server -p torrust-tracker-axum-http-server -p torrust-tracker-axum-rest-api-server -p torrust-tracker-udp-server -p torrust-tracker, receipt pkgtest-2859-r2) exit 0: 881 passed, 0 failed, 10 ignored across 31 test binaries, wall 83 s. F2 checked against the bytes at posting: the body's first line is Closes #2393, the spec reads status: planned with T5 BLOCKED, and the code carries nine #[ignore = "flaky port race, see #2393"] attributes. GitHub checks at this head at posting time: "Package Coverage (torrust-tracker-axum-http-server): in_progress/pending; Package Coverage (torrust-tracker-udp-server): in_progress/pending; Package Coverage (torrust-tracker-axum-rest-api-server): in_progress/pending; Package Coverage (torrust-tracker): in_progress/pending; Package Coverage (torrust-tracker-axum-health-check-api-server): in_progress/pending; Docs Lint: completed/success; Docker E2E: completed/skipped; Unit (nightly): in_progress/pending; Shipped Features: completed/success; Documented Clippy Allows: completed/success; Layer Boundary Bans: completed/success; Workspace Packaging: completed/success; Unit (stable): in_progress/pending; Test (Docker) (release): queued/pending; Discover Package Coverage: completed/success; Generate Coverage Report: in_progress/pending; Build on macos-latest (stable): completed/success; Build on ubuntu-latest (nightly): completed/success; Build on macos-latest (nightly): completed/success; Build on windows-latest (stable): in_progress/pending; Build on windows-latest (nightly): completed/success; Build on ubuntu-latest (stable): completed/success". At posting, develop is dbd32a17f.
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
7 open issues
This assumes127.0.0.1:1is always unused, but it’s not guaranteed across environments (local… · NewStoppedUdpServerOnFreeAddress::new()still relies onavailable_udp_address(), which (per this… · New The candidate-port iterator generation is duplicated inreserve_free_portsand… The candidate-port iterator generation is duplicated inreserve_free_portsand… This module was moved into a general-purposetest-helperscrate, but the docs still contain… Usingheld[0]relies on implicit knowledge thatreserve_from(1, …)always returns exactly one… The commit log entries above include a consistent timestamp format (date + time + timezone), but…
Review effort: Lite
…hat never listens Port 1 is not guaranteed to be closed. A socket bound to port 0 without listening is owned by the test, so nothing else can listen on it and a connection to it is refused. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…r its released address Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rowed scope Co-Authored-By: Claude Opus 5.5 <[email protected]>
…arrowed plan Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the probed service The REST API and HTTP variants stopped the probed service, then started the health-check API on port 0. The kernel could hand it the port just released, which the registry still held, so registration failed with DuplicateBinding (2 failures in 150 full-suite runs). Starting it first keeps the ports apart. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
F25 (the third review's F2, review 5904035456): fixed outside the tree. The body no longer says "does not close" with the issue reference; that sentence is now "The issue stays open for T5." The |
…ew round in the PR 2859 audit Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ird round changed Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ew round Co-Authored-By: Claude Opus 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 4ac7a7b03f1763c31bd6c80c5696006291e217aa. Recomputed from the bytes at this head, against the merge base 24230dd01; git merge-tree against develop 1bb188769 merges without conflict.
Process: unchanged (fix-bug, create-issue, commit-changes, open-pull-request, process-pr-review).
The change against its claim: the code is unchanged since 5c9c724a9. There are 21 ignore attributes, each matching an Ignored row, and 4 Rewritten rows. The launcher contract runs again, and the three contract tests that probe a released port are ignored. 7b3594df9, 9039082e5 and 4ac7a7b03 fill in the six round-3 Reply URLs and the conversation URL, update the ignore counts, and log the resolution. V4's conclusion now names recheck 2 and its 18 skipped tests.
Findings from earlier rounds: F25 and F27 are resolved; F2 and F15-F19 stay resolved. All 30 threads have an author reply on their own thread, a row naming it, and a resolution in the capture. The validator's logic passes offline (30 rows, 6 log entries, 0 failures), and every log stamp and claim matches the capture, including the F8 reply's edit at 11:23:37Z.
Consistency: no placeholders remain; the table is contiguous; the M1-M4 anchors match the V headings.
Hygiene: author equals committer on all three new commits, each ending with an attribution footer, which no rule forbids. git diff --check is clean. The commit-id check prints nothing, and the body, title and folded commit messages match no closing keyword.
Findings: F26 Minor, still open in part and not blocking. Check 3 is filed under V1, and the spec log and both last-updated-utc values predate the third round.
Checked, no finding: the record's count corrections for F7, F9 and F17, the F26 detail's new verification line, and the Processing Log's chronological order.
Checks
On the loop's compute node at this head, against the merge base 24230dd01 (receipt server-gates-kranich-879): the repository's pre-commit gate and lint roster exit 0 (56 s wall); the repository's audit validator on pr-2859-review exits 0 (30 rows, 6 log entries, no failures), where at 5c9c724a9 it failed 7 times (receipt server-gates-kranich-878). Package tests: the code is unchanged since 5c9c724a9, where the two crates changed in round 4 (cargo test -p torrust-tracker-axum-health-check-api-server -p torrust-tracker-udp-server, receipt pkgtest-2859-r4) exit 0 with 258 passed, 0 failed, 13 ignored; the other two changed crates passed at 88908a9cb (receipt pkgtest-2859-r3, 596 passed across the four crates), and their files have not changed since. Read on the forge at posting: all 30 review threads are answered and resolved, and GitHub lists no closing issue reference for this PR. GitHub checks at this head at posting time: "". At posting, develop is 1bb188769.
|
ACK 4ac7a7b — every thread answered, recorded and resolved, the audit validator's logic passes, the PR body, title and commits match no closing keyword, and the commit-id check prints nothing |
…review round Co-Authored-By: Claude Opus 5.5 <[email protected]>
…R 2859 audit Co-Authored-By: Claude Opus 5.5 <[email protected]>
…w round in the PR 2859 audit Co-Authored-By: Claude Opus 5.5 <[email protected]>
…iew round Co-Authored-By: Claude Opus 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at d0eca805bdac634f2ca23e904bd8b624d3132c0b. Recomputed from the bytes at this head, against the merge base 24230dd01; git merge-tree against develop 1bb188769 merges without conflict.
Process: unchanged (fix-bug, create-issue, commit-changes, open-pull-request, process-pr-review).
The change against its claim: the code is unchanged since 5c9c724a9. 2a4347cce moves Check 3 under V4, adds an 11:45 spec log entry whose counts match the tree, and refreshes both last-updated-utc values. f7103922e adds row F31 for the fourth review's thread. af3062ee5 fills in F31's Reply URL (discussion_r4573381707), and d0eca805b logs the round. Both log entries match the capture.
Findings from earlier rounds: F26 and F28 are resolved; F1-F19, F25 and F27 stay resolved. All 31 threads have an author reply on their own thread, a row naming it, and a resolution in the capture; none was opened after this head's last audit commit. The validator's logic passes offline (31 rows, 7 log entries, 0 failures).
Consistency: no placeholders remain; the evidence headings run V1, V2, V3, V4, Recheck 1, Recheck 2, Check 3, Conclusion; the body is unchanged from the approved head.
Hygiene: author equals committer on the four new commits, each ending with an attribution footer, which no rule forbids. git diff --check is clean. The commit-id check prints nothing, and the body, title and folded commit messages match no closing keyword.
Findings: F29 Nit, not blocking: F31's Relationship names an unrelated row.
Checked, no finding: F31's source review id and severity match its comment, and the 11:49 log entry's account of the round matches the capture.
Checks
On the loop's compute node at this head, against the merge base 24230dd01 (receipt server-gates-kranich-881): the repository's pre-commit gate and lint roster exit 0 (75 s wall); the repository's audit validator on pr-2859-review exits 0 (31 rows, 7 log entries, no failures), where at f7103922e it failed once on F31's Reply URL (receipt server-gates-kranich-880). Package tests: the code is unchanged since 5c9c724a9, where the two crates changed in round 4 passed (receipt pkgtest-2859-r4, 258 passed, 0 failed, 13 ignored); the other changed crates passed at 88908a9cb (receipt pkgtest-2859-r3) and their files have not changed since. Read on the forge at posting: all 31 review threads are answered and resolved, and GitHub lists no closing issue reference for this PR. GitHub checks at this head at posting time: "". At posting, develop is 1bb188769.
|
ACK d0eca80 — every thread answered, recorded and resolved, the audit validator's logic passes, the PR body, title and commits match no closing keyword, and the commit-id check prints nothing |
…he PR 2859 audit Co-Authored-By: Claude Opus 5.5 <[email protected]>
… 2859 audit Co-Authored-By: Claude Opus 5.5 <[email protected]>
… round in the PR 2859 audit Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ew round Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
ACK ac8d0a3 |
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at ac8d0a3439d3a668dd55f68753bef8c4204161d8. Recomputed from the bytes at this head, against the merge base 24230dd01; git merge-tree against develop 1bb188769 merges without conflict.
Process: unchanged (fix-bug, create-issue, commit-changes, open-pull-request, process-pr-review).
The change against its claim: the code is unchanged since 5c9c724a9. c2322834c sets F31's Relationship to ORIGINAL, and e7e5d82b1 adds row F32 for the fifth review's thread. 3a1fffdbf fills in row F32's Reply URL (discussion_r4573429630), and ac8d0a343 logs the round. Both entries match the capture.
Findings from earlier rounds: F32 and F29 are resolved; F1-F19 and F25-F28 stay resolved. All 32 threads have an author reply on their own thread, a row naming it, and a resolution in the capture; none was opened after this head's last audit commit. The validator's logic passes offline (32 rows, 8 log entries, 0 failures).
Consistency: no placeholders remain, the findings table is contiguous, and the body is unchanged from the approved head.
Hygiene: author equals committer on the four new commits, each ending with an attribution footer, which no rule forbids. git diff --check is clean. The commit-id check prints nothing, and the body, title and folded commit messages match no closing keyword.
Findings: none.
Checked, no finding: row F32's source review id and severity match its comment; the 12:04 log entry's account of the round matches the capture; every row's Reply URL is an author reply on its own thread.
Checks
On the loop's compute node at this head, against the merge base 24230dd01 (receipt server-gates-kranich-883): the repository's pre-commit gate and lint roster exit 0 (56 s wall); the repository's audit validator on pr-2859-review exits 0 (32 rows, 8 log entries, no failures), where at e7e5d82b1 it failed once on row F32's Reply URL (receipt server-gates-kranich-882). Package tests: the code is unchanged since 5c9c724a9, where the two crates changed in round 4 passed (receipt pkgtest-2859-r4, 258 passed, 0 failed, 13 ignored); the other changed crates passed at 88908a9cb (receipt pkgtest-2859-r3) and their files have not changed since. Read on the forge at posting: all 32 review threads are answered and resolved, and GitHub lists no closing issue reference for this PR. GitHub checks at this head at posting time: "Package Coverage (torrust-tracker-axum-http-server): in_progress/pending; Package Coverage (torrust-tracker-axum-health-check-api-server): in_progress/pending; Package Coverage (torrust-tracker-axum-rest-api-server): in_progress/pending; Package Coverage (torrust-tracker): in_progress/pending; Package Coverage (torrust-tracker-udp-server): in_progress/pending; Discover Package Coverage: completed/success; Generate Coverage Report: in_progress/pending; Docs Lint: completed/success; Docker E2E: completed/skipped; Build on macos-latest (nightly): in_progress/pending; Build on ubuntu-latest (stable): completed/success; Build on windows-latest (nightly): in_progress/pending; Build on windows-latest (stable): in_progress/pending; Build on ubuntu-latest (nightly): completed/success; Build on macos-latest (stable): in_progress/pending; Unit (stable): in_progress/pending; Unit (nightly): in_progress/pending; Layer Boundary Bans: completed/success; Documented Clippy Allows: completed/success; Workspace Packaging: completed/success; Shipped Features: completed/success; Test (Docker) (release): queued/pending". At posting, develop is 1bb188769.
|
ACK ac8d0a3 — every thread answered, recorded and resolved, the audit validator's logic passes, the PR body, title and commits match no closing keyword, and the commit-id check prints nothing |
|
ACK ac8d0a3 |
… the #2393 patch 4e8a8c7 docs(pr-reviews): [#2392] record the Copilot findings of the third PR 2862 round (josecelano-bot) 3c4c762 docs(pr-reviews): [#2392] quote the rewritten 12:17 entry in the PR 2862 processing log (josecelano-bot) 52fcd77 docs(pr-reviews): [#2392] record the third PR 2862 review round (josecelano-bot) 876e6c8 docs(issues): [#2392] stamp the second-round EPIC log entry with the merge time (josecelano-bot) e4f3dfc docs(pr-reviews): [#2392] record the merge of develop in the PR 2862 audit (josecelano-bot) 766d591 docs(issues): [#2392] say the second review round merged develop into the EPIC branch (josecelano-bot) cbd9d70 docs(pr-reviews): [#2392] record the second PR 2862 review round (josecelano-bot) 4c929ec docs(issues): [#2392] record the #2393 T5 decisions and the loopback helper in the EPIC (josecelano-bot) 92704d3 docs(pr-reviews): [#2392] correct a future time in the PR 2862 processing log (josecelano-bot) 0b58574 docs(pr-reviews): [#2392] cite the round-1 head of PR 2862 by its commit subject (josecelano-bot) e56f2dd docs(pr-reviews): [#2392] record the first PR 2862 review round (josecelano-bot) 38ef117 docs(issues): [#2392] log the first PR 2862 review round in the EPIC and #2394 specs (josecelano-bot) f954560 docs(issues): [#2394] keep cross-run Rust port collisions in the T2 audit (josecelano-bot) 1b01daf docs(issues): [#2392] add the released-port-probed-dead racing shape (josecelano-bot) c4caf96 docs(issues): [#2392] say the rewritten #2393 tests never needed a racing port (josecelano-bot) 5946edd docs(issues): [#2392] name the 18 and 21 ignored tests behind each #2393 recheck (josecelano-bot) d893c8a docs(issues): [#2392] sync the test isolation EPIC after the #2393 patch (josecelano-bot) Pull request description: ## Summary Spec-only update of EPIC #2392 (Test isolation) after #2393's PR #2859 merged and its T5 decisions landed on `develop` (PR #2863). No code changes. It is done before any other subissue of the EPIC starts implementation, so they start from the current decisions. - `docs/issues/open/2392-test-isolation/EPIC.md`: - Status `in-progress`. Order 1 (#2393) is `IN_PROGRESS`: PR #2859 ignored 21 racing tests and rewrote 4 that never needed a racing port; the full suite passed 150 of 150 runs with the 18 tests ignored at that head, and 20 of 20 with the final 21. T5 is decided (delete 9, rewrite 3, restore 9 on a unique loopback address); T7 to T11 are open. - A new `Decisions` section: disable racing tests first (2026-11-14), no listener handoff for now (2026-11-14), no new shared port helper (2026-11-14), the #2393 T5 decisions (2026-11-15), and the approved loopback-address helper, which chooses an IP address, not a port (2026-11-15). - Four racing port shapes found by #2393, listed next to the isolation rules: bind, drop, reuse; release, then rebind; released port handed back within one test; released port probed and expected dead. - The Phase 1 state, the AC2 evidence (stays TODO until #2393 T10), a risk for the coverage lost until #2393 T9 restores the release tests, and progress-log entries. - `docs/issues/open/2394-2392-audit-shared-test-resources/ISSUE.md`: the Network ports row lists the three racing shapes beyond bind-and-release; T2 reuses #2393's per-test inventory, marks Covered only the rows #2393 owns, and still audits Rust tests for collisions between concurrent runs (for example the fixed ports in `tests/metrics/fixed_ports.rs`) as well as E2E runners, Compose files, container test scripts and CI workflow steps. - `docs/pr-reviews/pr-2862-review/PR-REVIEW.md`: the review audit record for this PR. No new isolation rule is added: the three racing shapes beyond rule 3 are recorded as findings, and whether they become rules is left to Phase 4. In review round 2, `develop` was merged into the branch to pick up the #2393 T5 decisions (PR #2863); the branch history is not rewritten, and the audit record cites commits by subject. ## Validation - Pre-commit hook (`linter all`, frontmatter validator and the rest of the gate) passes on every commit. - `validate-audit-record.py --pr-number 2862` runs before each audit commit; the audit's Processing Log records each round. - The PR-branch commit-id check and the closing-keyword scan run before each push. Related to #2392 Related to #2393 Related to #2394 🤖 Generated with [Claude Code](https://claude.com/claude-code) ACKs for top commit: da2ce7: ACK 4e8a8c7 — F1 to F7 are fixed in the bytes at this head, the trial merge with develop equals the head tree, and the audit record passes the validator's logic with all twelve threads replied to, recorded and resolved josecelano: ACK 4e8a8c7 Tree-SHA512: 8db25dffe9c510d66c4dade43f32ee0c95f3adf1cb716cca07be3c59bbe06506f63b525c3bb6e2f1d24a8be8c561cfc8f14ec0ab79702de5912aa9b00e63a241
… mark it DONE in EPIC #2392 affdcc1 docs(pr-reviews): [#2393] record Copilot's re-raise of F7 in the PR 2883 audit (josecelano-bot) 57eb8ac docs(pr-reviews): [#2393] cite F6's fix by its reply in the PR 2883 audit (josecelano-bot) a34c277 docs(pr-reviews): [#2393] record da2ce7's second-round findings in the PR 2883 audit (josecelano-bot) 1a5f7d1 docs(issues): [#2392] give the restored tests' non-Linux ignore the spec's reason (josecelano-bot) 1574471 docs(pr-reviews): [#2393] add the PR 2883 review audit (josecelano-bot) 61e30a9 docs(issues): [#2392] name the restored tests' loopback address the way the EPIC does (josecelano-bot) 55a3672 docs(issues): [#2393] state the T11 close-out in the past tense (josecelano-bot) 0b2c66c docs(issues): [#2392] mark Phase 1 done and sync AC2 and the coverage risk with #2393 (josecelano-bot) c88dfbc docs(issues): [#2393] stamp the archive entries with the archive commit time (josecelano-bot) 3afe68c chore(issues): [#2393] archive the closed issue spec and mark it DONE in EPIC #2392 (josecelano-bot) Pull request description: Close-out (T11) for #2393, which PR #2874 closed. - Verified #2393 is `CLOSED` on GitHub. - Moved `docs/issues/open/2393-2392-test-port-allocation-races/` to `docs/issues/closed/`, set `status: done`, the new `spec-path`/`issue-spec` and `last-updated-utc`, set T11 to DONE and logged the archive. - EPIC #2392: order 1 set to DONE with its outcome (PRs #2859 and #2874, 150 of 150 full-suite runs with no #2393 test ignored, #2867 found along the way), path updated, progress log entry added. - #2394's spec: link updated to the new path. - Past PR review records (`docs/pr-reviews/pr-2859-review/`, `pr-2863-review/`) keep the old path as a historical record. - Pre-commit checks passed. **History rewritten:** for review finding F2, the first commit's body was reworded to drop a closing keyword; its tree is unchanged. The head that the first review round and its ACKs cite is that commit, `chore(issues): [#2393] archive the closed issue spec and mark it DONE in EPIC #2392`, before the reword. The review fixes follow it as separate commits. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ACKs for top commit: josecelano: ACK affdcc1 da2ce7: ACK affdcc1 — F4 to F6 recomputed as fixed, all nine threads replied, recorded and resolved with the audit validator's logic passing offline; one non-blocking finding on the pre-reword commit id Tree-SHA512: d921fdafb9aeff30a1762d9482642cfe83030fd5c6554c92470c29dbb5d5f7431ed0e8d831157f1b9ee9932bc1319a8b07a7c2caf483008be79057b32f25ff18


Related to #2393
Summary
The maintainer narrowed #2393 to a quick patch that removes the flakiness: no owned-listener seam, no production API change, no new port helper. The earlier shared-helper change in this PR was reverted.
Three racing shapes were found (details in
docs/issues/open/2393-2392-test-port-allocation-races/ISSUE.md):0, drops the socket and hands the address to the server.0, then rebinds the released port to prove it was freed.0can get the same port.Changes:
#[ignore = "flaky port race, see #2393"]. Eighteen prove the tracker releases its socket after a stop, a drop or a failure; three prove the health-check report shows a stopped service as failing. Each needs a real bound port.it_should_register_the_service_with_a_health_check_that_reaches_the_running_server(udp-server) binds127.0.0.1:0and reads the bound address.it_should_cancel_the_udp_tracker_component_through_the_job_manager(src/app.rs) uses the configured port0.it_should_report_an_error_with_the_checked_url_when_nothing_listens_on_the_checked_address(axum-rest-api-server) checks a socket the test binds to port0and never listens on.it_should_not_return_while_processors_orphaned_by_the_request_ring_are_still_running(udp-server) keeps its processors-joined contract; its socket-release assertion moved to an ignored companion test.stopped_after_registrationcontract tests now start the health-check API before stopping the probed service, which removes the self-collision. They are still ignored, because they expect the released port to be dead.Still open
T5: the 21 ignored tests await the maintainer's decision (delete, rewrite, or keep disabled). The issue stays open for T5.
Verification
manual-verification-evidence.md: 150 runs ofcargo nextest run --tests --all-features --no-fail-fastfound 2 failures (the third shape above); afterfix(tests): [#2393] start the health-check API before stopping the probed service, 150 of 150 runs passed (1808 passed, 18 skipped each). The later commits only move tests between running and ignored; 20 more full-suite runs after them all passed (1806 passed, 21 skipped each).Review processing
The review audit is in
docs/pr-reviews/pr-2859-review/PR-REVIEW.md.🤖 Generated with Claude Code