Repository navigation
fix(ingestion): keep synthetic activity timestamps out of the sync cursor - #67
Merged
Merged
Conversation
This was referenced Oct 13, 2026
Contributor
Author
|
Status: ready for review. This adds the optional |
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.
Problem
IngestionService.pollServersetservers.lastActivitySyncto the maximum timestamp of every activity a provider returned. Providers also return synthetic rows stamped with the detection time (new Date()), such as *arr health checks and queue warnings.A single such row moves the cursor to "now". History rows with event times between the old cursor and now that weren't returned in that poll (because of paging caps or API lag) are then never fetched again. This came up in the reviews of #58 and #62, and the *arr base provider has the same issue.
Fix
NormalizedActivitygets an optionaladvancesSyncCursorflag. It defaults totrue; providers set it tofalseon rows whose timestamp is the detection time rather than the event time.false, in a small pure helper,computeSyncCursor. If no row qualifies, the stored cursor is left unchanged.advancesSyncCursor: false.#58 (Bazarr) and #62 (qBittorrent) build on this.
Tests
build,lint,typecheckand all test suites pass.