Skip to content

review: Remap drafts to remote change head - #1445

Draft
abhinav wants to merge 1 commit into
mainfrom
review-draft-anchor-remapping
Draft

review: Remap drafts to remote change head#1445
abhinav wants to merge 1 commit into
mainfrom
review-draft-anchor-remapping

Conversation

@abhinav

@abhinav abhinav commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Review comment drafts need a stable revision for their file and line anchors.
Record the local branch head before opening the comment editor so concurrent
branch movement cannot pair an old anchor with a newer commit.

At publication, retrieve the forge's current change head and map each root
anchor from its recorded commit to that remote revision.
Use the same remote head for review-patch validation so submitted coordinates
and local checks describe one revision.
Reuse one lazily loaded source-to-head patch for drafts that share a source
commit.

Mapping follows ordinary edits and Git-detected renames for file, line, and
range comments.
A source or diff-loading failure warns and falls back to the saved coordinate;
a target deleted without replacement remains an error.
No refs are retained solely for draft comments.

Review comment drafts need a stable revision for their file and line anchors.
Record the local branch head before opening the comment editor so concurrent
branch movement cannot pair an old anchor with a newer commit.

At publication, retrieve the forge's current change head and map each root
anchor from its recorded commit to that remote revision.
Use the same remote head for review-patch validation so submitted coordinates
and local checks describe one revision.
Reuse one lazily loaded source-to-head patch for drafts that share a source
commit.

Mapping follows ordinary edits and Git-detected renames for file, line, and
range comments.
A source or diff-loading failure warns and falls back to the saved coordinate;
a target deleted without replacement remains an error.
No refs are retained solely for draft comments.
@abhinav abhinav added the skip changelog PRs that don't need a changelog. label Sep 7, 2026
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.

1 participant