In a repository with a knot store, tangled.org reads a pull request as an org.tangled.track.ticket with a targetBranch, beside an org.tangled.review.patch that names the ticket. tang pr create still wrote a legacy sh.tangled.repo.pull to the author's PDS, which tang pr list showed and the website never did.
Change. When resolveKnotStore finds a store, pr create now routes there, as the issue commands do:
createPullTicketwrites the ticket.- It then calls
org.tangled.review.submitPatchon the knot with the ticket's number, the base (merge-base) and head commits, and the source repo and branch, through a newcallInStore. tangled.org/core's lexicon says that procedure is "the only way to write org.tangled.review.patch records", and its web app does the same. - If the knot refuses the patch, the ticket is deleted again, so no pull request is left without a diff. If that delete fails too, the error names the ticket.
- The knot fetches the head from what was pushed, so a head branch missing from the remote, or at another commit there, is refused before anything is written.
Repositories with no store keep the legacy path.
Permissions. rpc:org.tangled.review.submitPatch?aud=* joins the OAuth scope, so a session from before must sign in again.
Not yet. pr list, view and delete still read only legacy records. The README and CLAUDE.md say so.
Tested. The new library and command tests went red first, and mutants that drop the push check or the routing are caught. bun run check passes (455 tests) under an English locale. #5 on this repository was opened by this code and merged.
🤖 Generated with Claude Code