test(e2e): full LLM round-trip with FakeAssistantProvider#463
Merged
Conversation
## Priority 5: Refactor / Quality Builds on #460. Drives the **real** VoicePipeline through a non-fast- path utterance so it falls into the LLM agent loop, with a scripted FakeAssistantProvider standing in for the embedded LLM. No DI module changes needed: ConversationRouter already accepts dynamically registered providers via registerProvider, and Manual policy lets a test pin its own fake as the resolved provider. Test additions: - FakeAssistantProvider: AssistantProvider impl that returns scripted responses from a queue, records every send() call into sentMessages for assertions. capabilities.isLocal=true so the Auto policy never gates this provider on the emulator's network state. - AssistantProviderE2ETest: * llm_response_is_spoken_via_tts — register the fake, queue an Assistant message, drive `processUserInput("explain quantum computing")` (an ambiguous-info utterance that fast-path ignores), assert (a) the user message was sent to the provider, (b) the canned reply was spoken via FakeTextToSpeech. * fake_provider_is_resolved_under_manual_policy — guards against silent re-routing if the production model-download path registers a real provider mid-suite. This is the first L3 test that exercises the priority-2 contract (local-LLM agentic path) end-to-end through the production graph. The L1 unit tests can't catch a router-vs-pipeline integration regression here because they don't bind the actual VoicePipeline singleton. Verification: - ./gradlew assembleStandardDebugAndroidTest — green - ./gradlew assembleStandardDebug testStandardDebugUnitTest — green
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.
Priority 5: Refactor / Quality (testing the priority-2 contract)
Builds on #460. Drives the real `VoicePipeline` through a non-fast-path utterance so it falls into the LLM agent loop, with a scripted `FakeAssistantProvider` standing in for the embedded LLM.
No DI module changes needed: `ConversationRouter` already accepts dynamically registered providers via `registerProvider`, and Manual policy lets a test pin its own fake as the resolved provider.
What changed
Tests (`app/src/androidTest/...`)
Why this matters
This is the first L3 test that exercises the priority-2 contract (local-LLM agentic path) end-to-end through the production graph. The L1 unit tests can't catch a router-vs-pipeline integration regression here because they don't bind the actual `VoicePipeline` singleton.
Test plan