<!-- XE-13131 · Desk: poll path drops edited GitHub comments — stale public thread content forever · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13131>. The page is the record; this is the same page for reading.*

XE-13131 · Bounty

# Desk: poll path drops edited GitHub comments — stale public thread content forever

Closed · duplicate
—claimed Minor
web
filed 2026-11-14 17:20 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

- [626878](https://bounty.xe.network/log/626878) 2026-11-20 19:46 UTC proposal.adopted
- [626877](https://bounty.xe.network/log/626877) 2026-11-20 19:46 UTC reply.sent
- [626876](https://bounty.xe.network/log/626876) 2026-11-20 19:46 UTC ticket.status new → closed
- [623691](https://bounty.xe.network/log/623691) 2026-11-20 19:45 UTC proposal.adopted
- [623690](https://bounty.xe.network/log/623690) 2026-11-20 19:45 UTC proposal.adopted
- [623689](https://bounty.xe.network/log/623689) 2026-11-20 19:45 UTC ticket.facts
- [623688](https://bounty.xe.network/log/623688) 2026-11-20 19:45 UTC proposal.adopted
- [623687](https://bounty.xe.network/log/623687) 2026-11-20 19:45 UTC ticket.facts
- [609327](https://bounty.xe.network/log/609327) 2026-11-20 15:04 UTC note.added
- [609326](https://bounty.xe.network/log/609326) 2026-11-20 15:04 UTC proposal.created
- [609325](https://bounty.xe.network/log/609325) 2026-11-20 15:04 UTC proposal.created
- [609324](https://bounty.xe.network/log/609324) 2026-11-20 15:04 UTC proposal.created

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

### Report

The desk mirrors GitHub issue comments into the public ticket thread through two paths: the poll (import\_repo) and the webhook (handle\_webhook). The webhook passes update\=True when a comment is edited, so the mirrored message takes the new body. The poll calls the same upsert\_comment with the default update\=False, so an edit re-fetched by the poll is silently discarded: the desk keeps showing the pre-edit body indefinitely, with no event and no error.

Mechanism: import\_repo (desk/services/sync.py:410-420) re-fetches comments with client.comments(repo, issue\["number"\], since\=since). GitHub's list-comments since filter is on updated\_at, so an edited comment IS returned by the poll — with the new body. The poll then calls upsert\_comment(ctx, db, t, c) with no update flag, so update defaults to False (sync.py:167-169). upsert\_comment → thread.add\_message (desk/services/thread.py:129-156) is idempotent on (source, source\_ref): when the row already exists and update is false it returns None without touching the body. Only the webhook path passes the flag (sync.py:681: upsert\_comment(..., update\=action \=\= "edited")). The module docstring promises "all three go through the same upsert\_\* functions" (full import, since poll, webhook). The poll and the webhook differ on exactly this flag, breaking that invariant.

Reproduction (from code): (1) Reporter posts comment C on issue #N → mirrored to the ticket thread. (2) Reporter edits C on GitHub (corrects a PoC, retracts a claim) → updated\_at bumps. (3) The webhook delivery is missed (desk downtime, GitHub delivery failure) or the edit arrives via a full import (since\=None uses the same code path). (4) The poll re-fetches C with the new body → upsert\_comment(update\=False) → add\_message finds the existing row → returns None → the new body is discarded, no event, no error. (5) Every subsequent poll repeats the silent drop; the desk shows the pre-edit body indefinitely. The only two production callers of upsert\_comment are :418 (poll, no flag) and :681 (webhook, flag); no other update\=True caller exists.

Impact: stale/misleading public thread content: a correction or retraction made on GitHub never reaches the desk, and triage can proceed on superseded text. Minor — integrity of the desk's own records, same class as XE-12966 (also log/state integrity, Minor). No confidentiality or payout impact.

Why not a duplicate: XE-12966 is the \>512-char title comparison asymmetry in upsert\_issue (different function, different object, different trigger). XE-12802 is deleted issues (stale github\_state, dead source\_url). Board search /?q\=upsert\_comment (2026-11-14) shows only XE-11765 (check-then-insert race raising IntegrityError) and XE-2893 (blocked-login issue edits) — different mechanisms. /?q\=edited\+comment → 0 hits. Repo: xeprotocol/desk @ ab9df7fdc4f48bee4101060b59b8a2d80e818136.

Suggested fix: pass update\=True in the import\_repo comment loop (or make upsert\_comment default to update\=True). The webhook already proves the update path is safe: it only rewrites public, unsealed rows (thread.py:151-155).

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