Pulls slice of #13794 (the symmetric force-refetch)
Delivers the pull-request half of #13794: a standalone, out-of-band, idempotent force-refetch primitive for closed/merged PR mirrors that bypasses the bulk delta-updatedAt gate — a faithful mirror of the shipped SyncService.refetchIssuesByNumber / refetchTruncatedIssues.mjs. The design is the explicit "mirror the issue path exactly" spec in #13794, so this slice is code-ready (the established, shipped pattern). #13794 stays open for the discussions half (refetchDiscussionsByNumber).
Immediate use
Heal the 43 archived pull mirrors that carry stale local edits the delta-sync won't refresh (their GitHub bodies are current + clean):
node ai/scripts/migrations/refetchStalePulls.mjs <nums>
Deltas
FETCH_SINGLE_PULL_FOR_SYNC (new query): single-PR variant of FETCH_PULL_REQUESTS_FOR_SYNC, identical node shape.
PullRequestSyncer#renderPullRequestMarkdown (extracted, behavior-preserving): the frontmatter + body + comments + reviews render, so bulk-sync and refetch render identically (no drift).
PullRequestSyncer.refetchPullsByNumber(numbers, metadata, indexMutations?): mirrors IssueSyncer.refetchIssuesByNumber.
SyncService.refetchPullsByNumber({numbers}): facade (load → delegate → persist).
ai/scripts/migrations/refetchStalePulls.mjs: standalone CLI (pull-only, no orchestrator/lease).
Contract Ledger
| Surface |
Kind |
Change |
Consumers |
Back-compat |
FETCH_SINGLE_PULL_FOR_SYNC |
GraphQL query export |
NEW |
PullRequestSyncer.refetchPullsByNumber |
Additive |
PullRequestSyncer.refetchPullsByNumber(numbers, metadata, indexMutations?) |
service method |
NEW |
SyncService.refetchPullsByNumber |
Additive |
SyncService.refetchPullsByNumber({numbers}) |
service facade |
NEW |
refetchStalePulls.mjs CLI |
Additive |
ai/scripts/migrations/refetchStalePulls.mjs |
CLI script |
NEW |
operator / CI (out-of-band) |
Additive |
PullRequestSyncer#renderPullRequestMarkdown(pr) |
private method |
extracted |
syncPullRequests + refetchPullsByNumber |
Behavior-preserving (byte-identical bulk-sync output; 13/13 spec green) |
AC
Sub of #13794. Surfaced by @neo-opus-ada.
Pulls slice of #13794 (the symmetric force-refetch)
Delivers the pull-request half of #13794: a standalone, out-of-band, idempotent force-refetch primitive for closed/merged PR mirrors that bypasses the bulk delta-
updatedAtgate — a faithful mirror of the shippedSyncService.refetchIssuesByNumber/refetchTruncatedIssues.mjs. The design is the explicit "mirror the issue path exactly" spec in #13794, so this slice is code-ready (the established, shipped pattern). #13794 stays open for the discussions half (refetchDiscussionsByNumber).Immediate use
Heal the 43 archived pull mirrors that carry stale local edits the delta-sync won't refresh (their GitHub bodies are current + clean):
Deltas
FETCH_SINGLE_PULL_FOR_SYNC(new query): single-PR variant ofFETCH_PULL_REQUESTS_FOR_SYNC, identical node shape.PullRequestSyncer#renderPullRequestMarkdown(extracted, behavior-preserving): the frontmatter + body + comments + reviews render, so bulk-sync and refetch render identically (no drift).PullRequestSyncer.refetchPullsByNumber(numbers, metadata, indexMutations?): mirrorsIssueSyncer.refetchIssuesByNumber.SyncService.refetchPullsByNumber({numbers}): facade (load → delegate → persist).ai/scripts/migrations/refetchStalePulls.mjs: standalone CLI (pull-only, no orchestrator/lease).Contract Ledger
FETCH_SINGLE_PULL_FOR_SYNCPullRequestSyncer.refetchPullsByNumberPullRequestSyncer.refetchPullsByNumber(numbers, metadata, indexMutations?)SyncService.refetchPullsByNumberSyncService.refetchPullsByNumber({numbers})refetchStalePulls.mjsCLIai/scripts/migrations/refetchStalePulls.mjsPullRequestSyncer#renderPullRequestMarkdown(pr)syncPullRequests+refetchPullsByNumberAC
refetchPullsByNumberonPullRequestSyncer+ aSyncServicefacade, pull-only, idempotent, bypassing the delta-updatedAtgate.Sub of #13794. Surfaced by @neo-opus-ada.