fix: cross-project context traversal#874
Open
sourrris wants to merge 1 commit into
Open
Conversation
Signed-off-by: sourrrish <officialsourish0@gmail.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.
Summary
Fixes #873.
This updates
build_contextrelation traversal so an explicit wiki-link/relation can cross from the selected project into another project, and then continue along the reached project’s own relation edges. The seed entity still has to belong to the requested project, and unrelated incoming links from other projects are not pulled into the context.Root Cause
The recursive context CTE forced every reached entity through the seed project filter. That meant a valid relation from project A to an entity in project B could be returned as a relation row, but the target entity could not be expanded or hydrated as graph context.
Changes
project_idthrough traversal.Validation
just installTZ=UTC PYTHONPATH=/Users/sourrrish/Documents/Opensource/basic-memory/src DOCKER_HOST=unix:///Users/sourrrish/.colima/default/docker.sock TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock just check-all2685 passed, 31 skipped.322 passed, 4 skipped, 20 deselected.2669 passed, 47 skipped.19 passed, 1 skipped.just check-allhit its 600s timeout at 86%, so I reran the exact suite without that timeout.TZ=UTC PYTHONPATH=/Users/sourrrish/Documents/Opensource/basic-memory/src DOCKER_HOST=unix:///Users/sourrrish/.colima/default/docker.sock TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock BASIC_MEMORY_ENV=test BASIC_MEMORY_TEST_POSTGRES=1 uv run pytest -p pytest_mock -v --no-cov -m "not semantic" test-int313 passed, 13 skipped, 20 deselected.