Fix runtime embedder injection for offline tests - #31
Open
taditya1997 wants to merge 1 commit into
Open
taditya1997 wants to merge 1 commit into
taditya1997 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.
What breaks
AgentRuntime()always constructsOllamaNomicEmbedder, so runtime-level tests that only need graph/capability wiring can still make a live request tolocalhost:11434while writing the inbound memory record. On a clean machine without Ollama running,tests/test_capability_contracts.py::test_every_registered_capability_has_a_worker_and_every_worker_is_registeredfails before it reaches the patched executor probe.Proof before the fix
From a fresh checkout with no Ollama service on
localhost:11434:I also added
test_agent_runtime_accepts_an_injected_memory_embedder, which initially failed with:Fix
Add an explicit
memory_embedderconstructor argument toAgentRuntime, defaulting to the existingOllamaNomicEmbedder()for production behavior. The capability-contract probe now uses the public injection seam withDeterministicEmbedder, so it remains offline and verifies the intended worker/registry contract.Verification after the fix
No
.env, credentials, tokens, real messages, or personal data are included.