fix(deps): share llama backend in tests#209
Merged
Merged
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
Why
llama-cpp-2 0.1.151 permits backend initialization only once per process. The dependency-only update in #204 causes later engine tests to fail with BackendAlreadyInitialized. The repository policy also requires explicit test and ADR evidence for changes under the Rust KB path.
How
A test-only helper initializes the backend once and returns cloned Arc handles to the embedding and LLM tests. Production initialization and CI policy classification are unchanged.
Testing
Risks
Low. The backend helper is compiled only under cfg(test); production backend ownership and initialization are untouched.
Performance impact
No production impact. The shared test backend avoids repeated native backend initialization.
Lockfile rationale
Cargo.lock is refreshed by normal Cargo resolution for llama-cpp-2 0.1.151 and its transitive native build dependencies.
Screenshots
Not applicable; no UI changes.