Skip to content

Your phone, on your command. Gotcha is world's first fully on-device AI copilot for Android that turns natural language into real device actions — safely.

44.2 KB
Raw Blame

Feature Test Coverage

Every tool the assistant can call is listed below, together with how it is verified. Tools are the app's feature surface, so this table answers "which features are tested, and which are not?".

Summary

Tier Tools What it means
UNIT 24 Plain JVM unit test — no Android framework needed.
ROBOLECTRIC 34 JVM test against Robolectric's Android framework, often across several API levels.
INSTRUMENTED 0 Runs on a real device or emulator (app/src/androidTest).
MANUAL_ONLY 64 No automated test — verified by hand, see the checklist below.
Total 122

58 of 122 tools are covered by an automated test; the remaining 64 are manual-QA-only with a recorded reason.

Foreground tools (act on the screen)

Tool Tier Tests / reason
compose_email MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
dial_number MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
global_action MANUAL_ONLY Depends on a live GotchaAccessibilityService bound to a real foreground app; the service cannot reliably self-bind under instrumentation (see AccessibilityServiceTest's @Ignore writeup).
input_text MANUAL_ONLY Depends on a live GotchaAccessibilityService bound to a real foreground app; the service cannot reliably self-bind under instrumentation (see AccessibilityServiceTest's @Ignore writeup).
long_press MANUAL_ONLY Depends on a live GotchaAccessibilityService bound to a real foreground app; the service cannot reliably self-bind under instrumentation (see AccessibilityServiceTest's @Ignore writeup).
long_press_index MANUAL_ONLY Depends on a live GotchaAccessibilityService bound to a real foreground app; the service cannot reliably self-bind under instrumentation (see AccessibilityServiceTest's @Ignore writeup).
navigate_app MANUAL_ONLY Nested navigator agent loop over a live accessibility service and a live LLM connection.
open_app ROBOLECTRIC SystemToolTest — launch intent flags and the unknown-package message
open_setting UNIT SettingsRouterTest — routing table integrity, SDK fallback selection, unknown-key fallback to navigate_app, and the confirm-first gate
press_key MANUAL_ONLY Depends on a live GotchaAccessibilityService bound to a real foreground app; the service cannot reliably self-bind under instrumentation (see AccessibilityServiceTest's @Ignore writeup).
read_screen MANUAL_ONLY Depends on a live GotchaAccessibilityService bound to a real foreground app; the service cannot reliably self-bind under instrumentation (see AccessibilityServiceTest's @Ignore writeup).
read_screen_raw MANUAL_ONLY Depends on a live GotchaAccessibilityService bound to a real foreground app; the service cannot reliably self-bind under instrumentation (see AccessibilityServiceTest's @Ignore writeup).
share_podcast ROBOLECTRIC PodcastToolTest — the guards and the intent contract: missing files and non-audio extensions refused before any chooser appears, a file outside the FileProvider's Gotcha/ mapping reported with a move-it-first message instead of a crash, and the happy path verified to build an ACTION_SEND chooser carrying a content:// URI (never file://) with the read-grant flag. Actually watching the share sheet appear and land in another app is device-only manual verification
show_alarms MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
swipe MANUAL_ONLY Depends on a live GotchaAccessibilityService bound to a real foreground app; the service cannot reliably self-bind under instrumentation (see AccessibilityServiceTest's @Ignore writeup).
tap MANUAL_ONLY Depends on a live GotchaAccessibilityService bound to a real foreground app; the service cannot reliably self-bind under instrumentation (see AccessibilityServiceTest's @Ignore writeup).
tap_index MANUAL_ONLY Depends on a live GotchaAccessibilityService bound to a real foreground app; the service cannot reliably self-bind under instrumentation (see AccessibilityServiceTest's @Ignore writeup).
task MANUAL_ONLY Delegates to a nested agent loop that needs a live LLM connection.

Background tools (change device or account state)

Tool Tier Tests / reason
add_contact MANUAL_ONLY Needs a writable Contacts ContentProvider; Robolectric's provider fakes do not support the full ContactsContract insert surface used by this tool.
call_number MANUAL_ONLY Needs real device hardware; the emulator has no faithful stand-in for this sensor/radio.
complete_task MANUAL_ONLY Routed to a live Microsoft Graph account; only the underlying GraphApi has JVM coverage today.
create_calendar_event UNIT CalendarToolsTest — connector path only; the on-device CalendarProvider path is manual
create_task MANUAL_ONLY Routed to a live Microsoft Graph account; only the underlying GraphApi has JVM coverage today.
delete_alarm MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
delete_calendar_event UNIT CalendarToolsTest — connector path only; destructive, so also gated by the confirmation flow
delete_scheduled_task ROBOLECTRIC ScheduledTaskToolTest — returns the destructive-delete confirmation marker; the task is only removed once confirmed
delete_timer MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
disable_camera MANUAL_ONLY Needs an active Device Admin registration, which cannot be granted non-interactively.
dismiss_notifications MANUAL_ONLY Needs NotificationListenerService bound with the user's explicit grant; not bindable from a test host.
dismiss_timer MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
edit ROBOLECTRIC FileToolsTest — unique match, replaceAll, no-match and blank-argument rejection
edit_alarm MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
edit_calendar_event UNIT CalendarToolsTest — connector path only; the on-device CalendarProvider path is manual
edit_scheduled_task ROBOLECTRIC ScheduledTaskToolTest — only the named fields change, a new schedule is re-armed, pausing clears the next run, unknown ids and empty edits are refused
hide_overlay MANUAL_ONLY Draws a real SYSTEM_ALERT_WINDOW; needs the 'Display over other apps' grant and a visible screen to verify.
lock_screen MANUAL_ONLY Needs an active Device Admin registration, which cannot be granted non-interactively.
mark_email_read UNIT EmailToolsTest — read/unread toggle routed to the right backend
media_control UNIT MediaSelectionTest — action parsing and active-session selection
media_convert ROBOLECTRIC MediaConvertToolTest, FfmpegCommandTest — exhaustive coverage of the generated ffmpeg command on the JVM — POSIX shell quoting against spaces, embedded quotes and metacharacters, /storage/emulated/0 to /sdcard translation including secondary-user roots and near-miss prefixes, bitrate validation, and every audio target's codec arguments — plus the guards that run before Termux is invoked: unsupported and video output formats, nonsense bitrates, paths inside Gotcha's private storage that Termux cannot see, missing input, same-file conversion, existing-output refusal and directory outputs. The conversion itself is device-only and additionally needs Termux with the ffmpeg package installed, so a real MP3 round trip must be verified by hand
media_edit ROBOLECTRIC MediaEditToolTest, MediaTimeSpecTest — timecode parsing and trim-window arithmetic on the JVM (m:ss, h:mm:ss, unit and plain-seconds forms, ambiguous-field and backwards-window refusals, clamping an over-long end), plus every guard that runs before a codec is touched: unknown operation, missing arguments, trim with no bounds, refusal to write back over the input or over any concat input, existing-output refusal, directory output, the MP4/M4A container check and the .mp3 redirect to .m4a, speed bounds and the pointless speed=1.0 re-encode, non-positive compress height, and concat's input-count limits. The export itself is device-only — Media3 Transformer drives MediaCodec, which is native and has no Robolectric shadow, so the output of trim, extract_audio, remove_audio, compress, speed and concat must be verified by hand on hardware
notion_append_to_page UNIT NotionToolsTest — block append request shape
notion_create_page UNIT NotionToolsTest — parent/title handling and request shape
pause_audio_recording MANUAL_ONLY Needs real device hardware; the emulator has no faithful stand-in for this sensor/radio.
pdf_edit ROBOLECTRIC PdfToolTest, PdfPageSpecTest, PdfEncryptionTest — every operation round-tripped through pdfbox (merge order, split naming, extract/delete page identity, cumulative rotation), password-protected files at 40/128/256-bit, and the guards: overwrite refusal, safe write-back over the input, delete-all refusal, non-PDF signature rejection and page-range arithmetic
pull_from_termux ROBOLECTRIC TermuxFileBridgeTest — the deterministic bridge that moves a file out of Termux: ~/ and $HOME expansion to Termux's home, the exact python3 loopback sender script (ephemeral port, single-use nonce, READY handshake, size header, 64KiB chunked stream), the socket machinery driven over a real 127.0.0.1 ServerSocket pair (nonce-accept, wrong-nonce refusal then keep-listening, exact-size success, and a sender that closes early failing WITHOUT leaving a destination or stray temp file), and the shared-storage-vs-loopback selection (only /sdcard when the ~/storage link exists AND the destination is reachable from Termux AND the file is below the 100MB FUSE threshold). The live transfer — a real cp through /sdcard or a loopback python3 send on a device with Termux — must be verified by hand
resume_audio_recording MANUAL_ONLY Needs real device hardware; the emulator has no faithful stand-in for this sensor/radio.
run_command UNIT TerminalToolTest — argument splitting, timeout, exit codes, output truncation
run_root_command MANUAL_ONLY Requires a rooted device and an interactive superuser grant.
run_termux_command ROBOLECTRIC TermuxToolTest, ActionLogRedactionTest — installed/granted decision table, deny-list, size guard, result-bundle parsing, truncation, timeout path; the live round-trip needs a real Termux install and is verified by hand
schedule_agent_task ROBOLECTRIC ScheduledTaskToolTest, ScheduleTaskLoopTest, ScheduledRunTest, ScheduledTaskPlannerTest, ScheduledTaskScheduleTest — argument checks before any prompt, the cap on agent-made tasks, approval on every create (denial saves nothing), the mode capped at the chat's, files read on approval, withheld from Monitor, sub-agents and scheduled runs; the schedule math and the runs it starts
send_email UNIT EmailToolsTest, MimeMessageBuilderTest — confirmation flow, recipient handling, MIME construction with attachments
send_sms MANUAL_ONLY Needs real device hardware; the emulator has no faithful stand-in for this sensor/radio.
set_alarm MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
set_brightness ROBOLECTRIC SystemToolTest — range validation, value scaling, WRITE_SETTINGS gate
set_clipboard ROBOLECTRIC ClipboardToolTest — write-through to the platform clipboard and the accessibility cache
set_dnd MANUAL_ONLY Needs NotificationPolicyManager access and a real notification shade to verify the DND icon; Robolectric's shadow does not faithfully reproduce the policy enforcement side-effects.
set_password_policy MANUAL_ONLY Needs an active Device Admin registration, which cannot be granted non-interactively.
set_ringer_mode ROBOLECTRIC DeviceToolTest — normal/vibrate/silent plus the Do-Not-Disturb access gate
set_screen_timeout ROBOLECTRIC SystemToolTest — range validation, seconds to milliseconds, previous value reported, WRITE_SETTINGS gate
set_timer MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
set_volume ROBOLECTRIC DeviceToolTest — percentage-to-stream scaling, aliases, range and stream validation
set_wallpaper MANUAL_ONLY Needs an Android Context and WallpaperManager; the platform wallpaper API has no usable emulator fake for the set-call callback.
show_overlay MANUAL_ONLY Draws a real SYSTEM_ALERT_WINDOW; needs the 'Display over other apps' grant and a visible screen to verify.
snooze_alarm MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
start_audio_recording MANUAL_ONLY Needs real device hardware; the emulator has no faithful stand-in for this sensor/radio.
stop_audio_recording MANUAL_ONLY Needs real device hardware; the emulator has no faithful stand-in for this sensor/radio.
synthesize_podcast ROBOLECTRIC PodcastToolTest, PodcastAudioTest — the pure halves on the JVM — sentence-boundary script chunking (limit respected, nothing lost or reordered, oversize sentences split at word boundaries, hard cut only as a last resort) and WAV header parsing by chunk walk (real sample rate honoured rather than assumed, lying data-chunk sizes measured from what actually arrived, JSON/HTML/MP3 responses rejected) — plus every guard that runs before TTS money is spent: Android/unconfigured provider refusals with directions to Settings, blank model, scripts that sanitize to nothing or exceed the ceiling, unsupported formats, existing-output refusal, output_name slugification, and voice resolution (explicit argument beats configured voice beats the model's own default). The assembly itself is device-only — Media3 Transformer drives MediaCodec — and additionally needs a reachable TTS endpoint, so a full script-to-.m4a (and, with Termux, .mp3) run — audible joins, Files-app visibility, the .m4a fallback note — must be verified by hand
synthesize_podcast_dialogue ROBOLECTRIC PodcastToolTest, PodcastAudioTest — shares synthesize_podcast's pipeline and its coverage, plus the dialogue-specific guards and mechanics: unknown-speaker refusal, empty-dialogue refusal, blank turns dropped after sanitising rather than synthesized as dead air, and the three-level host-voice resolution (explicit argument beats configured setting beats the first voice in the model's list that differs from host A). Pacing is covered on both halves: pause resolution (a line's pause_ms beats gap_ms beats the 300ms default, zero honoured as zero rather than treated as unset, absurd or negative values clamped) and the silence append itself (duration grows by exactly the requested pause, the pause inherits the speech's own sample rate and channel count, the spoken bytes survive untouched, the appended region is genuinely silent, and a padded WAV re-parses so it can be padded again). The audible result — two distinguishable hosts and whether the chosen pauses actually sound like conversation — is device-only and must be verified by hand
take_photo MANUAL_ONLY Needs a real camera; CameraX has no usable emulator fake for the capture callback.
toggle_torch MANUAL_ONLY Needs real device hardware; the emulator has no faithful stand-in for this sensor/radio.
toggle_wifi MANUAL_ONLY SystemToolTest — The permissive branch is covered by SystemToolTest, but Android 10+ makes setWifiEnabled a no-op and Robolectric's shadow honours it unconditionally, so the panel-fallback branch that actually runs on-device cannot be reproduced at that tier.
transcribe_file ROBOLECTRIC TranscribeToolTest — every guard that runs before the upload — Android/unconfigured STT provider refusals with directions to Settings, missing/empty/oversized files, unsupported extensions refused before the backend is touched — plus the properties that make the tool safe to point at a user's only copy of a recording: the input file demonstrably survives transcription byte-for-byte (the deliberate contrast with SttEngine.transcribeApi, which deletes its input), model resolution (explicit argument beats configured setting beats the first STT model the API advertises), empty transcripts reported as errors rather than silence, and over-long transcripts truncated with an honest note. The upload itself needs a reachable STT endpoint, so a real memo round trip is device-only manual verification
uninstall_app MANUAL_ONLY AgentLoopTest — AgentLoopTest covers the CONFIRM_UNINSTALL marker and both sides of the confirmation gate, but the actual package removal is a system dialog that cannot be automated.
vibrate MANUAL_ONLY Needs real device hardware; the emulator has no faithful stand-in for this sensor/radio.
write_file ROBOLECTRIC FileToolsTest, FileResolverTest, AgentLoopTest — create, append, overwrite, parent-dir creation; also driven end-to-end through the agent loop
write_secure_settings MANUAL_ONLY Requires WRITE_SECURE_SETTINGS, granted only via adb — and it mutates global device state.

Info tools (read-only)

Tool Tier Tests / reason
about_gotcha ROBOLECTRIC AppInfoToolTest — the bundled handbook ships and still documents every SettingsPage and every gated Capability, checked against the enums so a rename fails the build
about_samosa_ai ROBOLECTRIC CompanyInfoToolTest — the bundled asset ships and still contains the company, product and contact facts the tool promises
ask_final_answer MANUAL_ONLY Only reachable from inside a sub-agent loop with a live LLM connection.
check_availability UNIT CalendarWindowTest — free/busy window arithmetic
check_root MANUAL_ONLY Probes for a real su binary; the result is meaningless on a non-rooted test device.
find_contact MANUAL_ONLY Needs a populated Contacts ContentProvider; Robolectric's provider fakes do not support the full ContactsContract query surface used by this tool.
finish_task ROBOLECTRIC FinishTaskToolTest — covers the FINISH_TASK: marker and which agents may emit it; that AgentEngine ends the run and speaks the summary needs a live LLM and is manual
get_app_usage MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
get_audio_recording_status MANUAL_ONLY Needs real device hardware; the emulator has no faithful stand-in for this sensor/radio.
get_battery_info ROBOLECTRIC SystemToolTest — reports a percentage without throwing
get_clipboard ROBOLECTRIC ClipboardToolTest — read plus the API 34 accessibility-cache fallback, across API 30/33/34
get_data_usage MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
get_health_records UNIT HealthFormatTest, HealthPermissionScopeTest — record-type formatting and per-type permission scoping
get_health_summary UNIT HealthFormatTest, HealthPermissionScopeTest — summary formatting and the permission scope requested
get_location MANUAL_ONLY Needs real device hardware; the emulator has no faithful stand-in for this sensor/radio.
get_now_playing UNIT MediaSelectionTest — active-session selection across paused/playing/stopped sessions
get_storage_info ROBOLECTRIC StorageToolTest — size formatting across every unit and the partition read
get_volume ROBOLECTRIC DeviceToolTest — single and all-stream reporting
glob ROBOLECTRIC FileToolsTest — * vs **, brace alternation, empty result sets
grep ROBOLECTRIC FileToolsTest — regex and literal search, case-insensitivity, include filter, invalid patterns
list_alarms MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
list_calendar_events UNIT CalendarToolsTest, CalendarWindowTest — connector path (Google/Microsoft) only; the on-device CalendarProvider path is manual
list_emails UNIT EmailToolsTest — backend routing, unread filter, result limits
list_files ROBOLECTRIC FileToolsTest — flat and recursive listings
list_installed_apps ROBOLECTRIC AppsToolTest — listing, system-app marking, counts, search filtering
list_scheduled_tasks ROBOLECTRIC ScheduledTaskToolTest, ScheduleTaskLoopTest — each task with its id, schedule and prompt; the one schedule tool Monitor is offered
list_tasks MANUAL_ONLY Routed to a live Microsoft Graph account; only the underlying GraphApi has JVM coverage today.
list_timers MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
notion_delete_item UNIT NotionToolsMutationTest — page trash patch vs block delete request shapes
notion_mark_todo UNIT NotionToolsMutationTest — checked-state patch request shape and id-prefix stripping
notion_read_page UNIT NotionToolsTest, NotionBlockRendererTest — page and database reads, pagination, nested blocks, inline child_database, block-to-markdown rendering
notion_search UNIT NotionToolsTest — query routing and result formatting, including database titles and title-column definitions with an object title
notion_update_page UNIT NotionToolsMutationTest — property-value payloads built from simple values (checkbox/select/status/title/number/multi_select), non-numeric and unsupported-type rejection, unknown-column rejection, id-prefix stripping
question MANUAL_ONLY Pure UI round-trip: the tool blocks until the user answers a prompt rendered in the chat surface.
read_call_log MANUAL_ONLY Needs a populated CallLog ContentProvider; the emulator has no real call history and Robolectric's provider fakes are not wired for this table.
read_email UNIT EmailToolsTest, MailBodyExtractorTest — id routing plus multipart/HTML body extraction
read_file ROBOLECTRIC FileToolsTest, FileResolverTest — offset/limit, missing paths, and the All-files-access gate
read_notifications MANUAL_ONLY Needs NotificationListenerService bound with the user's explicit grant; not bindable from a test host.
read_recent_sms MANUAL_ONLY Needs a populated SMS ContentProvider; the emulator has no real SMS history and Robolectric's provider fakes are not wired for the Telephony.Sms table.
search_skills MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
sleep MANUAL_ONLY Needs an Android Context and a system service with real device state; no JVM-tier coverage yet — scheduled for the Robolectric tier.
todowrite MANUAL_ONLY Pure UI round-trip: writes the visible todo list in the chat surface.
update_gotcha_settings ROBOLECTRIC GotchaSettingsUpdateTest, SettingsUpdateLoopTest — the allowlist (credentials refused), per-key validation, all-or-nothing rejection, and the loop: a prompt on every change, denial leaves settings untouched, approval saves through SettingsRepository, both audited
update_user_profile UNIT UpdateUserProfileTest — merge semantics (modify-and-extend, never erase), the no-op guard, and the 250/50-word caps
webfetch UNIT WebFetchToolTest — HTML-to-text extraction, truncation, error handling
websearch MANUAL_ONLY Performs real network I/O against a search provider; exercising it in CI would make the suite non-hermetic.

Device and Android-version coverage

The tiers above say whether a feature is tested. This says where.

Axis Coverage
Android versions (JVM) ROBOLECTRIC tests run under @Config(sdk = [...]), typically API 30/33/34, so version-branching logic is covered in seconds without an emulator.
Android versions (emulator) Nightly instrumented-full matrix: API 30 (minSdk), 33, 34, 35, 36. Per-PR smoke runs API 34 only.
OEM behaviour Not covered. No emulator reproduces Samsung/Xiaomi battery managers killing overlay services and background agents — this app's largest real-world risk. Firebase Test Lab on physical devices is the only path; parked pending a GCP project.

Instrumented suite

app/src/androidTest covers app-level flows rather than individual tools: launch routing (SmokeLaunchTest), a chat round-trip against a mock LLM (ChatRoundTripTest), settings persistence (SettingsFlowTest) and the assistive ball overlay (AssistiveBallTest).

AccessibilityServiceTest is @Ignored. Binding GotchaAccessibilityService reliably fails while the app is under self-instrumentation, even with the process warm and after waiting 45s; the identical sequence binds in 0-5s via plain adb shell outside instrumentation. That is a platform rough edge in AccessibilityManagerService, not a bug in the service — which is why every accessibility-dependent tool above is MANUAL_ONLY. A clean run reports 5 passed / 1 skipped.

Manual QA checklist

Run through this before a release. Each item is a tool with no automated coverage, so this list is the pre-release manual test script.