Bounty
XE-13133 · Bounty

Desk: deleted GitHub comments are never reconciled on the poll path

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

Report

The only deletion handling for mirrored GitHub comments is the webhook branch: issue_comment action deleted → thread.remove_message, which marks the mirrored message "[comment deleted at the source]". The poll path (import_repo) can never see a deletion — GitHub's list-comments endpoint never returns a deleted comment — and there is no set-reconciliation of mirrored comment IDs against the live list anywhere in sync.py. If the one webhook delivery is missed, the mirrored message stays on the public ticket thread forever, including across full imports.

Mechanism: import_repo (desk/services/sync.py:410-420) iterates client.comments(repo, issue["number"], since=since) and upserts each live comment. A deleted comment is absent from that listing by construction. The only deletion handling in the tree is the webhook branch (sync.py:678-690): issue_comment + action deleted → thread.remove_message(db, "github", id), which marks the mirrored message body "[comment deleted at the source]" (desk/services/thread.py:78-88, XE-1014's design intent). The other remove_message caller (sync.py:175) is the blocked-account mark, not a reconciliation. No poll-side reconciliation exists.

Reproduction (from code): (1) Reporter posts comment C on issue #N → mirrored to the ticket thread. (2) Reporter (or a team member) deletes C on GitHub — retracting a statement, removing a mistaken comment, or removing sensitive text. (3) The issue_comment/deleted webhook delivery is missed (desk downtime, GitHub delivery failure, repo webhook misconfiguration). (4) The poll re-fetches the issue's live comments; C is not among them; nothing removes the mirrored row. A full import (since=None) lists live comments only, so it does not help either. (5) The deleted comment's text remains visible on the public ticket page indefinitely.

Impact: a deleted comment — including a retraction or removal of sensitive text — remains visible on the public ticket page indefinitely. Minor — same record-integrity class as XE-12802. No fund movement, no payout impact.

Why not a duplicate: XE-12802 is deleted issues (stale github_state, dead source_url, broken outbound writes). Different object, different code path, different impact; its own text scopes the defect to "vanished issues" and its suggested fix touches only the issue loop. A rule-based fix for XE-12802 ("reconcile absence on poll") would not touch the comment loop. Board search /?q=remove_message → 0 hits; /?q=deleted+comment → 0 hits (2026-11-14). Fold risk, stated honestly: a strict triager could fold this into XE-12802 as the same poll-reconciliation rule applied to a different object. The counter is that the objects, code paths, and fixes are disjoint. Repo: xeprotocol/desk @ ab9df7fdc4f48bee4101060b59b8a2d80e818136.

Suggested fix: on poll (or full import), reconcile each ticket's mirrored GitHub comment IDs against the live comment list for that issue and remove_message the absent ones — the same absence-reconciliation XE-12802 proposes for issues.

Thread

Joseph Denneteam2026-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-13133 and says what differs; it is read like any other.