{"id":"XE-13243","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"371","source_url":"https://github.com/xeprotocol/xe/issues/371","reporter_id":2,"title":"[Desk] sync._other_live_patches drops a manually-fixing ticket out of fixing while another maintainer's Fixes #n PR is still open","area":"other","claimed_tier":null,"assessed_tier":null,"verdict":null,"duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":null,"status":"triaging","closed_reason":null,"github_state":"open","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:03.051977+00:00","updated_at":"2026-11-20T00:17:10.073956+00:00","source_created_at":"2026-11-11T10:32:59+00:00","told_at":"2026-11-20T00:15:42+00:00","status_changed_at":"2026-11-20T00:15:29.783948+00:00","url":"https://bounty.xe.network/XE-13243","body":"### Summary\n\nIn `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:\n\n1. `_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`.\n2. 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:\n   ```python\n   if other.state == \"merged\" or other.moved_from or (bot and other.author == bot):\n   ```\n   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!\n\n### Rule\n\nUnmerged 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).\n\n### Proposed Fix\n\nReady-to-merge patch and regression tests submitted in https://github.com/xeprotocol/desk/pull/2.\n","patch_refs":[{"id":727,"repo":"xeprotocol/xe","kind":"pr","ref":"876","title":"fix(xe): desk--sync--other-live-patche (fixes #371)","url":"https://github.com/xeprotocol/xe/pull/876","note":"","state":"open","author":"tipprb","added_by":"desk","created_at":"2026-11-19T17:53:39.790866+00:00"}],"thread":[{"id":12912,"source":"github","source_ref":"7026049664","author":"Joseph Denne","team":true,"body":"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.","created_at":"2026-11-20T00:15:42+00:00"}]}