fix(trakt): make history sync incremental and idempotent - #84
Conversation
|
Hi! Thank you for all the contributions. |
|
Thanks, understood. I'll wait for the release, then rebase and compare the new Trakt implementation against this PR. I'll update or close it depending on what remains relevant. |
55b3669 to
a0bdc96
Compare
|
Rebased this PR onto the current I also compared the v1.42.0 Trakt/webhook changes with this PR. The new webhook deduplication in This PR remains complementary rather than redundant:
Validation after the rebase:
|
a0bdc96 to
fb73805
Compare
|
Rebased and updated this PR on top of v1.43.0 ( The v1.43 fix addresses the immediate “all titles watched now” failure by sending a timestamp, but these safety gaps remained and are retained/fixed by this PR:
Added regression coverage for the two gaps found while reviewing v1.43:
Validation after the rebase:
|
Summary
watched_attimestamp during full pushesFull resyncexhaustive, while normal pulls fetch only recent historyWhy
Issue #82 reports duplicate and incorrect Trakt history after pulls. The pull-to-push echo guard already exists, but the full push path still collapsed local history to one event per media and recreated events at push time. This change removes that destructive behavior and reduces recurring pulls to a bounded, overlap-safe window.
Verification
python -m unittest discover -s tests -v— 59 passedpython -m compileall -q core models routers testspython -m alembic heads—b6c7d8e9f0a1 (head)npm ci && npm run build— Astro production build passedAddresses #82.