LearnNewsExamplesServices
Frontmatter
id13811
titlefeat(ai): refetchDiscussionsByNumber force-refetch for stale discussion mirrors (discussions slice of #13794)
stateClosed
labels
enhancementaiarchitecture
assignees[]
createdAtJun 21, 2026, 10:09 PM
updatedAtJun 21, 2026, 11:17 PM
githubUrlhttps://github.com/neomjs/neo/issues/13811
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 21, 2026, 11:17 PM

feat(ai): refetchDiscussionsByNumber force-refetch for stale discussion mirrors (discussions slice of #13794)

Closed v13.1.0/archive-v13-1-0-chunk-5 enhancementaiarchitecture
neo-opus-ada
neo-opus-ada commented on Jun 21, 2026, 10:09 PM

Discussions slice of #13794 (the symmetric force-refetch)

Delivers the discussion half of #13794: a standalone, out-of-band, idempotent force-refetch primitive for discussion mirrors that bypasses the bulk delta-updatedAt gate — a faithful mirror of the shipped refetchPullsByNumber (the pulls slice, #13803) / refetchIssuesByNumber. Completes #13794 alongside #13803. The discussions half was handed off by @neo-gpt (who held the #13794 claim).

Deltas

  • FETCH_SINGLE_DISCUSSION_FOR_SYNC (new query): single-discussion variant of FETCH_DISCUSSIONS_FOR_SYNC, identical node shape (body + comments + nested replies).
  • DiscussionSyncer#renderDiscussionMarkdown (extracted, behavior-preserving): the frontmatter + body + comments + nested-replies render, incl. the frontmatter integrity gate.
  • DiscussionSyncer.refetchDiscussionsByNumber(numbers, metadata, indexMutations?): mirrors refetchPullsByNumber.
  • SyncService.refetchDiscussionsByNumber({numbers}): facade (load → delegate → persist).
  • ai/scripts/migrations/refetchStaleDiscussions.mjs: standalone CLI (pull-only, no orchestrator/lease).

Contract Ledger

Surface Kind Change Consumers Back-compat
FETCH_SINGLE_DISCUSSION_FOR_SYNC GraphQL query export NEW DiscussionSyncer.refetchDiscussionsByNumber Additive
DiscussionSyncer.refetchDiscussionsByNumber(numbers, metadata, indexMutations?) service method NEW SyncService.refetchDiscussionsByNumber Additive
SyncService.refetchDiscussionsByNumber({numbers}) service facade NEW refetchStaleDiscussions.mjs CLI Additive
ai/scripts/migrations/refetchStaleDiscussions.mjs CLI script NEW operator / CI (out-of-band) Additive
DiscussionSyncer#renderDiscussionMarkdown(discussion) private method extracted syncDiscussions + refetchDiscussionsByNumber Behavior-preserving (16/16 spec green)

AC

  • refetchDiscussionsByNumber on DiscussionSyncer + a SyncService facade, pull-only, idempotent, bypassing the delta-updatedAt gate.
  • Standalone CLI, no orchestrator/lease dependency (works under scheduler saturation).
  • Unit coverage mirroring the pulls/issue refetch tests (force-re-render bypassing the hash gate; skip a discussion no longer on GitHub).

Sub of #13794 (completes it with #13803). Surfaced by @neo-opus-ada.

tobiu referenced in commit bd56ec1 - "feat(ai): refetchDiscussionsByNumber force-refetch for stale discussion mirrors (#13811) (#13812) on Jun 21, 2026, 11:17 PM
tobiu closed this issue on Jun 21, 2026, 11:17 PM