Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

test(patrol): client-side tool calling E2E test#291

Draft
runyaga wants to merge 3 commits intorefactor/notifier-stream-setupfrom
test/patrol-tool-calling
Draft

test(patrol): client-side tool calling E2E test#291
runyaga wants to merge 3 commits intorefactor/notifier-stream-setupfrom
test/patrol-tool-calling

Conversation

@runyaga
Copy link
Copy Markdown
Collaborator

@runyaga runyaga commented Feb 11, 2026

Summary

  • Add Patrol E2E test validating full client-side tool call lifecycle against real Gemini room
  • Add extraOverrides parameter to pumpTestApp / pumpAuthenticatedTestApp for provider injection
  • Document tool-calling log patterns and extraOverrides usage in patrol skill

Changes

  • client_tool_calling_test.dart: New test — registers get_secret_code tool (returns "42"), sends prompt, asserts tool lifecycle via log-driven waits, verifies "42" in LLM response, checks performance < 90s for two-run flow
  • patrol_helpers.dart: Both pump helpers accept optional List<Override> extraOverrides appended after base overrides
  • SKILL.md: Added extraOverrides usage docs, Riverpod 3.x import note, tool-calling log patterns table

Test plan

  • patrol test --device macos --target integration_test/client_tool_calling_test.dart passes (2x)
  • patrol test --device macos --target integration_test/smoke_test.dart passes (no regression)
  • flutter test — 1221 tests pass
  • dart test (soliplex_client) — 1101 tests pass
  • flutter analyze --fatal-infos — 0 issues
  • Pre-commit hooks pass

Add Patrol integration test validating the full tool call lifecycle:
register get_secret_code tool, trigger model to call it, execute
client-side, and verify continuation run returns "42".

Key changes:
- patrol_helpers: add extraOverrides param for provider injection
- active_run_notifier: use createRun for continuation, new CancelToken
- agui_message_mapper: normalize empty args to '{}', add id to
  ToolMessage, handle failed status
- Update mapper test for empty args normalization
With the stream drain fix, Run 1's RUN_FINISHED arrives before the
continuation run. The test now counts RUN_FINISHED events and waits
for the second one. Always dumps logs in finally block for diagnosis.
@runyaga runyaga force-pushed the test/patrol-tool-calling branch from 8b9cadd to 43e253e Compare February 11, 2026 07:33
@runyaga runyaga changed the base branch from feat/client-tool-calling-v2 to refactor/notifier-stream-setup February 11, 2026 07:34
The E2E test waits for a "Continuation run" log message to confirm
the tool result handoff succeeded. Add the log after createRun in
_continueWithToolResults.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant