docs(pr-review): a commit_id is per-comment, not per-review

Found by dogfooding the new script on PR #122, the PR that prompted it.
One review submitted between 19:48 and 19:53 carries five inline
comments: three name 246e8f4a, two name 6a4c7dcd, and the body names
246e8f4a. GitHub pins each comment to the file version it was written
against, so a comment on an outdated diff position keeps the older
commit while its siblings move on.

Two consequences worth writing down. The per-entry "EARLIER head" flag
is honest but can make a current review look partly stale. And a head
comparison against the review BODY is not a proxy for its own comments:
on that PR the body read as an earlier head while two of its rulings sat
on the current one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FC2jVn8Au7E9JPkw6bwXXH
This commit is contained in:
Edward Langley
2026-09-22 13:52:11 -07:00
parent a47310d50f
commit 0e10af005a
+12
View File
@@ -56,6 +56,18 @@ the review bodies already had, and the same reason: it may be fixed or still
live, and only reading it tells you which. An outdated comment has `line: null`
and only `original_line` left, which is what is printed.
**A `commit_id` is per-comment, not per-review, and they differ inside one
submission.** Measured on PR #122: one review submitted between 19:48 and 19:53
carries five inline comments, of which three name `246e8f4a` and two name
`6a4c7dcd`, and the review body names `246e8f4a` — GitHub pins each comment to
the file version it was written against, so a comment on an outdated diff
position keeps the older commit while its siblings move on. Two consequences.
The per-entry `<- an EARLIER head` flag is honest but can make a *current*
review look partly stale, so read the timestamps together before discounting
one. And a head comparison against the review **body** is not even a proxy for
its own comments: on that PR the body read as an earlier head while two of its
rulings sat on the current one.
## `$?` must be this script's own
The usage text used to warn against piping into `head`/`tail`. That is narrower