Repository navigation
docs(issues): [#2393] record the T5 decisions for the ignored port-race tests - #2863
Conversation
…port-race tests The maintainer decided the twenty-one tests ignored by PR 2859: delete the nine that check test-support environments, rewrite the three health-check contract tests to probe an address the test holds, and restore the nine tests of the tracker's socket-release contract on a unique loopback address through a new test helper. Add the T7 to T11 plan, the red-then-green and recheck verifications, and the new acceptance criteria. Co-Authored-By: Claude Opus 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at f2b00fc0b2fa85f564582542055d51d3eb037e0c. Recomputed from the bytes at this head, against the merge base 2e64dff3a; git merge-tree against develop 2e64dff3a writes tree d6f4ea37 with no conflict, identical to the head tree.
Process: a spec-only update of an open bug spec, governed by create-issue (spec-first PR, verification policy, commit points, progress log naming the agent and model) and open-pull-request (issue keyword, durable references). The diff touches only docs/issues/, the description links with Related to, and T7 to T10 each carry a commit point.
The change against its claim: the 21 attributes #[ignore = "flaky port race, see #2393"] at the base match the 21 table rows by name and file, split 9 delete, 3 rewrite, 9 restore. The code statements hold: check_fn is public in the REST API and HTTP server modules and Launcher::check in the UDP one; the health-check API crate already dev-depends on all three; the UDP contract test expects Timed Out (contract.rs:456); the HTTP registration-failure path cancels, aborts and joins (server.rs:242-256); the UDP job wraps its loop in the abort-on-drop OwnedTask; torrust-tracker-test-helpers depends on rand and is a dev-dependency of all five affected crates; CI runs tests on Linux only and only builds on macOS and Windows; 0.0.0.0:0 configurations exist (tests/common/configuration.rs); (49/50)^150 = 0.048.
Consistency: no link is added, every related artifact resolves, the frontmatter keeps its quoted UTC-minute stamp, and nothing moves.
Hygiene: one commit with a Conventional subject carrying [#2393], a body that matches the diff, and author equal to committer. It carries one attribution footer and the description one footer line; no rule in the tree forbids either. git diff --check is clean, the PR-branch commit-id check prints nothing, and the closing-keyword pattern matches nothing in the title, description, commit message or spec.
Findings: F1 Minor (deletion premise), F2 Minor (Goal overclaims), F3 Nit (non-Linux reason), F4 Nit (T10 check), F5 Nit (unignored). None blocks.
Checked, no finding: the four phase-one rewrites run unignored; the port-0 restart test still runs; T5 is DONE with its checkpoint ticked; M5 and M6 defer their evidence to the implementation PR; the EPIC is untouched; no review thread exists, so no audit record is due.
Checks
On the loop's compute node at this head, against the merge base 2e64dff3a (receipt server-gates-kranich-890): the repository's pre-commit gate and lint roster exit 0 (132 s wall), which also settles F5 for this head's dictionaries. This PR has no audit record of its own yet, so the gate ran no validator for it. The PR changes documentation only, so no package tests apply. F1 checked against the bytes at posting: tests/metrics/fixed_ports.rs binds 0.0.0.0:17091 to 17093 and beyond in its lines 46-58, while the spec's line 144 says every other test binds port 0. F4 checked against the bytes: this spec's lines 83 and 313 quote #[ignore = "flaky port race, see #2393"], so an unscoped rg 'see #2393' matches them. GitHub checks at this head at posting time: "Docs Lint: completed/success". At posting, develop is 2e64dff3a.
|
ACK f2b00fc — the per-test decisions cover exactly the 21 ignored tests at the merge base and every code statement in the spec recomputes from the tree |
…0.0.1 races Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the testing environments Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The T5 verification process omits the required incremental test-design reviews after each passing test-producing increment and maintainer review after the final increment.
1 open issue
What changed in this PR
This spec-only PR records the decisions for the 21 tests ignored under #2393, preparing the next phase of test-port race fixes without changing production code.
Changes:
- Plans to delete nine test-support tests, rewrite three health-check tests, and restore nine socket-release tests.
- Defines a Linux-only random loopback-address helper and documents remaining wildcard-binding collision risks.
- Adds implementation tasks, per-test red/green verification, and a 150-run full-suite recheck.
| File | Description |
|---|---|
docs/issues/open/2393-2392-test-port-allocation-races/ISSUE.md |
Records test decisions, helper constraints, implementation steps, and acceptance criteria. |
Review effort: Balanced
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…T5 test increment Co-Authored-By: Claude Opus 5.5 <[email protected]>
…863 review round Co-Authored-By: Claude Opus 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 907c657a2f2e42ebe85e4d2bf28cd59b242cd043. Recomputed from the bytes at this head, against the merge base 2e64dff3a; git merge-tree against develop 2e64dff3a writes tree 0f349e67 with no conflict, identical to the head tree.
Process: eight commits fast-forward the round-1 head. Five fix round-1 findings F1 to F5, one adds the test-design loop that create-issue requires, and two create and complete the review audit record under process-pr-review.
The change against its claim: F1 to F5 stay fixed. F6 is fixed: the Bug-Fix Process now requires the write-unit-test loop for T8 and T9, and T8, T9, the checkpoint, AC7 and M7 reference it as V7 (create-issue/SKILL.md:179-190). The loop means the smallest increments, a recorded prose-first Arrange-Act-Assert review after each increment and before the next, and a maintainer stop after the last. F7 is fixed: the validator's logic, run offline against the captured comments and this PR's nine commit subjects, reports 6 rows, 2 log entries and 0 failures. Each of the six threads has a row, one reply on its own thread, and a resolution, and every reply cites a subject that is on the branch.
Consistency: three gaps remain, none blocking. The FIXED rows cite reply URLs where the skill asks for commit subjects (F8). The description's list of spec changes stops before the test-design review and omits the audit record (F9). The Verification Plan does not list V7 (F10).
Hygiene: eight Conventional commits, each subject-only with one attribution footer and author equal to committer; no rule in the tree forbids the footer. git diff --check is clean. The PR-branch commit-id check prints nothing: its two tokens are review IDs. The closing-keyword pattern matches nothing in the title, the description, the commit messages or the two files.
Findings: F6 and F7 are fixed. F8 Minor, F9 Minor and F10 Nit remain, and none blocks.
Checked, no finding: the trial merge; last-updated-utc and both new log stamps match their commit times; the audit's account of the dismissed approval and of the other review matches the timeline.
Checks
On the loop's compute node at this head, against the merge base 2e64dff3a (receipt server-gates-kranich-892): the repository's pre-commit gate and lint roster exit 0 (91 s wall), and the repository's audit-record validator for this PR passes with 6 rows, 2 log entries and 0 failures. At the previous head 6e6f81b7a (receipt server-gates-kranich-891) the same validator reported 10 failures over 5 rows, which 907c657a2 resolves. The PR changes documentation only, so no package tests apply. F10 checked against the bytes at posting: the Verification Plan's T5 line (lines 356 to 358) names V5 and V6, while lines 231, 329 and 347 require V7. GitHub checks at this head at posting time: "". At posting, develop is 2e64dff3a.
|
ACK 907c657 — F1 to F7 are fixed in the bytes at this head, and the audit record passes the validator's logic with every thread replied to, recorded and resolved |
|
ACK 907c657 |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…resolution references Co-Authored-By: Claude Opus 5.5 <[email protected]>
…2863 review round Co-Authored-By: Claude Opus 5.5 <[email protected]>
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at 3fc29eef6ade2e429a724d030fb4dde3c96d6e3b. Recomputed from the bytes at this head, against the merge base 2e64dff3a; git merge-tree against develop 2e64dff3a writes tree bd0c9620 with no conflict, identical to the head tree.
Process: three commits fast-forward the round-2 head: two fix F8 and F10 in the tree, and one logs the second review round in the audit record under process-pr-review. The description was edited for F9.
The change against its claim: F8, F9 and F10 are fixed. The Verification Plan lists V7 (line 358), the in-tree FIXED rows cite their fix commit subjects, and the description names both files and covers AC4 to AC7, M5 to M7 and the V7 loop. F1 to F7 stay fixed.
Consistency: the audit record now has rows, details and a log entry for F8, F9 and F10. F9 keeps a reply URL because its fix is a description edit, as the skill allows. The validator's logic, run offline against the captured comments and this PR's twelve commit subjects, reports 9 rows, 3 log entries and 0 failures. Each of the nine threads has its row, one reply on its own thread, and a resolution, and every reply that names a commit cites a subject that is on the branch.
Hygiene: eleven Conventional commits, each subject-only with one attribution footer and author equal to committer; no rule in the tree forbids the footer. git diff --check is clean. The PR-branch commit-id check prints nothing: its three tokens are review IDs. The closing-keyword pattern matches nothing in the title, the description, the commit messages or the two files.
Findings: F11 (resolved threads without audit rows, seen at c890c8f61) is fixed. F12 Nit (no validation section in the description) remains and does not block.
Checked, no finding: the trial merge; the new commit touches only the audit record; its log entry is in order and matches the reply times.
Checks
On the loop's compute node at this head, against the merge base 2e64dff3a (receipt server-gates-kranich-894): the repository's pre-commit gate and lint roster exit 0, and the repository's audit-record validator for this PR passes with 9 rows, 3 log entries and 0 failures. The PR changes documentation only, so no package tests apply. F12 checked against the description at posting: it has no validation section. GitHub checks at this head at posting time: "". At posting, develop is 2e64dff3a.
|
ACK 3fc29ee — F1 to F11 are fixed in the bytes at this head, and the audit record passes the validator's logic with all nine threads replied to, recorded and resolved |
|
ACK 3fc29ee |
… 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

Related to #2393
Spec-only PR. It records the maintainer's decisions (T5) for the twenty-one tests that PR 2859 disabled with
#[ignore = "flaky port race, see #2393"]. The implementation PR starts after this one merges.Decisions
testingfeature's environments free their ports, which is test-support code. Every user of thetestingenvironments (the package tests and examples) binds port0, and the fixed-port suites start the main application, not these environments, so nothing depends on it.it_should_return_error_when_{api,http,udp}_service_was_stopped_after_registration). Each registers the service's public health-check function against an address the test holds for the whole test: a TCP socket bound and never listening (the check is refused), or a UDP socket that never answers (the check times out). No helper and no production change.JoinHandledetaches a task, so the release depends on the tracker's own cancel, join or abort code.The new test helper
The restored tests bind port
0on a random loopback address127.a.b.cinstead of127.0.0.1. On Linux the whole127.0.0.0/8range is loopback, and two sockets on different specific addresses can share a port, so another test that binds127.0.0.1:0and receives the released port no longer blocks the rebind that proves the release.127.0.0.1, and CI runs no tests off Linux. The restored tests are ignored on other systems.0.0.0.0on the same port can still collide. The implementation's 150-run recheck (V6) measures it.Files touched
docs/issues/open/2393-2392-test-port-allocation-races/ISSUE.md: Goal, Scope, the per-test decisions table, Architectural Decisions, Bug-Fix Process, Regression Test Strategy, the plan (T5 done, T7 to T11 to do), Workflow Checkpoints, Progress Log, acceptance criteria AC4 to AC7, Verification Plan, scenarios M5 to M7, and Risks. The Bug-Fix Process requires, for every restored or rewritten test, a red-then-green check (V5) and, for T8 and T9, thewrite-unit-testloop: smallest increments, a recorded prose-first Arrange-Act-Assert design review after each passing increment and before the next (V7), and a maintainer review after the final increment.docs/pr-reviews/pr-2863-review/PR-REVIEW.md: the audit record of this PR's review rounds.Validation
Documentation only, so no package tests apply. On every commit, the repository's pre-commit checks passed, including
linter all(markdown, cspell, yaml and the other linters) and the frontmatter validator. Theprocess-pr-reviewaudit validator reports 0 failures ondocs/pr-reviews/pr-2863-review/PR-REVIEW.md. The title, this description and every commit message were scanned with the closing-keyword pattern of theopen-pull-requestskill and match nothing, and no PR-branch commit id appears in the changed files.EPIC.mdis not changed: the EPIC coordinator's PR 2862 owns it.🤖 Generated with Claude Code