LearnNewsExamplesServices
Frontmatter
id7615
titleOptimize GitHub Issue Sync: Dynamic `syncStartDate` for Delta Updates
stateClosed
labels
enhancement
assigneestobiu
createdAtOct 23, 2025, 1:12 AM
updatedAtOct 23, 2025, 1:14 AM
githubUrlhttps://github.com/neomjs/neo/issues/7615
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 23, 2025, 1:14 AM

Optimize GitHub Issue Sync: Dynamic syncStartDate for Delta Updates

Closed v11.0.0 enhancement
tobiu
tobiu commented on Oct 23, 2025, 1:12 AM

This ticket documents an important optimization implemented in the GitHub issue synchronization service (SyncService.mjs).

Problem: Previously, the pullFromGitHub method in SyncService.mjs used a static issueSyncConfig.syncStartDate value when querying GitHub for updated issues. This meant that even for incremental updates, the service would fetch all issues updated since a potentially very old syncStartDate, leading to unnecessary data transfer and processing, and resulting in slow synchronization times even when only a few issues had changed. The issue was particularly noticeable when all local issue folders were deleted, triggering a full re-sync that took approximately 20 seconds.

Solution: The pullFromGitHub method has been modified to dynamically use metadata.lastSync as the since parameter for the FETCH_ISSUES_FOR_SYNC GraphQL query. This ensures that subsequent synchronizations only fetch issues that have been updated on GitHub since the last successful sync. If metadata.lastSync is not available (e.g., on the very first sync or after a metadata reset), it falls back to the configured issueSyncConfig.syncStartDate.

Impact:

  • Improved Performance: Incremental synchronizations are now significantly faster as only truly updated issues are fetched and processed.
  • Reduced API Usage: Less data is transferred from GitHub, conserving API rate limits.
  • Correct Delta Logic: The synchronization now correctly implements delta updates based on the last successful sync timestamp.

Files Changed:

  • ai/mcp/server/github-workflow/services/SyncService.mjs

Verification:

  • Observe faster sync times for incremental updates.
  • Verify that deleting all local issue folders still triggers a full re-sync, which is expected behavior.
tobiu assigned to @tobiu on Oct 23, 2025, 1:12 AM
tobiu added the enhancement label on Oct 23, 2025, 1:12 AM
tobiu referenced in commit 6011365 - "Optimize GitHub Issue Sync: Dynamic syncStartDate for Delta Updates #7615" on Oct 23, 2025, 1:13 AM
tobiu closed this issue on Oct 23, 2025, 1:14 AM