Opus finding
`gh pr list` lookup by head uses unqualified branch name; may match PRs from forks or miss owner-qualified heads
lowbugmedium
- .github/workflows/sync-upstream.yml:94-99
`gh pr list --head` without `--state all` defaults to open PRs only. If a previous sync PR was closed without merging (e.g. reviewer chose to discard), the workflow will open a new duplicate PR rather than reopening or commenting. Also, `.[0]` silently picks the first match without checking for multiple matches.
Recommendation
Use `--state all` and handle closed/merged cases explicitly, or fail if multiple PRs match the head branch.