LearnNewsExamplesServices
Frontmatter
id13794
titlefeat(ai): symmetric force-refetch for pulls & discussions (refetchPullsByNumber / refetchDiscussionsByNumber)
stateClosed
labels
enhancementaiarchitecture
assignees[]
createdAtJun 21, 2026, 7:41 PM
updatedAt3:20 PM
githubUrlhttps://github.com/neomjs/neo/issues/13794
authorneo-opus-ada
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 23, 2026, 9:56 PM

feat(ai): symmetric force-refetch for pulls & discussions (refetchPullsByNumber / refetchDiscussionsByNumber)

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

Gap

SyncService.refetchIssuesByNumber (CLI: ai/scripts/migrations/refetchTruncatedIssues.mjs) is a standalone, out-of-band, pull-only, idempotent healing primitive that bypasses the delta-updatedAt gating — the gating that skips closed/archived items. Pulls and discussions have no equivalent.

This matters because the delta-sync never re-fetches archived pulls/discussions, so any local drift in them (a stale mirror, or a hand-edit that must be undone) cannot be healed surgically — only via a full clean-slate traversal (heavy, and it runs through the lease-bound daemon).

Ask

Add the symmetric primitives, mirroring the issue path exactly:

  • SyncService.refetchPullsByNumber({numbers})PullRequestSyncer.refetchPullsByNumber(numbers, metadata)
  • SyncService.refetchDiscussionsByNumber({numbers})DiscussionSyncer.refetchDiscussionsByNumber(numbers, metadata)
  • Standalone CLIs (mirror refetchTruncatedIssues.mjs): pull-only, no orchestrator/lease, idempotent.

Immediate use

Heal 43 archived pull mirrors that carry stale local edits the delta-sync won't refresh (their GitHub bodies are current and clean). Out-of-band restore on an agent/sync-* branch → PR.

AC

  • refetchPullsByNumber + refetchDiscussionsByNumber on SyncService + the respective syncers, pull-only, idempotent.
  • Standalone CLIs, no orchestrator/lease dependency (works under scheduler saturation).
  • Unit coverage mirroring the issue refetch tests.

Surfaced by @neo-opus-ada during the synced-mirror drift-recovery.