Skip to content

shamhub: Compute review thread staleness - #1222

Merged
abhinav merged 2 commits into
mainfrom
branch-comment-stale
Aug 30, 2026
Merged

shamhub: Compute review thread staleness#1222
abhinav merged 2 commits into
mainfrom
branch-comment-stale

Conversation

@ed-irl

@ed-irl ed-irl commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

ShamHub review threads record the change head in ReviewThread.CommitHash. When that revision differs from the current head, compare the two revisions and mark a right-side thread outdated only when the later patch deletes a line in its inclusive range.

Insertions alone do not stale an anchor. File-level and left-side threads retain their stored state because their recorded coordinates do not identify a comparable source range. Explicitly seeded outdated state still takes precedence, and diff or parsing failures propagate to the caller.

This builds on the review patch queries from #1162. The user-facing staleness script is included with the commands in #1163.

@ed-irl

ed-irl commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

@ed-irl
ed-irl force-pushed the branch-comment-tests branch from d42cd46 to e683e4f Compare June 2, 2026 20:22
@ed-irl
ed-irl force-pushed the branch-comment-stale branch from 5582ec7 to ee1f597 Compare June 2, 2026 22:20
@ed-irl
ed-irl force-pushed the branch-comment-tests branch 2 times, most recently from bc2d528 to 5228b63 Compare June 8, 2026 10:18
@ed-irl
ed-irl force-pushed the branch-comment-stale branch from ee1f597 to 9f8657d Compare June 8, 2026 10:18
@ed-irl
ed-irl force-pushed the branch-comment-tests branch from d270ec2 to 0a8ca42 Compare June 8, 2026 11:15
@ed-irl
ed-irl force-pushed the branch-comment-stale branch from 1113e5d to 312db25 Compare June 8, 2026 11:15
@ed-irl
ed-irl force-pushed the branch-comment-tests branch from 0a8ca42 to 03fafd4 Compare June 12, 2026 20:07
@ed-irl
ed-irl force-pushed the branch-comment-stale branch from 312db25 to 6ab1da8 Compare June 12, 2026 20:07
@ed-irl
ed-irl force-pushed the branch-comment-tests branch from 03fafd4 to 1f477e3 Compare June 13, 2026 13:39
@ed-irl
ed-irl force-pushed the branch-comment-stale branch from 6ab1da8 to 167cca4 Compare June 13, 2026 13:39
@ed-irl
ed-irl force-pushed the branch-comment-tests branch from 1f477e3 to 7241e23 Compare June 15, 2026 09:52
@ed-irl
ed-irl force-pushed the branch-comment-stale branch from 167cca4 to d049480 Compare June 15, 2026 09:52
@ed-irl
ed-irl force-pushed the branch-comment-tests branch from f84f05d to c2cb662 Compare June 19, 2026 01:03
@ed-irl ed-irl changed the title branch comment: compute outdated/stale from diff state worktree: Add management commands, per-worktree trunks, and worktree-aware filtering Jun 19, 2026
@ed-irl
ed-irl force-pushed the branch-comment-stale branch from 41864dd to 93682d9 Compare June 19, 2026 01:04
@ed-irl
ed-irl force-pushed the branch-comment-tests branch from c2cb662 to 63cfc0c Compare June 24, 2026 01:32
@ed-irl
ed-irl force-pushed the branch-comment-stale branch from 93682d9 to e8e87b4 Compare June 24, 2026 01:32
@abhinav abhinav changed the title worktree: Add management commands, per-worktree trunks, and worktree-aware filtering branch comment: compute outdated/stale from diff state Aug 12, 2026
@abhinav
abhinav changed the base branch from branch-comment-tests to branch-comment-forge August 24, 2026 05:14
@abhinav
abhinav force-pushed the branch-comment-stale branch from e8e87b4 to 4b111e1 Compare August 24, 2026 05:14
@abhinav abhinav changed the title branch comment: compute outdated/stale from diff state shamhub: Compute review thread staleness Aug 24, 2026
@abhinav
abhinav force-pushed the branch-comment-forge branch 2 times, most recently from 9319b93 to d2f5157 Compare August 24, 2026 05:18
Base automatically changed from branch-comment-forge to main August 24, 2026 12:40
@abhinav
abhinav force-pushed the branch-comment-stale branch 2 times, most recently from 8a84101 to 7f6c184 Compare August 24, 2026 12:45
@abhinav abhinav added the skip changelog PRs that don't need a changelog. label Aug 24, 2026
ed-irl and others added 2 commits August 30, 2026 10:30
ShamHub records the reviewed head in ReviewThread.CommitHash.
When that revision differs from the current change head,
compare the two revisions and mark a right-side thread outdated
if the later patch deletes any line in its inclusive range.

Insertions do not stale an anchor.
File-level and left-side threads retain their stored state
because the recorded commit does not identify
a comparable old-side range for those anchors.

Explicitly seeded outdated state still takes precedence,
and diff failures propagate to the caller.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog PRs that don't need a changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants