Make rewrite source-note fetch best-effort so shifts never abort wholesale#1977
Open
a-churchill wants to merge 1 commit into
Open
Make rewrite source-note fetch best-effort so shifts never abort wholesale#1977a-churchill wants to merge 1 commit into
a-churchill wants to merge 1 commit into
Conversation
…esale When a rewrite (rebase/cherry-pick/squash) had a source commit with no authorship note anywhere and the refs/notes/ai fetch from a remote failed (off-VPN, broken SSH in the daemon environment, unreachable remote), fetch_missing_notes_for_commits returned Err and the `?` at the rewrite call sites aborted the entire shift — commits whose notes were sitting in the local notes-db lost them too. Under the HTTP notes backend this seeded a cascade: each rebase's noteless outputs became the next rebase's noteless sources. Route the four shift call sites through a best-effort wrapper that logs the fetch failure and proceeds, so locally available notes always migrate. Sources that stay missing simply carry no note, same as before, but the loss no longer widens to the whole rewrite. Regression tests run a real rebase under an HTTP-backend daemon with a noteless plumbing-created source commit: one with an unreachable remote (previously aborted with "failed to fetch authorship notes for source commits [...]: exit code 128"), one control with no remote. Co-Authored-By: Claude Fable 5 <[email protected]>
|
|
svarlamov
approved these changes
Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a rewrite (rebase/cherry-pick/squash) had a source commit with no authorship note anywhere and the refs/notes/ai fetch from a remote failed (off-VPN, broken SSH in the daemon environment, unreachable remote), fetch_missing_notes_for_commits returned Err and the
?at the rewrite call sites aborted the entire shift — commits whose notes were sitting in the local notes-db lost them too. Under the HTTP notes backend this seeded a cascade: each rebase's noteless outputs became the next rebase's noteless sources.Route the four shift call sites through a best-effort wrapper that logs the fetch failure and proceeds, so locally available notes always migrate. Sources that stay missing simply carry no note, same as before, but the loss no longer widens to the whole rewrite.
Regression tests run a real rebase under an HTTP-backend daemon with a noteless plumbing-created source commit: one with an unreachable remote (previously aborted with "failed to fetch authorship notes for source commits [...]: exit code 128"), one control with no remote.
Note this is meant to be complimentary to #1975