You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Move system_prompt_override test infrastructure off AgentSession #1093
system_prompt_override on AgentSession (a public, Tauri-serialized struct) embeds test infrastructure in the production domain model. This was flagged in a code review of PR #1091.
Problem
AgentSession is serialized and exposed via Tauri commands to the frontend
The field is used only by integration tests (ollama_integration.rs) to inject pre-built prompts without a live database
The conventional alternative is to keep test infrastructure out of production domain types
Challenge
A simple #[cfg(test)] on the struct field doesn't work because:
Integration tests in tests/ compile against the library in non-test mode
#[cfg(test)] on library fields is NOT active when linked from tests/*.rs binaries
Possible Approaches
Separate test-only session type: Create an AgentSessionTestExt or test builder in the agent test module
Inject via constructor: Give the test a way to pass the prompt override at session creation time via a separate test-facing create_session_with_prompt() method that is feature-gated
Test service wrapper: Wrap LocalAgentService in a test-only struct that intercepts send_message to inject the prompt before forwarding
testing feature flag: Add a testing Cargo feature that gates the field and method — properly excluded from production builds
Frontend baseline: 128 test files passed, 3918 tests passed (Duration 43.24s). Note: integration tests in packages/agent/tests/ollama_integration.rs require live Ollama and are not part of the standard frontend baseline.
Activity
Address review: error handling consistency, assemble_static param, no…
Fix e2e tool coverage gaps in ollama_integration tests and search_nod…
malibio commentedon May 17, 2026
Frontend baseline: 128 test files passed, 3918 tests passed (Duration 43.24s). Note: integration tests in packages/agent/tests/ollama_integration.rs require live Ollama and are not part of the standard frontend baseline.
Fix e2e tool coverage gaps in ollama_integration tests and search_nod…
Gate AgentSession.system_prompt_override behind testing feature (closes