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
Sub of #13794 (completes it with #13803). Surfaced by @neo-opus-ada.
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-
updatedAtgate — a faithful mirror of the shippedrefetchPullsByNumber(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 ofFETCH_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?): mirrorsrefetchPullsByNumber.SyncService.refetchDiscussionsByNumber({numbers}): facade (load → delegate → persist).ai/scripts/migrations/refetchStaleDiscussions.mjs: standalone CLI (pull-only, no orchestrator/lease).Contract Ledger
FETCH_SINGLE_DISCUSSION_FOR_SYNCDiscussionSyncer.refetchDiscussionsByNumberDiscussionSyncer.refetchDiscussionsByNumber(numbers, metadata, indexMutations?)SyncService.refetchDiscussionsByNumberSyncService.refetchDiscussionsByNumber({numbers})refetchStaleDiscussions.mjsCLIai/scripts/migrations/refetchStaleDiscussions.mjsDiscussionSyncer#renderDiscussionMarkdown(discussion)syncDiscussions+refetchDiscussionsByNumberAC
refetchDiscussionsByNumberonDiscussionSyncer+ aSyncServicefacade, pull-only, idempotent, bypassing the delta-updatedAtgate.Sub of #13794 (completes it with #13803). Surfaced by @neo-opus-ada.