<!-- XE-13132 · Desk: removing `fixes #n` from a PR body strands the ticket in `fixing` · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13132>. The page is the record; this is the same page for reading.*

XE-13132 · Bounty

# Desk: removing \`fixes #n\` from a PR body strands the ticket in \`fixing\`

Closed · duplicate
—claimed Minor
web
filed 2026-11-14 17:21 UTC
by overtheraadot

Verdict
:   Duplicate

Tier
:   —

Claimed
:   Minor

Area
:   Other

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 19:46 UTC

Told
:   2026-11-20 19:46 UTC

### Patches

None linked.

### History

- [626884](https://bounty.xe.network/log/626884) 2026-11-20 19:46 UTC proposal.adopted
- [626883](https://bounty.xe.network/log/626883) 2026-11-20 19:46 UTC reply.sent
- [626882](https://bounty.xe.network/log/626882) 2026-11-20 19:46 UTC ticket.status new → closed
- [623702](https://bounty.xe.network/log/623702) 2026-11-20 19:45 UTC proposal.adopted
- [623701](https://bounty.xe.network/log/623701) 2026-11-20 19:45 UTC proposal.adopted
- [623700](https://bounty.xe.network/log/623700) 2026-11-20 19:45 UTC ticket.facts
- [623699](https://bounty.xe.network/log/623699) 2026-11-20 19:45 UTC proposal.adopted
- [623698](https://bounty.xe.network/log/623698) 2026-11-20 19:45 UTC ticket.facts
- [609332](https://bounty.xe.network/log/609332) 2026-11-20 15:04 UTC note.added
- [609331](https://bounty.xe.network/log/609331) 2026-11-20 15:04 UTC proposal.created
- [609330](https://bounty.xe.network/log/609330) 2026-11-20 15:04 UTC proposal.created
- [609329](https://bounty.xe.network/log/609329) 2026-11-20 15:04 UTC proposal.created

[Full history](https://bounty.xe.network/log?ref=XE-13132) · [JSON](https://bounty.xe.network/v1/tickets/XE-13132) · [markdown](https://bounty.xe.network/XE-13132.md)

### Report

link\_pull early-returns when a PR's current title\+body contains no #n references — before any PatchRef lookup. The follower that moves a ticket back out of fixing (\_follow\_pull\_state) only ever runs for PRs that currently reference the ticket. So if a PR's body is edited to remove its fixes #n, no later read — webhook edited, webhook closed, or poll — ever revisits that ticket/PR pair: the ticket stays fixing forever against a PR that no longer claims to fix it, and the stale PatchRef row keeps blocking other PRs' move-backs.

Mechanism: link\_pull (desk/services/sync.py:259-265) begins: refs \= gh.issue\_refs(text); if not refs: return 0 — before any PatchRef lookup or \_follow\_pull\_state call. \_follow\_pull\_state (:330-360) is the only code that moves a ticket back when a PR closes unmerged: it requires t.status \=\= "fixing" and (trusted or pr.moved\_from), and refuses when \_other\_live\_patches reports another live patch. It only runs for PRs that currently reference the ticket. No other code revisits PatchRef.followed — followed writers exist only in sync.py, and tickets\_needing\_push covers labels/state only.

Reproduction (from code): (1) Maintainer PR #P moves ticket T new → fixing (moved\_from recorded). (2) The PR author edits P's body, removing fixes #N. (3) P is closed unmerged → webhook pull\_request → link\_pull → refs empty → return 0 → \_follow\_pull\_state never runs → T stays fixing forever, with no event, although the PR that moved it is closed and no longer claims to fix it. The same strand occurs if P stays open (T shows fixing against a PR that no longer fixes it). (4) Second-order effect: the stale PatchRef row keeps state\="open", so \_other\_live\_patches (:430-445) keeps treating P as a live patch and blocks other PRs' move-backs for T.

Impact: tickets stuck in fixing with no live fix PR; the team must hand-correct; stale rows poison the live-patch check for other PRs. Minor — workflow/state integrity, no confidentiality or payout impact.

Why not a duplicate: XE-1128 is the opposite direction: post-merge edits adding refs force tickets to patched. Its remediation ("only honor closing refs present at merge time") does not close this — this is about refs being removed, and about a ticket stranded in fixing, not forced to patched. XE-12446 is the parser over-reading fixes #n inside code blocks and quotes. XE-6996 is cross-repo owner/repo#n refs never being parsed. XE-2080 / XE-0634 are follower dedup / moved\_from inheritance. Board search /?q\=link\_pull (2026-11-14) shows 7 hits — XE-1128, XE-7201, XE-10813, XE-6996, XE-7795, XE-11765, XE-2893 — none about ref removal stranding a ticket in fixing. Repo: xeprotocol/desk @ ab9df7fdc4f48bee4101060b59b8a2d80e818136.

Suggested fix: on any PR read, reconcile the ticket's PatchRef rows against the PR's current ref set: when a previously-followed PR no longer references the ticket, run the same close/unmerge follow logic (or at least clear the stale followed/state) instead of early-returning on an empty ref set.

### Thread

**Joseph Denne**team2026-11-20 19:46 UTCdesk

Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the
first verifiable submission, so this one closes as a duplicate. If you believe it is a different
bug, file a new report that links https://bounty.xe.network/XE-13132 and says what differs; it is read like any other.
