Repository navigation
fix(reflection): retain the runtime store for local execution - #195
Draft
hylin (linhongyu510) wants to merge 1 commit into
Draft
hylin (linhongyu510) wants to merge 1 commit into
hylin (linhongyu510) wants to merge 1 commit into
Conversation
11 of 25 tasks
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.
When
ReflectionExecutor(reflector)is used inside@entrypoint(store=store),submit()resolves the runtime store but leavesself._storeasNone. The background worker then overwrites the runtime's store withNone, so memory writes fail. Synchronous and asynchronous executor searches fail for the same reason.Fixes #194.
Retain the resolved store inside the existing double-checked lock before enqueueing. The worker and search methods then use the same store, as they already do for an explicit constructor store.
Adds eight behavioral cases using a real
InMemoryStoreand LangGraph entrypoint:Validation on Python 3.12.13 / LangGraph 1.2.14:
python -m pytest tests/test_reflection_store.py tests/short_term -q: 38 passed.git diff --check: passed.One pre-existing
trustcalldeprecation warning appears on both versions. Provider-backed documentation examples were not run; these tests require no model API or external database.Production scope is one assignment in
LocalReflectionExecutor.submit(). This does not change cancellation handling, the remote executor or any public API. The existing lifetime model still binds one store per local executor.Prepared with AI assistance. The validation above was executed locally.