Repository navigation
Conversation
Owner
Author
|
Closing as superseded. The idea here is right: save the landing record before the branch becomes visible, so a retry never guesses who owns a branch, finds the open PR instead of making a second one, and refuses an unknown Generated by Claude Code |
lydakis
pushed a commit
that referenced
this pull request
Oct 26, 2026
…ings A copy now records three things, each answering one question: its base (what its files start from), the landing it was stacked on when made from another copy (the fork point), and its last landing (branch, commit, base it was made on, files). Landing builds on all three: - A landing's record is saved before the branch moves, so landing again after one cut short tells its own commit from someone else's, and finds an open pull request instead of opening a second one. - A branch with commits the copy didn't land is left alone (it would undo them); --force lands anyway. - A copy made from a landed copy follows that landing, not the branch's newest commit, so it never undoes what its parent landed later. - A copy put back as its base has it still lands, and `rm` counts the files it put back as unlanded. - Folder copies tell their bases apart by a counter instead of the clock, which collided on macOS CI. Carries over the idea of Sonny's #8 (save the record before publishing). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
lydakis
added a commit
that referenced
this pull request
Oct 26, 2026
…ings (#9) * Land dependably: record where each copy stands, finish cut-short landings A copy now records three things, each answering one question: its base (what its files start from), the landing it was stacked on when made from another copy (the fork point), and its last landing (branch, commit, base it was made on, files). Landing builds on all three: - A landing's record is saved before the branch moves, so landing again after one cut short tells its own commit from someone else's, and finds an open pull request instead of opening a second one. - A branch with commits the copy didn't land is left alone (it would undo them); --force lands anyway. - A copy made from a landed copy follows that landing, not the branch's newest commit, so it never undoes what its parent landed later. - A copy put back as its base has it still lands, and `rm` counts the files it put back as unlanded. - Folder copies tell their bases apart by a counter instead of the clock, which collided on macOS CI. Carries over the idea of Sonny's #8 (save the record before publishing). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq * A path below a file or link is deleted; move landings kept by older Graft fingerprint() reads a path whose folder was replaced by a file or link as deleted, as land and rm need, instead of failing. Projects saved before keep their last landing with the pull request; reading them moves it to the copy, and the first land after takes the branch's commit as its own. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq * Force-land a copy put back as its base; don't stack on a migrated landing A copy with no changes lands whenever it landed before and its branch is there, with --force over others' commits too. A copy made from one whose landing came from older Graft, without its commit, isn't stacked on it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq * rm guard: a landed file a newer base has otherwise isn't lost A file the last landing carried that is no longer a change counts as lost only when it is back as it was in the commit the landing was made on: put back by hand. One a newer base changed again after merging it is not. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq --------- Co-authored-by: Claude <[email protected]>
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.
Summary
Persist the exact first-landing attempt before publishing its branch. Retrying can publish that saved commit if needed, find its existing open PR, or create the missing PR, without a duplicate commit or PR. Recovery preserves working files and existing descriptions unless an explicit replacement body is given. Refuse branches and PRs that do not match the saved attempt.
Regression coverage
Add fake-API coverage for PR creation failure, lost response and local record, preserving later edits and descriptions, missing refs, moved branches, unrelated or closed PRs, and canonical repository casing. Extend the mounted workflow to exercise a failed first landing and retry. Document recovery behavior and the limitation for interruptions from older versions without saved records.
Validation
Opening this as a draft for review now. Implementation-task validation and independent review are still in progress; results and follow-up changes will be posted here. This checkpoint has been inspected but is not yet claimed fully validated.
Landed with
gft landfrom the copyland-retry-recovery.