Skip to content

Fix: pr:ready's board step counts the checked pull request's own claim as its own, whoever runs it - #2589

Merged
repeat98 merged 4 commits into
mainfrom
fix/board-claim-own-pull-request
Dec 4, 2026
Merged

repeat98 merged 4 commits into
mainfrom
fix/board-claim-own-pull-request

Conversation

@repeat98

@repeat98 repeat98 commented Dec 4, 2026 •

Copy link
Copy Markdown
Owner

Works now: a maintainer finishing a contributor's pull request can run npm run pr:ready without the agent-board step stopping on the contributor's own claim for that same pull request. Nothing changes for musicians or on a unit; this is developer tooling only.

  • What was wrong or hard: On 3 Dec, while folding Base: FM engine take hooks for synth and cx-osc (69-90) #2352 into base/octatrack-next, the owner ran npm run pr:ready -- --base-branch base/octatrack-next on ilia-murzinov's branch. The board step ran as repeat98, saw ilia's hook claim tied to Base: FM engine take hooks for synth and cx-osc (69-90) #2352, called it someone else's claim and stopped npm run check, so the remaining suites were skipped. CI already handled this case: board check passed the event's pull request number to compareClaims, which counts a claim tied to that pull request as its own. The local board check and pr:ready's claim step passed no pull request at all.
  • What this changes:
    • branchPullRequest(root) in scripts/agent-board.mjs returns {number, branch, author}. In CI it reads the event, as before. Locally it asks gh pr view for the checked-out branch, and returns null when gh finds nothing.
    • Both board check (the npm run check step) and pr:ready's boardClaims pass it to compareClaims.
    • A claim counts as the pull request's own when it is tied to that pull request's number. It also counts when it names no pull request but its holder is the pull request's author on its branch (the Worker links claims to pull requests only once an hour).
    • A claim tied to a different pull request never counts, whatever its branch.
    • pr:ready leaves such a claim with its holder and adds a note. It no longer tries to claim the claim for the person running it, which the server would refuse with a 409.
  • How I checked it:
    • New test in scripts/agent-board.test.mjs: "lets a maintainer finish the claim holder's pull request, and still stops on a claim tied to another". It fails on main and passes here. The compareClaims test gained the branch-only and other-pull-request cases.
    • Live run against the real board: gh pr checkout 2352 into a throwaway worktree on a local branch named check-2352-board. branchPullRequest resolved #2352 prop/cx-osc-fm-engine-hooks ilia-murzinov. As repeat98, ilia's still-active module analog-rytm-mkii/improved-comp claim (tied to Base: FM engine take hooks for synth and cx-osc (69-90) #2352) moved from "others" (old call) to "mine". The same call with pull request 2353 still put it in "others".
    • npm run pr:ready green on f553bd4 (current main merged): the check passed in 1477 s. Two earlier runs overlapped another worktree's check and failed only on test timeouts, with no assertion failures.
  • Tested on a unit: not applicable: no built package or base changes.
  • Edge cases: none, because no built package or base changes.
  • What the guides lacked or got wrong, and where I fixed it: docs/AGENT_BOARD.md did not say whose a pull request's claim is when someone else finishes that pull request. I added a "Finishing someone's pull request" line under Claims.
Limits
  • If the maintainer works on a local branch with no link to the pull request, the old stop remains. This happens when the branch was not made with gh pr checkout and tracks no PR head. gh pr view then finds nothing.
  • branchVerdict still prints "yours" for such a claim in board check output. The verdict is right; only the wording is loose.

🤖 Generated with Claude Code

repeat98 and others added 4 commits December 3, 2026 21:50
…m as its own, whoever runs it

A maintainer finishing a contributor's pull request ran pr:ready as themselves; the board step saw the
contributor's claim tied to that same pull request, called it someone else's and stopped the check.
CI already passed the event's pull request to compareClaims. Locally, board check and pr:ready now ask
gh pr view for the checked-out branch's pull request, and pr:ready leaves such a claim with its holder
instead of trying to re-claim it. A claim tied to another pull request still stops it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@repeat98
repeat98 marked this pull request as ready for review December 4, 2026 08:40
@repeat98
repeat98 merged commit d37d729 into main Dec 4, 2026
17 of 22 checks passed
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