Repository navigation
fix(sync): don't skip listing when the repository updated_at is unchanged - #73
Open
vkislichenko wants to merge 1 commit into
Open
vkislichenko wants to merge 1 commit into
vkislichenko wants to merge 1 commit into
Conversation
…nged Incremental sync returned early whenever the repository's `updated_at` matched the last run. GitHub doesn't bump that field for comments, reviews or issue edits, so those updates were silently skipped. And since the early return also skipped advancing `lastSyncedAt`, every following run kept the same old `since` and kept skipping, while `lastSyncRun` still looked like a fresh, successful run. Now items are always listed with `since`, which costs one request when nothing changed. The `updated_at` check only gates rewriting `repo.json`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Incremental sync returns early when the repo's
updated_atmatches the last run. But GitHub doesn't bump that for comments, reviews or issue edits, so those changes get skipped. It also doesn't advancelastSyncedAton that path, so the next runs keep the same oldsinceand keep skipping, whilelastSyncRunlooks like a normal successful run.I hit this on a repo where a PR got a "changes requested" review and the mirror still showed it as waiting for review days later.
Now it always lists with
since(one request when nothing changed), and theupdated_atcheck only decides whether to rewriterepo.json. Two existing tests asserted that listing was skipped, so I flipped those, and added one where the repoupdated_atis unchanged but a PR is newer.Tested on a copy of that mirror: before, 2 requests and nothing updated; after, the 3 changed PRs were fetched (including the review), and the next idle run took 3 requests.