Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Testing Guide

Comprehensive test coverage for OpenCrabs. All tests run with:

cargo test --all-features

Quick Reference

CategoryTestsLocation
Tests — Streaming Active Secs2src/tests/streaming_active_secs_test.rs
Tests — Tool Execution Stats2src/tests/tool_execution_stats_test.rs
Tests — Mission Control Report2src/tests/mission_control_report_test.rs
Tests — Custom Provider No Models2src/tests/custom_provider_no_models_test.rs
Tests — Provider Context Window Override2src/tests/provider_context_window_override_test.rs
Tests — Slack Handler2src/tests/slack_handler_test.rs
Tests — Custom Provider Section Resolver2src/tests/custom_provider_section_resolver_test.rs
Tests — Mission Control Command2src/tests/mission_control_command_test.rs
Tests — Rsi Self Improve Dedup2src/tests/rsi_self_improve_dedup_test.rs
Tests — Clipboard Image Paste2src/tests/clipboard_image_paste_test.rs
Tests — Cowork Connect2src/tests/cowork_connect_test.rs
Tests — Discord Handler2src/tests/discord_handler_test.rs
Tests — Cron Tool Registry2src/tests/cron_tool_registry_test.rs
Tests — User Correction Metadata3src/tests/user_correction_metadata_test.rs
Tests — Pdf Vision3src/tests/pdf_vision_test.rs
Tests — Xiaomi Config Default3src/tests/xiaomi_config_default_test.rs
Tests — Telegram Model Callback Data3src/tests/telegram_model_callback_data_test.rs
Tests — Telegram Caption3src/tests/telegram_caption_test.rs
Tests — New Session Pane Binding3src/tests/new_session_pane_binding_test.rs
Tests — Mimo Tool Call Hint3src/tests/mimo_tool_call_hint_test.rs
Tests — Brain Project Overlay3src/tests/brain_project_overlay_test.rs
Tests — Systemd Unit3src/tests/systemd_unit_test.rs
Tests — Profile Pid Lock3src/tests/profile_pid_lock_test.rs
Tests — Phantom Going To3src/tests/phantom_going_to_test.rs
Tests — Auto Title E2E3src/tests/auto_title_e2e_test.rs
Tests — Glob Tool3src/tests/glob_tool_test.rs
Tests — Project File Archive3src/tests/project_file_archive_test.rs
Tests — Brain Live Rebuild3src/tests/brain_live_rebuild_test.rs
Tests — Build User Message Image3src/tests/build_user_message_image_test.rs
Tests — Read Media Redirect3src/tests/read_media_redirect_test.rs
Tests — Provider Picker Setup Hint4src/tests/provider_picker_setup_hint_test.rs
Tests — Project File Slug4src/tests/project_file_slug_test.rs
Tests — Browser Cdp Endpoint4src/tests/browser_cdp_endpoint_test.rs
Tests — Tui Drop Path4src/tests/tui_drop_path_test.rs
Tests — Telegram Join Detection4src/tests/telegram_join_detection_test.rs
Tests — Pdf To Images4src/tests/pdf_to_images_test.rs
Tests — Plan Reminder4src/tests/plan_reminder_test.rs
Tests — Xiaomi Keyed Provider Regression4src/tests/xiaomi_keyed_provider_regression_test.rs
Tests — Rsi Fallback Wrap4src/tests/rsi_fallback_wrap_test.rs
Tests — Rtk Autodownload4src/tests/rtk_autodownload_test.rs
Tests — Profile Preempt4src/tests/profile_preempt_test.rs
Tests — Lazy Tools4src/tests/lazy_tools_test.rs
Tests — Logging Log Files4src/tests/logging_log_files_test.rs
Tests — Telegram Send Input File5src/tests/telegram_send_input_file_test.rs
Tests — Prompt Inline Edit Directive5src/tests/prompt_inline_edit_directive_test.rs
Tests — Doc Parser Page Range5src/tests/doc_parser_page_range_test.rs
Tests — Mission Control Dedup Detail5src/tests/mission_control_dedup_detail_test.rs
Tests — Follow Up Intermediate Flush5src/tests/follow_up_intermediate_flush_test.rs
Tests — Project Skills5src/tests/project_skills_test.rs
Tests — Command Rich Table5src/tests/command_rich_table_test.rs
Tests — Custom Provider Live Fetch Regression5src/tests/custom_provider_live_fetch_regression_test.rs
Tests — Rtk Tracker5src/tests/rtk_tracker_test.rs
Tests — Pdf Smart Routing5src/tests/pdf_smart_routing_test.rs
Tests — Xiaomi Onboarding5src/tests/xiaomi_onboarding_test.rs
Tests — Self Update Path6src/tests/self_update_path_test.rs
Tests — Telegram Send Thread Id Override6src/tests/telegram_send_thread_id_override_test.rs
Tests — Active Skill Tracking6src/tests/active_skill_tracking_test.rs
Tests — Config Dotted Caps6src/tests/config_dotted_caps_test.rs
Tests — Tts Fallback Chain6src/tests/tts_fallback_chain_test.rs
Tests — Rtk Sysadmin Supported6src/tests/rtk_sysadmin_supported_test.rs
Tests — Stt Fallback Chain6src/tests/stt_fallback_chain_test.rs
Tests — Telegram Topic Listing6src/tests/telegram_topic_listing_test.rs
Tests — Bash Blocklist6src/tests/bash_blocklist_test.rs
Tests — Whatsapp Handler6src/tests/whatsapp_handler_test.rs
Tests — Cron Profile Isolation6src/tests/cron_profile_isolation_test.rs
Tests — Evolve Diagnose7src/tests/evolve_diagnose_test.rs
Tests — Channel Session Resolve7src/tests/channel_session_resolve_test.rs
Tests — Phantom Cleanup Intent7src/tests/phantom_cleanup_intent_test.rs
Tests — Qwen Tool Marker Strip7src/tests/qwen_tool_marker_strip_test.rs
Tests — Telegram Impersonation7src/tests/telegram_impersonation_test.rs
Tests — Subagent Tool Description7src/tests/subagent_tool_description_test.rs
Tests — Fallback Streak7src/tests/fallback_streak_test.rs
Tests — Phantom Work Announcement7src/tests/phantom_work_announcement_test.rs
Tests — Word Delete Keybinding7src/tests/word_delete_keybinding_test.rs
Tests — Telegram Thread Id Lookup8src/tests/telegram_thread_id_lookup_test.rs
Tests — Telegram Reply Context Recovery8src/tests/telegram_reply_context_recovery_test.rs
Tests — Onboarding User Scroll8src/tests/onboarding_user_scroll_test.rs
Tests — Prompt Known Paths8src/tests/prompt_known_paths_test.rs
Tests — Cli Supported Models8src/tests/cli_supported_models_test.rs
Tests — Custom Provider Rename Keys Toml8src/tests/custom_provider_rename_keys_toml_test.rs
Tests — Phantom Pronoun Drop8src/tests/phantom_pronoun_drop_test.rs
Tests — Provider Registry8src/tests/provider_registry_test.rs
Tests — Telegram Photo Batching8src/tests/telegram_photo_batching_test.rs
Tests — Mission Control Skill Inbox8src/tests/mission_control_skill_inbox_test.rs
Tests — Plan Tool Description8src/tests/plan_tool_description_test.rs
Tests — Onboarding No Silent Commit8src/tests/onboarding_no_silent_commit_test.rs
Tests — Telegram Handler9src/tests/telegram_handler_test.rs
Tests — Orphan Close Tag Strip9src/tests/orphan_close_tag_strip_test.rs
Tests — Onboarding Custom Model Input9src/tests/onboarding_custom_model_input_test.rs
Tests — Telegram Rich9src/tests/telegram_rich_test.rs
Tests — Rsi Sync Cap Bail9src/tests/rsi_sync_cap_bail_test.rs
Tests — Integration9src/tests/integration_test.rs
Tests — Format User Error9src/tests/format_user_error_test.rs
Tests — Telegram Plan Render9src/tests/telegram_plan_render_test.rs
Tests — Plan Mode Integration9src/tests/plan_mode_integration_test.rs
Tests — Error Scenarios9src/tests/error_scenarios_test.rs
Tests — Web Browser Routing9src/tests/web_browser_routing_test.rs
Tests — Rsi Skill Proposals9src/tests/rsi_skill_proposals_test.rs
Tests — Baseline Merge10src/tests/baseline_merge_test.rs
Tests — Sanitize Code Edit Block10src/tests/sanitize_code_edit_block_test.rs
Tests — Markdown Render10src/tests/markdown_render_test.rs
Tests — Tool Arg Unescape10src/tests/tool_arg_unescape_test.rs
Tests — Custom Provider Cache Autoenable10src/tests/custom_provider_cache_autoenable_test.rs
Tests — Streaming10src/tests/streaming_test.rs
Tests — Incident Log Dedup10src/tests/incident_log_dedup_test.rs
Tests — Phantom Deferment11src/tests/phantom_deferment_test.rs
Tests — Analysis Intent Nudge11src/tests/analysis_intent_nudge_test.rs
Tests — Phantom Post Success Exemption11src/tests/phantom_post_success_exemption_test.rs
Tests — Goal Command11src/tests/goal_command_test.rs
Tests — Whatsapp Photo Batching11src/tests/whatsapp_photo_batching_test.rs
Tests — Prompt Compiled Features11src/tests/prompt_compiled_features_test.rs
Tests — Telegram Pre Tool Rolling11src/tests/telegram_pre_tool_rolling_test.rs
Tests — Service Scope11src/tests/service_scope_test.rs
Tests — Telegram Quote Reply11src/tests/telegram_quote_reply_test.rs
Tests — Dynamic Tool Parse Error12src/tests/dynamic_tool_parse_error_test.rs
Tests — Onboard Channel12src/tests/onboard_channel_test.rs
Tests — Streaming Tps Accumulator12src/tests/streaming_tps_accumulator_test.rs
Tests — Compaction Prompts12src/tests/compaction_prompts_test.rs
Tests — Cron Schedule Util12src/tests/cron_schedule_util_test.rs
Tests — Orphan Think Close Tag13src/tests/orphan_think_close_tag_test.rs
Tests — Usage Cosmetic Alias13src/tests/usage_cosmetic_alias_test.rs
Tests — Voice Service14src/tests/voice_service_test.rs
Tests — Evolve Systemd Restart14src/tests/evolve_systemd_restart_test.rs
Tests — Background Session14src/tests/background_session_test.rs
Tests — Bash Feedback Enrichment14src/tests/bash_feedback_enrichment_test.rs
Tests — Voice Voicebox15src/tests/voice_voicebox_test.rs
Tests — Brain Filter Strip Empty Sections15src/tests/brain_filter_strip_empty_sections_test.rs
Tests — Voice Local Tts15src/tests/voice_local_tts_test.rs
Tests — Template Governance15src/tests/template_governance_test.rs
Tests — Telegram Status Message15src/tests/telegram_status_message_test.rs
Tests — Rtk Rewrite15src/tests/rtk_rewrite_test.rs
Tests — Channel Commands16src/tests/channel_commands_test.rs
Tests — Telegram Session Resolve18src/tests/telegram_session_resolve_test.rs
Tests — Qwen Detect18src/tests/qwen_detect_test.rs
Tests — Bundled Plans20src/tests/bundled_plans_test.rs
Tests — Text Complete21src/tests/text_complete_test.rs
Tests — Plan Window21src/tests/plan_window_test.rs
Tests — Rsi Pruned23src/tests/rsi_pruned_test.rs
Tests — Rsi Subsystem23src/tests/rsi_subsystem_test.rs
Tests — Pdf Page Range Parser25src/tests/pdf_page_range_parser_test.rs
Tests — Project25src/tests/project_test.rs
Tests — Voice Local Whisper25src/tests/voice_local_whisper_test.rs
Tests — Rsi Brain Dedup27src/tests/rsi_brain_dedup_test.rs
Tests — Telegram Rich Parse28src/tests/telegram_rich_parse_test.rs
Tests — Plan Tool31src/tests/plan_tool_test.rs
Tests — Profiles Dialog49src/tests/profiles_dialog_test.rs
Brain — Agent Service26src/brain/agent/service/
Brain — Prompt Builder20src/brain/prompt_builder.rs
Brain — Agent Context12src/brain/agent/context.rs
Brain — Provider (Anthropic)9src/brain/provider/anthropic.rs
Provider Retry (consolidated)19src/utils/retry.rs (8 inline) + src/tests/provider_retry_consolidation_test.rs (11) — brain/provider/retry.rs was deleted and folded onto utils::retry; covers patient backoff schedule, hard-down fast-fail, Retry-After clamp, and retry-notify surfacing
Brain — Provider (Custom OpenAI)9src/brain/provider/custom_openai_compatible.rs
Brain — Provider (Copilot)8src/brain/provider/copilot.rs
Brain — Provider (Factory)4src/brain/provider/factory.rs
Brain — Provider (Claude CLI)4src/brain/provider/claude_cli.rs
Brain — Provider (Types/Error/Trait)7src/brain/provider/
Brain — Provider (Qwen)13src/brain/provider/qwen.rs
Brain — Provider (JSON Repair)10src/brain/provider/json_repair.rs
Brain — Provider (Codex OAuth)6src/brain/provider/codex_oauth.rs
Brain — Tokenizer8src/brain/tokenizer.rs
Brain — Commands6src/brain/commands.rs
Brain — Self-Update1src/brain/self_update.rs
Brain Tools — Bash21src/brain/tools/bash.rs
Brain Tools — Plan Security20src/brain/tools/plan_tool.rs
Brain Tools — Exa Search18src/brain/tools/exa_search.rs
Brain Tools — Write File17src/brain/tools/write_opencrabs_file.rs
Brain Tools — A2A Send16src/brain/tools/a2a_send.rs
Brain Tools — Load Brain File15src/brain/tools/load_brain_file.rs
Brain Tools — Brave Search12src/brain/tools/brave_search.rs
Brain Tools — Browser Manager12src/brain/tools/browser/manager.rs
Brain Tools — Tool Manage11src/brain/tools/tool_manage.rs
Brain Tools — Dynamic Tools17src/brain/tools/dynamic/
Brain Tools — Doc Parser10src/brain/tools/doc_parser.rs
Brain Tools — Registry7src/brain/tools/registry.rs
Brain Tools — Slash Command6src/brain/tools/slash_command.rs
Brain Tools — Write/Read/Config/Memory/Error20src/brain/tools/
Brain Tools — Subagent9src/brain/tools/subagent.rs
Brain Tools — Error6src/brain/tools/error.rs
Brain Tools — Config Tool5src/brain/tools/config_tool.rs
Brain Tools — Write5src/brain/tools/write.rs
Brain Tools — Read4src/brain/tools/read.rs
Brain Tools — Memory Search2src/brain/tools/memory_search.rs
Brain Tools — Trait3src/brain/tools/trait.rs
Channels — Voice Local Whisper25src/channels/voice/local_whisper.rs
Channels — Voice Service14src/channels/voice/service.rs
Channels — Voice Local TTS14src/channels/voice/local_tts.rs
Channels — Commands15src/channels/commands.rs
Channels — WhatsApp Store15src/channels/whatsapp/store.rs
Channels — Telegram Handler8src/channels/telegram/handler.rs
Channels — WhatsApp Handler5src/channels/whatsapp/handler.rs
Channels — General5src/channels/
Channels — Slack Handler2src/channels/slack/handler.rs
Channels — Discord Handler2src/channels/discord/handler.rs
Config — Types19src/config/types.rs
Config — Secrets5src/config/secrets.rs
Config — Update4src/config/update.rs
Config — Crabrace3src/config/crabrace.rs
DB — Repository (Plan)15src/db/repository/plan.rs
DB — Retry8src/db/retry.rs
DB — Repository (Other)9src/db/repository/
DB — Database5src/db/database.rs
DB — Models4src/db/models.rs
Services — Plan11src/services/plan.rs
Services — File11src/services/file.rs
Services — Message10src/services/message.rs
Services — Session10src/services/session.rs
Services — Context2src/services/context.rs
TUI — Onboarding67src/tui/onboarding/
TUI — Plan25src/tui/plan.rs
TUI — Render Utils12src/tui/render/utils.rs
TUI — Prompt Analyzer8src/tui/prompt_analyzer.rs
TUI — Highlight8src/tui/highlight.rs
TUI — Markdown7src/tui/markdown.rs
TUI — Error5src/tui/error.rs
TUI — Events4src/tui/events.rs
TUI — Components2src/tui/components/
TUI — App State1src/tui/app/state.rs
A2A — Debate8src/a2a/debate.rs
A2A — Types6src/a2a/types.rs
A2A — Server/Handler/Agent Card7src/a2a/
Memory — Store6src/memory/store.rs
Memory — Search3src/memory/search.rs
Pricing17src/pricing.rs
Utils — Sanitize41src/utils/sanitize.rs + src/tests/sanitize_redaction_test.rs
Utils — Retry8src/utils/retry.rs
Utils — String6src/utils/string.rs
Utils — Install6src/utils/install.rs
Utils — Config Watcher2src/utils/config_watcher.rs
Logging4src/logging/logger.rs
Tests — RSI Template Sync15src/tests/rsi_sync_test.rs
Tests — Model Fetching11src/tests/model_fetch_test.rs
Tests — Provider Factory Regression31src/tests/provider_factory_regression_test.rs
Tests — Onboarding Welcome9src/tests/onboarding_welcome_test.rs
Tests — Voice STT Dispatch21src/tests/voice_stt_dispatch_test.rs
Tests — Voice Onboarding65src/tests/voice_onboarding_test.rs
Tests — Voice OpenAI Compatible12src/tests/voice_openai_compatible_test.rs
Tests — Cron Jobs & Scheduling58src/tests/cron_test.rs
Tests — Onboarding Field Nav49src/tests/onboarding_field_nav_test.rs
Tests — GitHub Copilot Provider38src/tests/github_provider_test.rs
Tests — File Extract37src/tests/file_extract_test.rs
Tests — Fallback Vision40src/tests/fallback_vision_test.rs
Tests — CLI Parsing28src/tests/cli_test.rs
Tests — Custom Provider27src/tests/custom_provider_test.rs
Tests — Onboarding Navigation26src/tests/onboarding_navigation_test.rs
Tests — Message Compaction28src/tests/compaction_test.rs
Tests — Channel Search27src/tests/channel_search_test.rs
Tests — Evolve (Self-Update)23src/tests/evolve_test.rs
Tests — Slack Formatting21src/tests/slack_fmt_test.rs
Tests — Split Pane21src/tests/split_pane_test.rs
Tests — OpenCode CLI Provider21src/tests/opencode_provider_test.rs
Tests — Onboarding Brain23src/tests/onboarding_brain_test.rs
Tests — Onboarding Types17src/tests/onboarding_types_test.rs
Tests — OpenAI Provider16src/tests/openai_provider_test.rs
Tests — TUI Error16src/tests/tui_error_test.rs
Tests — Queued Messages15src/tests/queued_message_test.rs
Tests — Plan Document15src/tests/plan_document_test.rs
Tests — Session & Working Dir15src/tests/session_working_dir_test.rs
Tests — Stream Loop Detection19src/tests/stream_loop_test.rs
Tests — Context Window14src/tests/context_window_test.rs
Tests — HTML Comment Strip14src/tests/html_comment_strip_test.rs
Tests — Daemon Health & Config10src/tests/daemon_health_test.rs
Tests — Collapse Build Output9src/tests/collapse_build_output_test.rs
Tests — Image Utils9src/tests/image_util_test.rs
Tests — Brain Templates7src/tests/brain_templates_test.rs
Tests — AltGr Input8src/tests/altgr_input_test.rs
Tests — QR Render10src/tests/qr_render_test.rs
Tests — Provider Sync8src/tests/provider_sync_test.rs
Tests — WhatsApp State7src/tests/whatsapp_state_test.rs
Tests — Reasoning Lines7src/tests/reasoning_lines_test.rs
Tests — System Continuation6src/tests/system_continuation_test.rs
Tests — Candle Whisper6src/tests/candle_whisper_test.rs
Tests — Post-Evolve5src/tests/post_evolve_test.rs
Tests — Onboarding Keys4src/tests/onboarding_keys_test.rs
Tests — TUI Render Clear4src/tests/tui_render_clear_test.rs
Tests — TUI Tool Stack6src/tests/tui_tool_stack_test.rs
Tests — Gemini Fetch3src/tests/gemini_fetch_test.rs
Tests — Profiles61src/tests/profile_test.rs
Tests — Subagent / Swarm84src/tests/subagent_test.rs
Tests — Telegram Resume & Helpers57src/tests/telegram_resume_test.rs
Tests — Token Tracking29src/tests/token_tracking_test.rs
Tests — wait_agent Resolver12src/tests/wait_agent_resolver_test.rs
Tests — Browser Default (macOS LSHandlers parser)12src/tests/browser_default_test.rs
Tests — Browser Default (Linux xdg-settings parser)4src/tests/browser_default_linux_test.rs (Linux-only)
Tests — Browser Default (Windows reg-query parser)6src/tests/browser_default_windows_test.rs (Windows-only)
Tests — Browser Profile Lock Sweeper5src/tests/browser_locks_test.rs
Tests — Browser CDP Handler Health4src/tests/browser_health_test.rs
Tests — Browser Stealth JS Regression Guards6src/tests/browser_stealth_test.rs
Tests — Browser Manager Drop2src/tests/browser_drop_test.rs
Tests — Browser Session-Scoped Tabs4src/tests/browser_session_test.rs
Tests — Browser Profile Unlock Backoff4src/tests/browser_profile_wait_test.rs
Tests — Browser Eval Output Cap5src/tests/browser_eval_cap_test.rs
Tests — Browser Screenshot-Failure Surface2src/tests/browser_screenshot_surface_test.rs
Tests — Browser Find JS Builder9src/tests/browser_find_test.rs
Tests — exa_search MCP Handshake4src/tests/exa_search_test.rs
Tests — http_request User-Agent3src/tests/http_request_test.rs
Tests — Self-Healing (Phantom Detection + stuck-intent loop)88src/tests/self_healing_test.rs
Tests — Bash SSH Detection10src/tests/bash_ssh_detection_test.rs
Tests — Bash POSIX Quote (askpass)9src/tests/bash_posix_quote_test.rs
Tests — RSI Proposals Inbox16src/tests/rsi_proposals_test.rs
Tests — Skills Loader15src/tests/skills_test.rs
Tests — Skill Slash Dispatch7src/tests/skill_slash_dispatch_test.rs
Tests — Slash Autocomplete Dimensions18src/tests/slash_autocomplete_dimensions_test.rs
Tests — Mission Control Layout7src/tests/mission_control_layout_test.rs
Tests — Mission Control Inbox Service6src/tests/mission_control_inbox_service_test.rs
Tests — Mission Control Activity Service8src/tests/mission_control_activity_service_test.rs
Tests — Mission Control Schedule Service5src/tests/mission_control_schedule_service_test.rs
Tests — Mission Control Input23src/tests/mission_control_input_test.rs
Tests — Skills Dialog18src/tests/skills_dialog_test.rs
Tests — merge_provider_keys (OpenCode persistence regression)4src/tests/merge_provider_keys_test.rs
Tests — Onboarding Wizard67src/tests/onboarding_wizard_test.rs
Tests — RSI (Recursive Self-Improvement)83src/tests/rsi_test.rs
Tests — Dynamic Tool Coercion13src/tests/dynamic_tool_coerce_test.rs
Tests — Follow-Up Question Tool9src/tests/follow_up_question_test.rs
Tests — Gemini Schema Sanitization10src/tests/gemini_schema_sanitize_test.rs
Tests — Rename Session Tool7src/tests/rename_session_test.rs
Tests — Custom Model Paste5src/tests/custom_model_paste_test.rs
Tests — Brain File Generic Guard4src/tests/brain_file_generic_guard_test.rs
Tests — Phantom DB Persistence2src/tests/phantom_db_persistence_test.rs
Tests — Bash Interactive Reject37src/tests/bash_interactive_reject_test.rs
Tests — Qwen Tool-Call Extractor64src/tests/qwen_tool_extractor_test.rs
Tests — Brain File Safety (append-only enforcement, cleanup_intent)37src/tests/brain_file_safety_test.rs
Tests — Provider Config Regression28src/tests/provider_config_regression_test.rs
Tests — Tool-Loop Helpers (Linor P0 hotspot)30src/tests/tool_loop_helpers_test.rs
Tests — Recent Paths17src/tests/recent_paths_test.rs
Tests — Provider Error Proxy21src/tests/provider_error_proxy_test.rs
Tests — Mouse Fragment Filter13src/tests/mouse_fragment_filter_test.rs
Tests — Agent Basic12src/tests/agent_basic_test.rs
Tests — RSI Git History12src/tests/rsi_git_history_test.rs
Tests — Bash Retry Loop10src/tests/bash_retry_loop_test.rs
Tests — Agent Tool Normalization10src/tests/agent_tool_normalization_test.rs
Tests — Kimi Reasoning Markers9src/tests/kimi_reasoning_test.rs
Tests — Usage Activity Columns9src/tests/usage_activity_columns_test.rs
Tests — Agent Context Tracking8src/tests/agent_context_tracking_test.rs
Tests — Collapse $HOME to ~8src/tests/collapse_home_test.rs
Tests — Rate Limiter8src/tests/rate_limiter_test.rs
Tests — Session Chat-ID Lookup8src/tests/session_chat_id_lookup_test.rs
Tests — Agent Approval Policies7src/tests/agent_approval_policies_test.rs
Tests — Agent Model Selection6src/tests/agent_model_selection_test.rs
Tests — Browser Close Tool6src/tests/browser_close_test.rs
Tests — Local-Provider Gate6src/tests/local_provider_gate_test.rs
Tests — Agent Parallel Sessions5src/tests/agent_parallel_sessions_test.rs
Tests — Agent Streaming Usage5src/tests/agent_streaming_usage_test.rs
Tests — Claude CLI Model Selection7src/tests/claude_cli_model_test.rs
Tests — Codex CLI Provider5src/tests/codex_cli_test.rs
Tests — Non-stream Compatibility5src/tests/nonstream_compat_test.rs
Tests — Runtime Info $HOME Anchor6src/tests/runtime_info_home_anchor_test.rs
Tests — Handshake Timeout4src/tests/handshake_timeout_test.rs
Tests — Usage Ledger4src/tests/usage_ledger_test.rs
Tests — Browser E2E (opt-in, #[ignore])4src/tests/browser_e2e_test.rs
Tests — CLI Arg Length Cap2src/tests/cli_arg_too_long_test.rs
Tests — Config Watcher (integration)3src/tests/config_watcher_test.rs
Tests — Usage Model Grouping (.gguf + provider-prefix normalization)18src/tests/usage_grouping_test.rs
Tests — Tool-Execution Repo (empty tool_name guard)4src/tests/tool_execution_repo_test.rs
Tests — Generate Image Backend Dispatch (Gemini vs OpenAI-compatible)5src/tests/generate_image_backend_test.rs
Usage — Categorizer4src/usage/categorizer.rs
Usage — Dashboard6src/usage/dashboard.rs
Usage — Data7src/usage/data.rs
Hashline Edit53src/tests/hashline_test.rs (30 integration tests) + inline unit tests in hash.rs (9) and types.rs (14) — hash computation, HashRef parsing, edit operations (replace/append/prepend), hash mismatch detection, overlap detection, batch edits, prefix stripping, read_file hashline mode
Tests — Auto-Title (channel prefix preservation)28src/tests/auto_title_test.rs
Tests — Self-Improve Failure Log Guard3src/tests/self_improve_failure_log_guard_test.rs
Tests — Provider Retry Consolidation9src/tests/provider_retry_consolidation_test.rs — patient backoff, hard-down/DNS fast-fail, Retry-After clamp, retry-notify surfacing
Tests — Tool-Name Self-Heal (#176)11src/tests/tool_name_heal_test.rs — maps a model’s near-miss tool name (tg_send_messagetelegram_send) to the registered tool
Tests — Secret Redaction (tool summary)6src/tests/tool_description_redaction_test.rs — redacts Bearer/api_key/URL-password from the one-line tool display
Tests — Secret Redaction (RSI notifications)5src/tests/rsi_notification_redaction_test.rs — redacts secrets from RSI TUI alerts
Tests — Provider Error / HTML-page retry(in proxy test)src/tests/provider_error_proxy_test.rs — 4xx HTML infra error pages classified retryable (modelscope 405)
Tests — Cross-Provider Model Leak Guard6src/tests/cross_provider_model_leak_guard_test.rs
Tests — Session Provider Wrap / model pairingsrc/tests/session_provider_wrap_test.rs — swap wraps in FallbackProvider; provider+model set atomically, never invents a default
Tests — Streaming tok/s Guard10src/tests/streaming_tok_per_sec_guard_test.rs — floors/ceilings burst-delivery tok/s artifacts
Tests — Telegram Last-Intermediate Footer7src/tests/telegram_last_intermediate_footer_test.rs — ctx/tok-s footer appended to the last completion message
Tests — analyze_video Frame-Extraction Fallback6src/tests/analyze_video_fallback_test.rs
Tests — Git Branch Footer8src/tests/git_branch_test.rs
Tests — TOOLS.md Slim Regression9src/tests/tools_md_regression_test.rs
Tests — Telegram Command Sanitize12src/tests/telegram_command_sanitize_test.rs
Tests — Usage Cache15src/tests/usage_cache_test.rs
Tests — Config Auto-Repair7src/tests/config_repair_test.rs — closes unterminated arrays/inline tables in a broken config.toml, gated on the result re-parsing; leaves valid/nested/string cases and unfixable errors alone
Tests — Config Last-Good Recovery3src/tests/config_last_good_recovery_test.rs — a broken config never poisons the last-good snapshot; fixable configs auto-repair in place; unfixable ones recover from last-good (preserves auto-always so yolo mode survives a typo)
Total4,248Authoritative count from cargo test --all-features (lib test binary): 4,248 run by default + 24 #[ignore]d. The per-category rows above are a maintained snapshot. Re-run cargo test for the live number.

Feature-Gated Tests

Some tests only compile/run with specific feature flags:

FeatureTests
local-sttLocal whisper inline tests, candle whisper tests, STT dispatch local-mode tests, codec tests, availability cycling tests
local-ttsTTS voice cycling, Piper voice Up/Down

All feature-gated tests use #[cfg(feature = "...")] and are automatically included when running with --all-features.


Running Tests

# Run all tests (recommended)
cargo test --all-features

# Run a specific test module
cargo test --all-features -- voice_onboarding_test

# Run a single test
cargo test --all-features -- is_newer_major_bump

# Run with output (for debugging)
cargo test --all-features -- --nocapture

# Run only local-stt tests
cargo test --features local-stt -- local_whisper

Profile Tests

Profile tests live in src/tests/profile_test.rs and cover multi-instance isolation:

AreaWhat’s tested
Name validationReserved names, length bounds, special characters
Token hashingDeterminism, uniqueness, fixed length, hex output
Registry (in-memory)CRUD, serde roundtrip, touch timestamps
Path resolutionBase dir, env var override, default vs named profiles
Filesystem CRUDCreate/delete lifecycle, duplicate detection, registry sync
Export/ImportRoundtrip with config files, nested memory directories
MigrationCopy .md/.toml files, skip/force behavior, default source
Token locksAcquire/release, stale PID cleanup, cross-profile conflict
Profile isolationSeparate directories, concurrent writes, default vs named
Concurrent writesTokio tasks creating 5 profiles simultaneously
# Run profile tests only
cargo test --all-features -p opencrabs -- profile_test

Note: All filesystem-touching tests acquire a global fs_lock() mutex to prevent concurrent write corruption of ~/.opencrabs/profiles.toml. The mutex uses unwrap_or_else(|p| p.into_inner()) to recover from poison (a prior test panic won’t cascade-fail every subsequent test). In-memory tests run in parallel without the lock. The test_set_and_get_active_profile test accounts for OnceLock semantics (can only be set once per process).


Disabled Test Modules

These modules exist but are commented out in src/tests/mod.rs (require network or external services):

ModuleReason
error_scenarios_testRequires mock API server
integration_testEnd-to-end with LLM provider
plan_mode_integration_testEnd-to-end plan workflow
streaming_testRequires streaming API endpoint

Phantom Detection Tests

The self-healing phantom detector prevents the agent from dropping requests mid-stream when it says it will investigate something but never calls tools.

Coverage

Tests in src/tests/self_healing_test.rs verify detection of investigative intent phrases:

Phrase PatternExamples
let me hunt/trace/track“let me hunt down the bug”, “let me trace the request”
let me look into/check into“let me look into that”, “let me check into the logs”
let me find out/dig into“let me find out why”, “let me dig into the code”
i'll hunt/trace/track“i’ll hunt that down”, “i’ll trace the flow”
i'll look into/check into“i’ll look into it”, “i’ll check into the error”
i'll find out/dig into“i’ll find out what’s wrong”, “i’ll dig into the issue”

Behavior

When the agent outputs one of these phrases with zero tool calls, the phantom detector:

  1. Catches the mismatch between intent and action
  2. Injects a correction forcing tool invocation
  3. Prevents the response from ending with unexecuted promises

Test Count

88 tests covering phrase detection, edge cases, and integration with the tool loop.