Repository navigation
test: make semantic-storage timestamp filters deterministic - #1849
Open
DivyamTalwar wants to merge 1 commit into
Open
DivyamTalwar wants to merge 1 commit into
DivyamTalwar wants to merge 1 commit into
Conversation
Refs MemMachine#1724 Implemented and reviewed with OpenAI Codex. Signed-off-by: Divyam Talwar <divyamtalwar0@gmail.com>
This branch has not been deployed
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.
Purpose of the change
Semantic-storage time-filter tests currently bracket the host clock with short sleeps, while PostgreSQL and Neo4j create timestamps using their own clocks. The intended ordering therefore depends on clock agreement. This makes the tested data deterministic without changing production timestamp generation or predicates.
Description
registered_atvalues in both history-age tests. Preserve minimum-uningested, set identity, and ingestion-state assertions; add the exact inclusive cutoff boundary.created_atrelative to registration time to prove the filter uses the intended timestamp.add_feature: committed SQL updates, Neo4jelementIdupdates, or in-memory entries. Unsupported backends fail explicitly.<,>=, range, set, and tag expectations in all three feature-filter families.Fixes/Closes
Fixes #1724.
Type of change
How Has This Been Tested?
Controlled regression on Linux/Python 3.12:
Real integration on macOS arm64/Python 3.12.12 with Docker:
Integration command:
uv run --frozen pytest \ packages/server/server_tests/memmachine_server/semantic_memory/storage/test_semantic_storage.py \ -m integration -k 'older_than or created_at' -vv -rsThe initial Linux integration attempt skipped all 26 cases because Docker was unavailable there; those skips are not counted as validation. The subsequent Mac run above executed all 26. The full repository and OS/Python CI matrix were not run locally.
Checklist
Maintainer Checklist
Further comments
Implementation, code review, and validation were performed with OpenAI Codex under the contributor's authorization. Human self-review remains unchecked. The commit is signed off and has GitHub's verified signature. This patch changes one test file, with no production or dependency-lock changes.