Repository navigation
fix: update cached impression timestamps after repeated evaluations - #661
Draft
Kayvan-Zahiri wants to merge 1 commit into
Draft
Kayvan-Zahiri wants to merge 1 commit into
Kayvan-Zahiri wants to merge 1 commit into
Conversation
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.
Updating an existing
SimpleLruCachekey returns its old value but never stores the replacement. Consequently,Observerkeeps reporting the first timestamp for an impression, and optimized mode continues queueing duplicates after crossing an hour boundary: the cached timestamp remains in the earlier hour.Assign the new value to the existing node while retaining the previous value for the return. LRU promotion and eviction remain unchanged.
Four new regressions cover repeated replacement, replacement plus eviction, observer previous timestamps, and optimized deduplication after an hour boundary. All four fail before the fix. Existing manager/listener expectations are updated to use the immediately preceding timestamp instead of the first timestamp.
Validation on Python 3.13 with the declared test dependencies:
python setup.py build, changed-source Flake8, andgit diff --checkpass.Full-suite verification is incomplete: a restricted run stopped at 318 passes, the two baseline factory failures, and three local-server socket-permission errors. A retry with localhost access excluding service integration/Redis storage tests stopped progressing in factory tests and was interrupted. Redis service integration and the supported Python/platform matrix remain unverified. No hosted Harness/Split requests or credentials were used.
Targets
developmentas required by CONTRIBUTORS-GUIDE.md. Developed with Codex assistance and reproduced locally.