Publish branches atomically in create_pull_request#166
Merged
Conversation
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
create_pull_requestthe single agent-facing call for exact branch publication, PR creation, durable linking, and KPI attributionTool contract
create_pull_requestnow requires:paperclipIssueIdhead(plain local branch name)headCommitSha(full exact local branch-tip SHA)basetitleThe plugin resolves the mapped repository, issue execution workspace, checkout ownership, and company-scoped GitHub secret internally. There is no separate agent-facing push tool.
Safety properties
HEADand the shared local branch ref equalheadCommitShaTransaction boundary
This is one ordered, retry-safe agent tool call, not a literal transaction across Git, GitHub, and Paperclip. A branch may remain if PR creation fails, and a PR may remain if link persistence fails. A retry safely re-verifies publication and reconciles an exact existing PR.
Validation
pnpm test— 261 plugin tests, 6 branch-publisher tests, and 5 build-script tests passedpnpm typecheck— passedpnpm build— passedgit diff --check— passedf57156baf45c4a07fcdc598444db4100974379a5Rollout
After release and staging verification, agent
GITHUB_TOKENand Git credential-helper environment bindings can be removed again. Agent Company guidance should then call onlycreate_pull_requestwith the local branch and exact commit SHA.