Skip to content

feat: prove squash-merged branches through their GitHub pull requests - #73

Merged
rigomart merged 21 commits into
mainfrom
feat/github-pr-proof
Nov 7, 2026
Merged

rigomart merged 21 commits into
mainfrom
feat/github-pr-proof

Conversation

@rigomart

@rigomart rigomart commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Why

Squash merges often hide a merge from Worktrunk's Git checks, so branches whose pull requests merged stayed in Review. This asks GitHub, only for rows Git can't settle.

What changed

  • Such rows are checked through the user's gh, one GraphQL query per repository. A pull request merged into the default branch that holds the exact tip, the same files, or the tip through a stacked pull request makes the row Safe, as "merged on GitHub". Otherwise it stays Review and says why.
  • Removing a proven row deletes its branch, and the dialog names the pull request.
  • --offline skips GitHub, and --doctor reports gh. Proofs are cached.
  • The README no longer claims no network requests and says what is sent.
  • Left out: GitHub Enterprise, GitLab, forks merging upstream.

Decisions

  • A proof needs the tip in the merged pull request's own commits, on --hostname github.com, from the remote the default branch tracks.
  • A stack whose lower pull request was squash-merged stays Review.
  • Branches without a worktree still wait a day after being proven.

Blast radius

A wrong Safe would force-delete unmerged work. The proof rules above and the tip re-check before removal guard it; without gh, rows stay Review.

Verification

  • The check ran first on its own against 38 local repositories: 39 rows proven, each re-checked through GitHub's REST API, no false Safe.
  • Tests use a fake gh with real Git and Worktrunk for every proof kind and failure mode.
  • Driven in the real app at 120 and 80 columns. Follow-ups: the 80-column header drops "checking GitHub", and the unused pending note can go.

Screenshots

While checking After GitHub answers
Seven rows Git can't place are Review while the header reads checking GitHub Five rows turn Safe as merged on GitHub with their pull request named

The remove dialog deletes the branch because it merged on GitHub as PR #1

A dashboard service option, followUp, runs once per scan after each repository's full listing without holding the scan up. Its RowPatch results patch rows by id while the row's HEAD still matches, last across listings and rescans until replaced, and are dropped when a rescan or close has aborted them. The snapshot counts running follow-ups in checking, which keeps the spinner ticking.
# Conflicts:
#	.claude/skills/verify-wt-dash/SKILL.md
@rigomart
rigomart merged commit fb18a21 into main Nov 7, 2026
5 checks passed
@rigomart
rigomart deleted the feat/github-pr-proof branch November 7, 2026 02:02
rigomart pushed a commit that referenced this pull request Nov 15, 2026
🤖 I have created a release *beep* *boop*
---


## [0.2.0](v0.1.1...v0.2.0)
(2026-11-07)


### Features

* add a curl install script
([#71](#71))
([cfc169e](cfc169e))
* prove squash-merged branches through their GitHub pull requests
([#73](#73))
([fb18a21](fb18a21))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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