Skip to content

graft: export land conflicts without automatic resolution - #10

Open
spaceming wants to merge 1 commit into
feder-cr:mainfrom
spaceming:land-conflict-export
Open

spaceming wants to merge 1 commit into
feder-cr:mainfrom
spaceming:land-conflict-export

Conversation

@spaceming

Copy link
Copy Markdown

graft land --conflicts-dir DIR currently requires --resolve, which also opts into the server's configured resolver. Allow callers to export unresolved conflicts for manual editing without requesting automatic resolution, then land their edits with graft land --resolved DIR.

Ordinary UserLand merge conflicts now include the existing LandConflict error detail. The server builds it outside the landing lane, in a disposable quarantine, using the exact tip and commit reported by the failed attempt. It checks agent policy before building the package and calls no resolver. Existing error codes and UserLandError details remain available to older clients. CLI help, SDK documentation, protocol comments and the roadmap describe the new behavior.

Regression coverage exercises rebase and merge with and without automatic resolution, reading the three sides through the SDK, manual re-land, preserving edits on repeated export, a branch that has moved, and denied agents. A conflict in an intermediate rebase commit whose endpoint merge is clean still returns the original error without a package; an older server still needs --resolve to return one.

Validation with Go 1.26.0 and Git built from the repository's pinned GIT_VERSION_PREV revision:

  • Confirmed the ordinary-land CLI regression fails before the change.
  • Passed the complete cmd/graft, sdk, internal/graft/workspace and doc/graft test packages.
  • Ran TestUserLand* and TestLandConflictWithoutResolution* in the operations package; the three connectivity checks that needed a complete Git installation passed on rerun with that installation.
  • Passed race detection for TestLandConflictWithoutResolution and TestUserLand_conflictPackage.
  • Passed go vet for the CLI, SDK, workspace and operations packages, the Windows CLI build, and git diff --check.

The full repository suite and bundled MVCC Git variant were not run.

Exporting conflicts should not require opting into the server's resolver.
Return the existing conflict package for ordinary failed lands and allow
--conflicts-dir without --resolve, so callers can edit and re-land it.

Build the package outside the lane from the failed attempt's exact tip
and commit, in a disposable quarantine, after checking agent policy. Keep
the original error when an intermediate rebase conflict has a clean
endpoint merge. Cover CLI and SDK flows and update the protocol comments.

Changelog: added
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.

1 participant