From 08e4d2bffd9f320275cc39123f00fbdaf7335087 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Fri, 13 Nov 2026 10:38:41 +0000 Subject: [PATCH 1/3] fix(container): [#2855] stop the tracker with timeout --foreground uutils' timeout (the default on Ubuntu 26.04/26.04.1 via rust-coreutils) does not forward SIGINT to the docker run client unless --foreground is set. The self-hosted CI runner's rust-coreutils was upgraded 0.8.0 -> 0.10.0 on 2026-11-12, which regressed the Container workflow's Run Persistence Transition Regression step: the client was SIGKILLed by --kill-after instead of shutting the tracker down gracefully, giving exit status 137 instead of the accepted 0 or 124. Also report the unexpected exit status on failure, to make the next failure diagnosable without re-running under -x. Co-Authored-By: Claude Sonnet 5 --- .../tests/test-mounted-no-persistence-configuration.sh | 10 +++++++++- project-words.txt | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/contrib/dev-tools/containers/tests/test-mounted-no-persistence-configuration.sh b/contrib/dev-tools/containers/tests/test-mounted-no-persistence-configuration.sh index e54eeff1c6..2c8e9e02cc 100644 --- a/contrib/dev-tools/containers/tests/test-mounted-no-persistence-configuration.sh +++ b/contrib/dev-tools/containers/tests/test-mounted-no-persistence-configuration.sh @@ -29,13 +29,21 @@ NEW_DATABASE="${TEST_DIRECTORY}/lib/database/new.sqlite3" run_tracker() { local exit_status=0 - timeout --signal=INT --kill-after=3s 10s docker run --rm \ + # --foreground: without it, uutils' `timeout` (the default `timeout` on Ubuntu 26.04 and + # later, from the `rust-coreutils` package) does not forward SIGINT to `docker run`, so the + # container never receives the signal and is SIGKILLed by --kill-after instead (exit 137). + # GNU coreutils' `timeout` forwards the signal either way, so the flag is a no-op there. + timeout --foreground --signal=INT --kill-after=3s 10s docker run --rm \ --env USER_ID="$(id -u)" \ --volume "${TEST_DIRECTORY}/etc:/etc/torrust/tracker:rw" \ --volume "${TEST_DIRECTORY}/lib:/var/lib/torrust/tracker:rw" \ --volume "${TEST_DIRECTORY}/log:/var/log/torrust/tracker:rw" \ "${IMAGE_TAG}" || exit_status=$? + if [ "${exit_status}" -ne 0 ] && [ "${exit_status}" -ne 124 ]; then + echo "run_tracker: unexpected exit status ${exit_status} (expected 0 or 124)" >&2 + fi + test "${exit_status}" -eq 0 -o "${exit_status}" -eq 124 } diff --git a/project-words.txt b/project-words.txt index a448719d6a..aa14264ba1 100644 --- a/project-words.txt +++ b/project-words.txt @@ -613,6 +613,7 @@ urlencode uroot usize utoipa +uutils valgrind valueonly valuevec From a186f9e8ea91848e85d0c3139ce99ea8384ccdeb Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Fri, 13 Nov 2026 15:40:24 +0000 Subject: [PATCH 2/3] fix(container): [#2855] address PR #2857 review findings F2-F4,F7 Rewords the comment above the timeout invocation: names the client, not the container, as what --kill-after SIGKILLs (F2); names the uutils version the regression was observed on, 0.10.0 (F3); and states that --foreground has the same effect under GNU timeout only for this single-command invocation, not in general (F4). Consolidates the duplicated 0-or-124 exit-code check into one case statement that both prints the diagnostic and fails, replacing the obsolescent test ... -o ... form (F7). Co-Authored-By: Claude Sonnet 5 --- ...st-mounted-no-persistence-configuration.sh | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/contrib/dev-tools/containers/tests/test-mounted-no-persistence-configuration.sh b/contrib/dev-tools/containers/tests/test-mounted-no-persistence-configuration.sh index 2c8e9e02cc..354569f750 100644 --- a/contrib/dev-tools/containers/tests/test-mounted-no-persistence-configuration.sh +++ b/contrib/dev-tools/containers/tests/test-mounted-no-persistence-configuration.sh @@ -29,10 +29,12 @@ NEW_DATABASE="${TEST_DIRECTORY}/lib/database/new.sqlite3" run_tracker() { local exit_status=0 - # --foreground: without it, uutils' `timeout` (the default `timeout` on Ubuntu 26.04 and - # later, from the `rust-coreutils` package) does not forward SIGINT to `docker run`, so the - # container never receives the signal and is SIGKILLed by --kill-after instead (exit 137). - # GNU coreutils' `timeout` forwards the signal either way, so the flag is a no-op there. + # --foreground: without it, uutils' `timeout` 0.10.0 (the default `timeout` on Ubuntu 26.04 + # and later, from the `rust-coreutils` package) does not forward SIGINT to `docker run`, so + # the tracker never receives the signal and `--kill-after` SIGKILLs the `docker run` client + # instead (exit 137), leaving the container running. GNU coreutils' `timeout` forwards the + # signal either way, so the flag has the same effect here, for this single-command + # invocation. timeout --foreground --signal=INT --kill-after=3s 10s docker run --rm \ --env USER_ID="$(id -u)" \ --volume "${TEST_DIRECTORY}/etc:/etc/torrust/tracker:rw" \ @@ -40,11 +42,13 @@ run_tracker() { --volume "${TEST_DIRECTORY}/log:/var/log/torrust/tracker:rw" \ "${IMAGE_TAG}" || exit_status=$? - if [ "${exit_status}" -ne 0 ] && [ "${exit_status}" -ne 124 ]; then + case "${exit_status}" in + 0 | 124) ;; + *) echo "run_tracker: unexpected exit status ${exit_status} (expected 0 or 124)" >&2 - fi - - test "${exit_status}" -eq 0 -o "${exit_status}" -eq 124 + return 1 + ;; + esac } configure_sqlite_database() { From 38d7631fbd8c82103c818bcc6977466239612c32 Mon Sep 17 00:00:00 2001 From: josecelano-bot Date: Fri, 13 Nov 2026 15:45:55 +0000 Subject: [PATCH 3/3] docs(pr-reviews): [#2855] create the PR 2857 review audit record Creates docs/pr-reviews/pr-2857-review/PR-REVIEW.md (started late): records da2ce7's five findings and Copilot's two, their dispositions, and the reply/resolution each thread got. Co-Authored-By: Claude Sonnet 5 --- docs/pr-reviews/pr-2857-review/PR-REVIEW.md | 156 ++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 docs/pr-reviews/pr-2857-review/PR-REVIEW.md diff --git a/docs/pr-reviews/pr-2857-review/PR-REVIEW.md b/docs/pr-reviews/pr-2857-review/PR-REVIEW.md new file mode 100644 index 0000000000..cc33c7ab75 --- /dev/null +++ b/docs/pr-reviews/pr-2857-review/PR-REVIEW.md @@ -0,0 +1,156 @@ +--- +semantic-links: + skill-links: + - process-pr-review + related-artifacts: + - .github/skills/dev/pr-reviews/process-pr-review/SKILL.md +--- + +# PR #2857 Review Audit + +Source: pull-request reviews and inline review threads for https://github.com/torrust/torrust-tracker/pull/2857. + +## Ownership + +The PR author owns this tracked audit record. Reviewers, including repository review agents, +deliver findings through GitHub and have no repository-artifact obligation. + +- Post-merge workflow approval: N/A + +This record was created late, after the findings below were already fixed and replied to on +GitHub; see the Processing Log. + +## Status Values + +- Relationship: `ORIGINAL`, `RE_RAISE_OF:` +- Disposition: `FIXED`, `NO_ACTION`, `SUPERSEDED`, `FOLLOW_UP` +- Thread state: `OPEN`, `RESOLVED`, `NON_RESOLVABLE`, `SUPERSEDED`. `OPEN` applies prospectively + to audits created or updated for approved follow-up work; historical audits remain valid without + bulk migration. +- Severity: `Blocker`, `Major`, `Minor`, `Nit`, `Suggestion`; append `(inferred)` when derived + from free prose. +- Author class: `Copilot`, `Human`, `Unknown` +- Category: `link-integrity`, `formatting`, `metadata`, `testing`, `correctness`, + `documentation`, `maintainability`, `security`, `other` +- An outdated thread whose concern was fixed is `FIXED`/`RESOLVED`, even when GitHub marks the + original thread outdated after the push. For in-PR feedback, use `NO_ACTION`/`SUPERSEDED` only + for a duplicate, superseded, or no-change concern. A post-merge `NO_ACTION` requires maintainer + approval to decline the follow-up work. +- When the current identity cannot resolve a thread (`viewerCanResolve` is `false`), keep the + disposition established from the current tree and record `Thread state=OPEN`. The reviewer or PR + author resolves it; permission says nothing about whether the concern was fixed. + +## Findings + +Round 1 is `da2ce7`'s approving review `5889979674` (F1 to F5) and +`copilot-pull-request-reviewer`'s review `5890022304` (F6 and F7, no reviewer-provided ids), both +submitted on the head whose last commit had the subject `fix(container): [#2855] stop the tracker +with timeout --foreground`. `da2ce7`'s review was dismissed by GitHub when the fix commit below +was pushed (a stale-approval dismissal, not a new round). + +| Finding ID | Review finding reference | Author class | Severity | Category | Relationship | Disposition | Thread state | +| ---------- | ------------------------ | ------------ | -------- | -------- | ------------ | ----------- | ------------ | +| F1 | review-finding:pr-2857-f1 | Human | Minor | maintainability | ORIGINAL | NO_ACTION | RESOLVED | +| F2 | review-finding:pr-2857-f2 | Human | Minor | documentation | ORIGINAL | FIXED | RESOLVED | +| F3 | review-finding:pr-2857-f3 | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | +| F4 | review-finding:pr-2857-f4 | Human | Nit | documentation | ORIGINAL | FIXED | RESOLVED | +| F5 | review-finding:pr-2857-f5 | Human | Nit | metadata | ORIGINAL | FIXED | RESOLVED | +| F6 | review-finding:pr-2857-f6 | Copilot | Minor (inferred) | maintainability | ORIGINAL | NO_ACTION | RESOLVED | +| F7 | review-finding:pr-2857-f7 | Copilot | Minor (inferred) | maintainability | ORIGINAL | FIXED | RESOLVED | + +## Finding Details + +### F1 - Evidence not in this PR; `Closes` would close the issue before it lands + +- PR number: 2857 +- Source review ID: 5889979674 +- Reviewer finding ID: N/A +- Source URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4562610540 +- Concern: `manual-verification-evidence.md` for #2855 lives only on the unmerged spec PR #2856's branch, and `create-issue` asks the spec-only PR to merge before implementation; merging this PR first would close #2855 while its evidence is unmerged. +- Solution: No action on the PR structure (the implementation was already open and reviewed before this was raised; splitting it now would discard reviewed work). Stated the intended merge order explicitly in the description instead: #2856 first, then this PR. +- Current-tree verification: `gh-bot pr view 2857 --json body` shows the added "Intended merge order" sentence. +- Resolution reference: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4565424073 +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4565424073 + +### F2 - Comment says the container is SIGKILLed, not the client + +- PR number: 2857 +- Source review ID: 5889979674 +- Reviewer finding ID: N/A +- Source URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4562610551 +- Concern: `timeout` signals only its direct child (the `docker run` client) and that child's process group, not the container running under the Docker daemon; the comment said "the container ... is SIGKILLed", which is imprecise and contradicts the description/commit message. +- Solution: Reworded the comment to "the tracker never receives the signal and `--kill-after` SIGKILLs the `docker run` client instead (exit 137), leaving the container running." +- Current-tree verification: `contrib/dev-tools/containers/tests/test-mounted-no-persistence-configuration.sh` lines 32-37 (comment above `run_tracker`'s `timeout` call). +- Resolution reference: fix(container): [#2855] address PR #2857 review findings F2-F4,F7 +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4565425149 + +### F3 - uutils behaviour stated without its version + +- PR number: 2857 +- Source review ID: 5889979674 +- Reviewer finding ID: N/A +- Source URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4562610555 +- Concern: The comment named uutils `timeout` generically, though the regression is attributed specifically to the 0.8.0-to-0.10.0 upgrade; 0.8.0 is documented as having delivered the signal without `--foreground`. +- Solution: The comment now names the version the failure was observed on, 0.10.0. +- Current-tree verification: Same script lines as F2. +- Resolution reference: fix(container): [#2855] address PR #2857 review findings F2-F4,F7 +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4565426075 + +### F4 - "the flag is a no-op there" holds only for this invocation + +- PR number: 2857 +- Source review ID: 5889979674 +- Reviewer finding ID: N/A +- Source URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4562610563 +- Concern: GNU `timeout --foreground` changes process-group behaviour generally (it stays in the caller's process group, so descendants of the command are not timed out); calling it a blanket no-op is wrong for a command with descendants. +- Solution: Reworded to "has the same effect here, for this single-command invocation." +- Current-tree verification: Same script lines as F2. +- Resolution reference: fix(container): [#2855] address PR #2857 review findings F2-F4,F7 +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4565427002 + +### F5 - PR title missing `[#2855]`; description omits a touched file + +- PR number: 2857 +- Source review ID: 5889979674 +- Reviewer finding ID: N/A +- Source URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4562610574 +- Concern: `open-pull-request` asks for `[#]` in the title of a PR that closes the issue (the merge tool copies the title into the merge commit subject), and for the description to name every touched file, including `project-words.txt`. +- Solution: Added `[#2855]` to the title and a "Files touched" section naming both files. +- Current-tree verification: `gh-bot pr view 2857 --json title,body`. +- Resolution reference: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4565427781 +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4565427781 + +### F6 - Copilot: `--foreground` unsupported on BusyBox `timeout` + +- PR number: 2857 +- Source review ID: 5890022304 +- Reviewer finding ID: N/A +- Source URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4562638868 +- Concern: BusyBox's `timeout` does not support `--foreground`, which could turn a previously-working environment into a hard failure; suggested gating the flag behind a feature check. +- Solution: No action: the script's shebang is `#!/usr/bin/env bash` and it already uses bash-only constructs, so it targets this project's own dev machines and the self-hosted CI runner (GNU or uutils coreutils), never BusyBox. +- Current-tree verification: `head -1 contrib/dev-tools/containers/tests/test-mounted-no-persistence-configuration.sh` shows the bash shebang. +- Resolution reference: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4565430472 +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4565430472 + +### F7 - Copilot: exit-code check duplicated + +- PR number: 2857 +- Source review ID: 5890022304 +- Reviewer finding ID: N/A +- Source URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4562638943 +- Concern: 0 and 124 were encoded once in the diagnostic `if` and again in the final `test ... -o ...`, and `test ... -o ...` is obsolescent across shells. +- Solution: Consolidated into a single `case "${exit_status}" in 0 | 124) ;; *) ... return 1 ;; esac`, which both prints the diagnostic and fails, replacing `test ... -o ...`. +- Current-tree verification: Ran the fixed script locally (`bash contrib/dev-tools/containers/tests/test-mounted-no-persistence-configuration.sh`); exit 0, both regression markers printed. +- Resolution reference: fix(container): [#2855] address PR #2857 review findings F2-F4,F7 +- Follow-up PR URL: N/A +- Reply URL: https://github.com/torrust/torrust-tracker/pull/2857#discussion_r4565428794 + +## Processing Log + +- 2026-11-13 15:44 UTC - Started this record late, after `da2ce7`'s review `5889979674` (5 findings, F1 to F5) and `copilot-pull-request-reviewer`'s review `5890022304` (2 findings, F6 and F7) were already fixed/declined and replied to. F2, F3, F4 and F7 fixed in commit `fix(container): [#2855] address PR #2857 review findings F2-F4,F7`; F5 fixed via `gh-bot pr edit` (title and description); F1 and F6 declined with reasoning. Replied on all seven threads, then resolved them.