<!-- XE-13243 · [Desk] sync._other_live_patches drops a manually-fixing ticket out of fixing while another maintainer's Fixes #n PR is still open · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13243>. The page is the record; this is the same page for reading.*

XE-13243 · Bounty

# \[Desk\] sync.\_other\_live\_patches drops a manually-fixing ticket out of fixing while another maintainer's Fixes #n PR is still open

Triaging
[xe#371](https://github.com/xeprotocol/xe/issues/371)
filed 2026-11-11 10:32 UTC
by Khanhtnq

Verdict
:   published when the fix ships

Tier
:   published when the fix ships

Claimed
:   —

Area
:   Other

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 00:17 UTC

Told
:   2026-11-20 00:15 UTC

### Patches

- [xe#876](https://github.com/xeprotocol/xe/pull/876) open by tipprb
  fix(xe): desk--sync--other-live-patche (fixes #371)

### History

- [547475](https://bounty.xe.network/log/547475) 2026-11-20 00:16 UTC github.labels
- [546181](https://bounty.xe.network/log/546181) 2026-11-20 00:15 UTC reply.mirrored
- [546046](https://bounty.xe.network/log/546046) 2026-11-20 00:15 UTC proposal.adopted
- [546045](https://bounty.xe.network/log/546045) 2026-11-20 00:15 UTC ticket.award
- [545968](https://bounty.xe.network/log/545968) 2026-11-20 00:15 UTC proposal.adopted
- [545967](https://bounty.xe.network/log/545967) 2026-11-20 00:15 UTC reply.sent
- [545884](https://bounty.xe.network/log/545884) 2026-11-20 00:15 UTC proposal.adopted
- [545883](https://bounty.xe.network/log/545883) 2026-11-20 00:15 UTC ticket.status new → triaging
- [545732](https://bounty.xe.network/log/545732) 2026-11-20 00:15 UTC proposal.adopted
- [545731](https://bounty.xe.network/log/545731) 2026-11-20 00:15 UTC ticket.facts area
- [545730](https://bounty.xe.network/log/545730) 2026-11-20 00:15 UTC proposal.adopted
- [545729](https://bounty.xe.network/log/545729) 2026-11-20 00:15 UTC ticket.facts

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

### Report

### Summary

In `desk/services/sync.py:341-355, 376-389` (`xeprotocol/desk@ab9df7f`), when a bounty ticket is already in `status == "fixing"` (set manually or via the internal tracker) before two maintainer `Fixes #n` PRs (`PR A` and `PR B`) open against its GitHub issue:

1. `_follow_pull_state` sees `t.status == "fixing"` (`L341`), calls `_moved_from(db, t)` (`L345`) which returns `""` because no earlier PR moved the ticket into `fixing`, and records `followed = "open"`, `moved_from = ""` on both `PR A` and `PR B`.
2. If `PR A` is closed unmerged while `PR B` (`trusted=True`, `Fixes #n`, `state="open"`, `followed="open"`) is still open, `_other_live_patches` (`L387`) only checks:

   ```
   if other.state == "merged" or other.moved_from or (bot and other.author == bot):
   ```

   Because `PR B` has `moved_from == ""` (and was opened by a human maintainer rather than `github_bot_login`), `_other_live_patches` returns `False`, and `_follow_pull_state` (`L354`) walks the ticket backward out of `fixing` to `accepted` even though `PR B` is an active maintainer `Fixes #n` PR!

### Rule

Unmerged closure of one PR against a `fixing` ticket never drops the ticket out of `fixing` while another maintainer's open `Fixes #n` PR (`other.followed == "open"`) remains open against it (while stranger fork PRs and bare `#n` mention PRs keep `followed == ""` and hold nothing).

### Proposed Fix

Ready-to-merge patch and regression tests submitted in https://github.com/xeprotocol/desk/pull/2.

### Thread

**Joseph Denne**team2026-11-20 00:15 UTCgithub

Thanks for the report. We have read it against the current code and it is being handled. The assessment and any award follow the fix.
