Skip to content

Make rewrite source-note fetch best-effort so shifts never abort wholesale#1977

Open
a-churchill wants to merge 1 commit into
git-ai-project:mainfrom
a-churchill:andrew/best-effort
Open

Make rewrite source-note fetch best-effort so shifts never abort wholesale#1977
a-churchill wants to merge 1 commit into
git-ai-project:mainfrom
a-churchill:andrew/best-effort

Conversation

@a-churchill

@a-churchill a-churchill commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

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


Open in Devin Review

…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]>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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.

4 participants