Skip to content

fix(wait-for-pr-review): [#2714] read the head after the feedback - #2815

Merged
josecelano merged 15 commits into
torrust:developfrom
josecelano-bot:2714-wait-for-pr-review-head-race
Nov 11, 2026
Merged

josecelano merged 15 commits into
torrust:developfrom
josecelano-bot:2714-wait-for-pr-review-head-race

Conversation

@josecelano-bot

@josecelano-bot josecelano-bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

wait-for-pr-review read the pull request head before the reviews and comments, so a review of a commit pushed in between could be reported with an older head_sha and no head_moved, and the review loop's stale-checkout check passed on a checkout that lacks the reviewed commit. The snapshot now fetches the head and state after the three feedback calls (option 1 of the spec, chosen by the maintainer), so the head in a result never predates a push that the feedback was already about when it was fetched. The one pull-request read moves to the end of the snapshot; the head is not read twice and no request is added. A push between the feedback reads and the head read makes head_moved true for feedback about the older head, a safe false alarm. A push after the head read is not in the snapshot, and the next poll reports it, unless that poll has new feedback to report first.

Closes #2714. Part of EPIC #2003.

Files touched

  • .github/skills/dev/pr-reviews/wait-for-pr-review/tool/src/snapshot.rs: read order; scripted FakeGh::replace_after; two head-race snapshot tests and an ordinary-case test.
  • .github/skills/dev/pr-reviews/wait-for-pr-review/tool/src/wait.rs: event-level regression test and an ordinary-case test; one existing test now scripts the feedback endpoints before the failing pull-request read.
  • .github/skills/dev/pr-reviews/wait-for-pr-review/SKILL.md: describes the ordering of head_sha.
  • docs/issues/open/2714-…/: spec decision, task and acceptance status, evidence V2.

Validation

  • Regression tests run red with the old read order (3 failed) and green with the fix (67 library and 27 integration tests passed).
  • Like-for-like recheck of the scripted reproduction (V1) on the fixed build: head_sha is the newer commit and head_moved is true (manual-verification-evidence.md, V2).
  • linter all exits 0; cargo clippy -p wait-for-pr-review --all-targets clean.
  • The race itself was never observed on GitHub; the interleaving is scripted.

🤖 Generated with Claude Code

josecelano-bot and others added 3 commits November 10, 2026 17:59
The head in a result was read before the reviews and comments, so a review of
a newer commit could be reported with an older head and head_moved false.
Read the pull request again after the feedback so the head is never older.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@josecelano-bot
josecelano-bot requested a review from a team as a code owner November 10, 2026 18:05

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.

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

4 open issues
What changed in this PR

Fixes a race in wait-for-pr-review where head_sha could be read before feedback endpoints, causing results to report an older head than the reviewed/commented commit.

Changes:

  • Reorders snapshot reads to fetch reviews/comments first and read PR head/state last.
  • Extends FakeGh with replace_after to script mid-snapshot state changes.
  • Adds/updates regression tests and updates skill/spec documentation to reflect the new head_sha semantics.
File Description
.github/​skills/​dev/​pr-reviews/​wait-for-pr-review/​tool/​src/​snapshot.rs Reorders snapshot read sequence; adds FakeGh::replace_after; adds regression tests.
.github/​skills/​dev/​pr-reviews/​wait-for-pr-review/​tool/​src/​wait.rs Adds event-level regression test and adjusts existing test scripting to match new request order.
.github/​skills/​dev/​pr-reviews/​wait-for-pr-review/​SKILL.md Documents that head_sha is read after feedback and clarifies head_moved consequences.
docs/​issues/​open/​2714-2003-wait-for-pr-review-head-race-between-requests/​ISSUE.md Records decision and updates tasks/acceptance criteria statuses.
docs/​issues/​open/​2714-2003-wait-for-pr-review-head-race-between-requests/​manual-verification-evidence.md Adds post-fix verification evidence and summarizes red/green regression runs.

Review effort: Lite

da2ce7
da2ce7 previously approved these changes Nov 10, 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 7e9d37d66ec050b35fc566256dcd624efa010215. Recomputed from the bytes at this head, against the merge base 4a46f98b2; git merge-tree against develop 4a46f98b2 merges without conflict and writes the head's own tree.

Process: a bug fix under fix-bug (.github/skills/dev/debugging/fix-bug/SKILL.md), with create-issue, write-unit-test, commit-changes and open-pull-request. The spec sections, red-then-green tests and V1/V2 evidence are present; F2, F3 and F8 mark where the evidence falls short.

The change against its claim: take_snapshot now reads the reviews, conversation comments and inline comments first and the one pull-request read last, so head_sha and the state come from a read made after the feedback; no second read is added. A model of both read orders over the scripted fakes reproduces V1 (head A, no head_moved) and V2 (head B, head_moved true) and the claimed red split: the review, comment and wait tests fail under the old order; the ordinary-case test and the edited deadline test pass under both. The CLI test fake keys on per-endpoint counters, so the integration tests do not depend on the order.

Consistency: links and anchors in the three changed Markdown files resolve; nothing is moved or renamed; the commit-id check of open-pull-request prints nothing; the dictionary is unchanged and every new word already occurs in the tree.

Hygiene: four Conventional commits using the trailing (#2714) or inline reference forms the history uses; author equals committer on each; each carries one attribution footer, which no rule in the tree forbids, and the description ends with an attribution line; git diff --check is clean; the closing-keyword pattern matches only Closes #2714 in the description, right for an implementation, and nothing in the title or the commits.

Findings (none blocks): F1 Minor, stale Risks section; F2 Minor, V2 names no commit; F3 Minor, ordinary-case test has no feedback; F4 Minor, fix commit body says the read is repeated; F5 Nit, linter all box; F6 Nit, false-alarm window wording; F7 Nit, comment test trigger; F8 Nit, test count and summary-only red/green; F9 Nit, spec status and stamp.

Checked, no finding: FakeGh::replace_after and its borrows; rustfmt layout of the new code; the deadline test's added scripting; the description's file list and "not read twice"; the head_moved contract of the review loop; the spec frontmatter against the validator's enumerations.

Checks

On the loop's compute node at this head, against the merge base 4a46f98b2 (receipt server-gates-kranich-641): the repository's pre-commit gate exit 0 (67 s), clippy-allow-reasons against the base exit 0, and the tree left clean. Package tests at this head: cargo test -p wait-for-pr-review exit 0 (93 passed, none failed). take_snapshot read at this head: the reviews, conversation comments and inline comments are fetched first (lines 129 to 134) and the single pull-request read follows them (line 139). GitHub checks at this head at posting time: "Package Coverage (wait-for-pr-review): queued/pending; Docs Lint: completed/success; Generate Coverage Report: completed/success; Discover Package Coverage: completed/success; Test (Docker) (release): in_progress/pending; Build on ubuntu-latest (stable): in_progress/pending; Build on windows-latest (stable): completed/success; Build on windows-latest (nightly): completed/success; Build on macos-latest (stable): completed/success; Build on macos-latest (nightly): completed/success; Build on ubuntu-latest (nightly): completed/success; Docker E2E: completed/skipped; Unit (stable): in_progress/pending; Layer Boundary Bans: completed/success; Unit (nightly): in_progress/pending; Documented Clippy Allows: queued/pending; Shipped Features: completed/success; Workspace Packaging: completed/success". At posting, develop is 4a46f98b2.

/// Returns an error when a request fails or a response does not have the expected shape.
pub fn take_snapshot(gh: &impl Gh, pull_request: &PullRequest) -> Result<Snapshot, Error> {
let pull_endpoint = pull_request.endpoint(&format!("pulls/{}", pull_request.number));
let reviews = fetch_all(gh, &format!("{pull_endpoint}/reviews?per_page=100"))?;

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.

[Minor][F4] The body of the fix commit describes a repeated read that its diff does not make.

0c7141853 says "Read the pull request again after the feedback so the head is never older", while its diff moves the one pull-request read below the three feedback reads (from this line on) and adds none. 7e9d37d66 corrects the same statement in the docs, not in this body. A commit message cannot change after merge; the repository keeps mistake-and-correction pairs and the correction commit states the right fact, so this does not block, but a reword before merge under the open-pull-request history rules would leave the fix commit describing itself.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed: the branch is pushed and under review, and the repository keeps mistake-and-correction pairs. The correction is in 7e9d37d (docs) and the code comment/doc now state the single moved read. If you want the commit body reworded before merge, say so and I will do it with a force-with-lease push.

@da2ce7

da2ce7 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

ACK 7e9d37d — the one pull-request read now follows the three feedback reads, and the red/green split of the new tests, the V1/V2 outputs and a conflict-free merge with develop were recomputed from the bytes at this head

…wait test, comment trigger, evidence

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@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 3a97a8b840beca1a03fdf548c0c94a5f35288339. Recomputed from the bytes at this head, against the previous round's head 7e9d37d66 and the merge base 4a46f98b2; git merge-tree against develop 4a46f98b2 merges without conflict and writes the head's own tree.

What moved: 2e7e9e713 and 3a97a8b84, fast-forwards of 7e9d37d66 in the five files of the pull request (+87/-24); the other 2,451 paths are byte-identical to 7e9d37d66.

Previous findings: F1 to F3 and F5 to F9 are fixed. Modelling both read orders gives the evidence's red split (review, comment and race tests fail; both ordinary cases pass), and the comment test now fails when the head is read between the reviews and comments reads. F4 stays open by choice and does not block.

The new commits: V2's claim holds (after the fix only comments and test code change), as do the counts (67 library tests, 64 + 3 red, and 27 integration tests). Twelve of thirteen threads are resolved with no audit record (F10); eleven replies cite branch commit ids (F11); the description keeps the old wording (F12); SKILL.md line 90 is unchanged (F13); the new stamps predate the review (F14); one commit carries eight fixes (F15); the green block carries an annotation (F16).

Hygiene: Conventional subjects, no body beyond one attribution footer each, which no rule in the tree forbids; author equals committer; git diff --check clean; the closing-keyword scan matches nothing.

Findings: F10 Minor, F11 Minor, F12 Nit, F13 Nit, F14 Minor, F15 Minor, F16 Nit. None blocks the code; the verdict is a comment until the audit record lands.

Checked, no finding: the open-pull-request commit-id check prints nothing for the tree; in-progress is a valid status; the reply on replace_after holds; the new wait test adds the head_moved assertion that the commit-baseline test at line 292 lacks.

Checks

On the loop's compute node at this head, against the merge base 4a46f98b2 (receipt server-gates-kranich-650): the repository's pre-commit gate exit 0 (69 s), clippy-allow-reasons against the base exit 0, and the tree left clean. Package tests at this head: cargo test -p wait-for-pr-review exit 0 (94 passed, none failed). docs/pr-reviews/pr-2815-review/PR-REVIEW.md is absent at this head while the review threads have replies. GitHub checks at this head at posting time: "". At posting, develop is 4a46f98b2.

@josecelano-bot

Copy link
Copy Markdown
Contributor Author

Finding F12: the PR description Summary was restated to match the code comment: it now separates a push between the feedback reads and the head read (a head_moved false alarm) from a push after the head read (reported by the next poll). The two test names were renamed in the commit test(wait-for-pr-review): name the head-race tests for the fetch order.

da2ce7
da2ce7 previously approved these changes Nov 10, 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 2c919d8d62a7741a8ac6f7d2b4c350db1b9c946e. Recomputed from the bytes at this head, against the previous round's head 3a97a8b84 and the merge base 4a46f98b2; git merge-tree against develop 4a46f98b2 merges without conflict and writes the head's own tree.

What moved: six commits, 3eef9adf9 to 2c919d8d6, fast-forward 3a97a8b84 in five files (+359/-9), one of them the new audit record; the other 2,452 paths are byte-identical to 3a97a8b84.

Previous findings:

  • F10 fixed: the record exists; the validator's own logic, run offline, passes its 20 rows and 5 log entries.
  • F11 fixed: the Commit Id Map covers every id the replies cite; this round's replies cite subjects.
  • F12 fixed: the description is restated; the old test names appear nowhere.
  • F13 fixed: SKILL.md lines 90 to 91 match detect (event.rs lines 181 to 224).
  • F14 fixed: the correction entry's times match git log --format=%cI.
  • F15 fixed for this round: one commit per finding.
  • F16 fixed: the label sits outside the block.

F4 is unchanged and stays open by choice; it does not block.

The new commits: the open-pull-request check prints 0c7141853, 2e7e9e713, 3a97a8b84 and 7e9d37d66, all from the record: the map that skill asks for, and two log entries (F18).

Hygiene: Conventional subjects, no body, one attribution footer each, which no rule in the tree forbids; author equals committer; git diff --check clean; the closing-keyword scan matches nothing.

Findings: F17 Minor, F18 Minor, F19 Nit, F20 Minor, F21 Nit, F22 Nit; none blocks. The record already uses F17 to F20, so its step 3 reassigns these ids.

Checked, no finding: the 20 rows match the 20 threads by review, severity bracket and reply thread; the renamed tests keep their bodies; head_moved is true on the next poll's feedback (event.rs line 224); the 67 and 27 test counts stand.

Checks

On the loop's compute node at this head, against the merge base 4a46f98b2 (receipt server-gates-kranich-651): the repository's pre-commit gate exit 0 (85 s), clippy-allow-reasons against the base exit 0, and the tree left clean; the repository's audit validator on pr-2815-review exit 0 (20 rows, 5 log entries, no failures). Package tests at this head: cargo test -p wait-for-pr-review exit 0 (94 passed, none failed). GitHub checks at this head at posting time: "". At posting, develop is 4a46f98b2.


## Processing Log

- 2026-11-10 19:36 UTC - Copilot's review (5848158391) arrived; `2e7e9e713` was committed at 19:36 UTC and the replies to its threads were posted after it.

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.

[Minor][F18] Two log entries cite branch commits by id.

This entry names 2e7e9e713 and the next one says the threads "were fixed in 3a97a8b84". This record's own rule at line 346 and open-pull-request (its SKILL.md lines 74 to 78) forbid citing a PR-branch commit by id in a review audit, and the commit-id check prints both ids from these lines. The Commit Id Map at lines 324 to 329 is the mapping that skill asks for (lines 129 to 130); the log entries can cite subjects in an appended correction.

## Processing Log

- 2026-11-10 19:36 UTC - Copilot's review (5848158391) arrived; `2e7e9e713` was committed at 19:36 UTC and the replies to its threads were posted after it.
- 2026-11-10 19:40 UTC - The maintainer's first-round threads F1 to F9 were fixed in `3a97a8b84` (commit time); their threads were answered and resolved after it, before this record existed. The first resolve loop also closed the nine threads before they were read; they were reopened, answered and resolved again.

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.

[Nit][F19] This entry says F1 to F9 were fixed and their threads resolved; F4 was neither.

Line 40 records F4 as NO_ACTION and OPEN, line 33 says it stays open, and its thread is unresolved. "F1 to F3 and F5 to F9" would match the rows.

Append entries only. If an entry was rewritten in place, restore the prior entries, then append a
correction that names the rewritten content; do not rewrite the record again.

## Completion Rules

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.

[Minor][F20] Status Values and Completion Rules leave out template text marked "Copied verbatim".

PR-REVIEW-TEMPLATE.md (lines 26 and 118) has these sections copied verbatim. This record cuts the Thread state bullet and drops the outdated-thread and viewerCanResolve bullets of Status Values, and two of six Completion Rules: the one that gives a no-change thread the Superseded by <FindingId>: <reason>. reply and keeps OPEN for a thread the identity cannot resolve, and the one on consolidated responses. The records of pull requests 2800, 2802, 2803, 2805 and 2806 carry every item. The dropped rule is the one F4 (NO_ACTION, OPEN by choice) and F17 (SUPERSEDED, with a "Not an issue" reply) depart from; copying the sections makes that visible.


```text
test snapshot::tests::it_should_fetch_the_head_after_a_conversation_comment_that_arrived_after_the_first_request ... FAILED
test snapshot::tests::it_should_fetch_the_head_after_a_review_that_arrived_after_the_first_request ... FAILED

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.

[Nit][F21] The red block now shows test names that the red run did not print, unless it was run again.

These lines were recorded in 3a97a8b84 under the old names, and fe5722c0a rewrote them to the new names. Neither that commit, which has no body, nor this file says the red run was repeated after the rename. If it was, say so here; if not, keep the names as printed and note the rename above the block, as F16 asked of the green block (process-pr-review SKILL.md lines 123 to 125).


<!-- skill-link: process-pr-review -->

# PR #2815 Review Audit

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.

[Nit][F22] The description's "Files touched" does not list this record.

It lists snapshot.rs, wait.rs, SKILL.md and the spec folder, but not docs/pr-reviews/pr-2815-review/PR-REVIEW.md, a 347-line file of this pull request, and the merge tool copies the description into the merge commit (open-pull-request SKILL.md lines 75 to 76). The anchor is this file's title.

@da2ce7

da2ce7 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

ACK 2c919d8 — the six new commits change only wording, two test names, the evidence and the new audit record, whose rows the validator's own logic accepts offline, and the head merges into develop 4a46f98b2 without conflict

da2ce7
da2ce7 previously approved these changes Nov 10, 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 35e76ee88265a5a9a81817406409b510e2c448bd. Recomputed from the bytes at this head, against the previous round's head 2c919d8d6 and the merge base 4a46f98b2; git merge-tree against develop 4a46f98b2 merges without conflict and writes the head's own tree.

What moved: two commits, 50eec9ec6 and 35e76ee88, a fast-forward of 2c919d8d6 that adds 16 lines to the audit record; the other 2,456 paths are byte-identical to 2c919d8d6.

Previous findings:

  • F17 fixed: the correction entry at line 352 records the order of events.

F4 and F18 to F22 are unchanged; the last five have no reply yet.

The new commits: 50eec9ec6 adds the F21 row, its detail entry and a correction entry. Its detail entry named the second review as the source, and the validator's own logic failed on it (F23). 35e76ee88 names review 5848852874 and logs the correction at line 353. Every detail entry now names the review that holds its source comment, and the validator's logic, run offline on the captured comments, passes 21 rows and 7 log entries. The row's RESOLVED now matches its thread, so F26 no longer applies. The commit-id check prints the same four ids as before, from the Commit Id Map and the two entries of F18; the new lines add none.

Hygiene: Conventional subjects, no body, one attribution footer each, which no rule in the tree forbids; author equals committer; git diff --check is clean; the closing-keyword scan matches nothing.

Findings: F23 Minor, fixed by 35e76ee88; F24 Minor; F25 Nit; F26 Nit, no longer applies. None blocks.

Checked, no finding: the new row's severity, reference, reply thread and resolution subject; the reassignment of the reviewer's F17 follows step 3; the times the entries cite match the forge and git log; the 20:29 and 20:33 stamps are no later than their commits and the log stays in order; the 20:33 entry's account matches the failure at 50eec9ec6.

Checks

On the loop's compute node at this head, against the merge base 4a46f98b2 (receipt server-gates-kranich-653): the repository's pre-commit gate exit 0 (51 s), clippy-allow-reasons against the base exit 0, and the tree left clean; the repository's audit validator on pr-2815-review exit 0 (21 rows, 7 log entries, no failures). At the previous head 50eec9ec6 (receipt server-gates-kranich-652) the validator failed once: "F21: Source review ID 5848499555 != r4530138247's review 5848852874", which this head fixes. Code is byte-identical to the previous round's head. GitHub checks at this head at posting time: "". At posting, develop is 4a46f98b2.

- Current-tree verification: The commit times come from `git log --format=%cI`; the reply times from the GitHub comments listing.
- Resolution reference: docs(pr-reviews): record the early statements of the F10 and F11 replies
- Follow-up PR URL: N/A
- Reply URL: https://github.com/torrust/torrust-tracker/pull/2815#discussion_r4530147854

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.

[Minor][F24] This reply calls the finding fixed and cites its commit before that commit existed, which repeats F17.

The reply was posted at 20:30:06 UTC and cites docs(pr-reviews): record the early statements of the F10 and F11 replies, which was committed at 20:30:07 UTC. The reply sits on a review of 2c919d8d6, so the head had not moved. process-pr-review asks for a statement only after the event and for a sweep for the same mistake (its SKILL.md lines 120 to 128). The correction entries at lines 352 and 353 do not record this; another one can.

- Source review ID: 5848852874
- Reviewer finding ID: F17
- Source URL: https://github.com/torrust/torrust-tracker/pull/2815#discussion_r4530138247
- Concern: The replies to F10 and F11 (20:07 UTC) cited the audit commit and said the record was validated, before the commit (20:09:01 UTC) and any passing validator run existed.

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.

[Nit][F25] Only the F10 reply said the record was validated.

This line and the log entry at line 352 say that the replies to F10 and F11 both said so. The F11 reply (r4529922028) cites the commit but says nothing about validation. The heading at line 321 gets this right.

@da2ce7

da2ce7 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

ACK 35e76ee — the two new commits change only the audit record, whose 21 detail entries now name the review that holds each source comment and pass the validator's own logic offline, and the head merges into develop 4a46f98b2 without conflict

@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 1ee2f89659c35bff28afcbf5c186b78e16fe8af7. Recomputed from the bytes at this head, against the previous round's head 35e76ee88 and the merge base 4a46f98b2; git merge-tree against develop 4a46f98b2 merges without conflict and writes the head's own tree.

What moved: one commit, 1ee2f8965, a fast-forward of 35e76ee88 that adds review-retrospective.md (95 lines); the other 2,457 paths are byte-identical to 35e76ee88.

Previous findings: none changed state. F4, F18 to F22, F24 and F25 stay open with no new reply; the description's "Files touched" (F22) now also leaves out the retrospective.

The new commit: the file sits where the template puts it, and its links and frontmatter paths resolve. Its counts of commits (15, 4 audit-only), audit findings (21) and re-raises (0) match the bytes, and so do its accounts of next() and of the validator's reply check. The validator's logic, run offline at this head, passes 21 rows and 7 log entries. The commit-id check prints the same four ids from the record and none from the new file. Five statements do not hold (F27 to F31).

Hygiene: a Conventional subject, no body and one attribution footer, which no rule in the tree forbids; author equals committer; git diff --check is clean from 35e76ee88 and from 4a46f98b2; the closing-keyword scan matches nothing.

Findings: F27 Nit; F28 Nit; F29 Nit; F30 Nit; F31 Minor. New ids start at F27 because the previous review used F26. None blocks.

Checked, no finding: the template's sections; the bot reviewer's panic claim and its no-change answer; the first review at 19:36; the resolve loop and the failed validator run agree with the record's log (lines 348 and 353); no hook or workflow runs the validator; the resolve-all script prints only thread ids.

Checks

On the loop's compute node at this head, against the merge base 4a46f98b2 (receipt server-gates-kranich-659): the repository's pre-commit gate exit 0 (51 s), clippy-allow-reasons against the base exit 0, and the tree left clean; the repository's audit validator on pr-2815-review exit 0 (21 rows, 7 log entries, no failures). Code is byte-identical to the previous round's head. GitHub checks at this head at posting time: "". At posting, develop is 4a46f98b2.


| Metric | Value |
| ------ | ----- |
| Review rounds | 4 (3 human, 1 bot) |

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.

[Nit][F27] When this file was committed, the forge had five reviews with findings, and four of them were human.

The commit is from 21:31:30 UTC. The bot's review came at 19:36:14 and the reviewer's at 19:37:01, 20:01:50, 20:29:11 and 20:47:49. The last review's two findings and five of the six from the 20:29 review have no reply and no row in the record, their threads are open, and this file does not mention them. The end time on line 28 is also too early: a capture taken after the 20:33:25 update still shows the thread of audit F21 unresolved, so the time from the first review to the last resolution is at least 57 minutes.


## What Went Well

1. The fix itself and its regression tests drew no objection: every finding was about wording, tests of the

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.

[Nit][F28] The tests of the fix did draw objections.

F7 was about the comment head-race test at snapshot.rs line 416, which repeated the review test's interleaving. F3 was about the ordinary-case test, which passed with or without the fix. Line 50 lists both as a test gap, and F17 and F18 were about the test helper replace_after. The production read order is what drew no objection, as the second half of this sentence already says.

| Findings | Flagged | Root cause | Type | What would have prevented it |
| -------- | ------- | ---------- | ---- | ---------------------------- |
| F19, F20, F6, F13 | Wording said "at least as new as any commit", "a push after this read", "the next poll reports it" | I wrote the invariant loosely and did not list the cases (push before the feedback, between the reads, after the head read, with new feedback) | doc/code mismatch | Write the invariant as a table of cases before writing the comment, and read it against `detect` order |
| F1, F12 | Risks section and PR description still described a second read | I changed the design (one read moved, no second read) after drafting the spec and PR text and did not sweep them | doc/code mismatch | After any design change, grep the spec, PR body and commit bodies for the old claim |

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.

[Nit][F29] F12 is not about a second read.

At the first review, the description already said "the head is not read twice". F12 quoted its "A push after that read gives a safe head_moved false alarm", which is the push-case wording that the row on line 47 covers. Root cause 2 (lines 64 to 65) also says the decision did not reach the PR text, and no finding shows that.


## Root Causes

1. **Skill not read at the first review.** Four rounds' worth of record-keeping findings (F10, F11, F14, F15,

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.

[Nit][F30] These five findings came from two rounds, not four.

The record names review 5848499555 as the source of F10, F11, F14 and F15, and review 5848852874 as the source of F21. The table on lines 45 to 55 does not give the round of any finding either, although the template asks for it (PR-REVIEW-RETROSPECTIVE.md lines 50 to 51).


## Improvements for Future Reviews

1. Add the "open `process-pr-review` and start the audit at the first review" step to the `wait-for-pr-review`

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.

[Minor][F31] The review loop already has this step.

Step 2 of the review loop (wait-for-pr-review SKILL.md lines 138 to 142, and lines 134 to 135 on develop) runs the process-pr-review workflow on every review or comment. That skill has the author keep the record (its lines 20 to 21) and run the validator before replying to or resolving any thread (lines 268 to 270). Lines 88 to 89 say the gap was in following the rules, not in the rules, yet this item proposes a rule that already exists. Drop the item, or name what the existing step lacks.

@da2ce7

da2ce7 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

ACK 1ee2f89 — the one new commit adds only the review retrospective, every other path is byte-identical to 35e76ee88, the audit record still passes the validator's own logic offline, and the head merges into develop 4a46f98b2 without conflict

@josecelano

Copy link
Copy Markdown
Member

ACK 1ee2f89

@josecelano
josecelano merged commit 8bf8379 into torrust:develop Nov 11, 2026
22 checks passed
josecelano added a commit that referenced this pull request Nov 11, 2026
…ssues/closed

7547cbc docs(pr-reviews): [#2714] record review 5856904371 in the audit of PR 2817 (josecelano-bot)
fc08788 docs(pr-reviews): [#2714] keep the status values text of the audit template (josecelano-bot)
9c70953 docs(pr-reviews): [#2714] cite the first close-out commit by its subject (josecelano-bot)
7362633 docs(issues): [#2714] record where the spec was drafted, not where it is now (josecelano-bot)
0699138 docs(issues): [#2714] state the completion review against the Decision wording (josecelano-bot)
5fb4ccd docs(issues): [#2714] name the skill paragraph as the evidence of AC3 (josecelano-bot)
55dfbff docs(pr-reviews): [#2714] add the review audit record of PR 2817 (josecelano-bot)
29dd8e0 docs(issues): [#2714] point the evidence file at the closed spec path (josecelano-bot)
9359a40 docs(issues): [#2714] mark EPIC row 19 done and point it at the closed spec (josecelano-bot)
9b46bb6 docs(issues): [#2714] close the archived spec: status, paths, checkpoints and log (josecelano-bot)
dce968a docs(issues): [#2714] archive the closed spec and mark EPIC row 19 done (josecelano-bot)

Pull request description:

  ## Summary

  Close-out of #2714 after PR #2815 merged. The spec moves from `docs/issues/open/` to `docs/issues/closed/` with `status: done`, `related-pr: 2815`, the closed `spec-path`, ticked completion checkpoints, a completion review and a progress-log entry. Row 19 of the EPIC #2003 table is DONE with a pointer to the fix, and the EPIC progress log records it. Issue #2714 is already closed on GitHub.

  ## Commits

  - `docs(issues): [#2714] archive the closed spec and mark EPIC row 19 done`: the move only (three renames, no content change). Its subject says more than it did; the edits are in the next three commits.
  - `docs(issues): [#2714] close the archived spec: status, paths, checkpoints and log`
  - `docs(issues): [#2714] mark EPIC row 19 done and point it at the closed spec`
  - `docs(issues): [#2714] point the evidence file at the closed spec path`
  - `docs(pr-reviews): [#2714] add the review audit record of PR 2817`
  - Round 2 (review 5856904371): `docs(issues): [#2714] name the skill paragraph as the evidence of AC3`, `docs(issues): [#2714] state the completion review against the Decision wording`, `docs(issues): [#2714] record where the spec was drafted, not where it is now`, `docs(pr-reviews): [#2714] cite the first close-out commit by its subject`, `docs(pr-reviews): [#2714] keep the status values text of the audit template`, and a last commit that adds the round's rows to the audit record.

  ## Validation

  - `grep -rn "issues/open/2714" docs .github` finds no live reference to the old path outside the audit records.
  - Pre-commit hooks (frontmatter validator and linters) passed on each commit.

  Related to #2714. Part of EPIC #2003.

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

ACKs for top commit:
  da2ce7:
    ACK 7547cbc — F5, F6 and F10 are fixed in the bytes, every path outside the six new commits' diff is byte-identical to `55dfbff7b`, the audit record passes the validator's own logic offline, and the head merges into `develop` `8c24b0722` without conflict
  josecelano:
    ACK 7547cbc

Tree-SHA512: 7dcc8fadb1af11f2bf27d8885a5abc499641ac6fa64249302548f8458df3c8b44b30fd413e8525b048fbddeea7e00723d74c64ef02a23f5f4acb09af7c78d46d

This branch was previously deployed

1 inactive deployment
coverage — 1ee2f896 Deployed Nov 11, 2026 by josecelano-bot via Generate Coverage Report #3036
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.

wait-for-pr-review can report a review of a newer commit than the head it reports

4 participants