Bounty
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 filed 2026-11-11 10:32 UTC by Khanhtnq

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 Denneteam2026-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.