hermes-agent/tests
wuli666 1ca1deb7f6 fix(feishu): classify native voice messages as VOICE for auto-transcription
Lark's native "audio" msg_type is an in-app voice recording — uploaded
audio files arrive as "file"/"media". But _resolve_normalized_message_type
resolved the "audio" preferred type to MessageType.AUDIO, which the gateway
treats as a non-transcribed file attachment (run.py: AUDIO -> audio_file_paths,
"never STT"; VOICE -> audio_paths, "always STT"). Result: a Feishu voice
note reached the agent as an untranscribable audio attachment and was
silently ignored — the user's spoken message never became text.

Every other platform that receives native voice notes (Telegram, Discord,
Slack, WhatsApp, Signal, Matrix, WeChat, WeCom, DingTalk, QQ, BlueBubbles,
Mattermost, Yuanbao) classifies them as MessageType.VOICE. Feishu was the
only one classifying them as AUDIO. This is the follow-up to #28993, which
added native voice-note transcription for Discord + DingTalk but did not
cover Feishu.

Return MessageType.VOICE for the "audio" branch. The branch is reached only
for Lark's top-level audio msg_type (set in the normalizer; file uploads map
to "document"), so VOICE is unconditionally correct here — no risk of
auto-transcribing an uploaded music/audio file.

- plugins/platforms/feishu/adapter.py: _resolve_normalized_message_type audio
  branch returns VOICE instead of resolving to AUDIO via mime.
- tests/gateway/test_feishu.py: test_extract_audio_message_downloads_and_caches
  asserted the old AUDIO behavior on a fixture literally named voice.ogg —
  updated to expect VOICE (the corrected classification).
- tests/gateway/test_feishu_voice_message_type.py: new focused regression
  tests (audio->VOICE with and without mime; photo/document/text unaffected).

Rebased onto current main: the Feishu platform moved from the single-file
gateway/platforms/feishu.py into the plugins/platforms/feishu/ package; the
fix applies to the same _resolve_normalized_message_type logic at its new home.

Verified the new voice tests fail when the branch resolves to AUDIO and pass
with VOICE, while the photo/document/text cases are unaffected either way.

Note: classification is mock-tested here; the downstream STT pipeline is the
shared, already-proven path (#28993). End-to-end verification on a live
Feishu account would be a welcome confirmation.

Refs #28993 (sibling-gap: Feishu was the platform left uncovered).
2026-07-28 14:06:56 -07:00
..
acp fix(acp): pin the session cwd for slash-command handlers too 2026-07-25 18:06:32 -07:00
acp_adapter feat(surfaces): route busy-input corrections through active-turn redirect 2026-07-22 12:10:58 -05:00
agent fix(codex): clamp oversized Responses call_id so MCP tools don't brick sessions (#73492) 2026-07-29 00:47:54 +05:30
ci fix(ci): report E2E evidence upload failures (#69901) 2026-07-23 05:45:17 +00:00
cli Merge upstream main into fix/hermes-relay-anthropic-context 2026-07-28 08:10:58 -07:00
computer_use fix(computer_use): stop the cua-driver child on exit 2026-07-26 03:38:23 -05:00
conformance feat(conformance): vector generator — native renderers as executable spec (#71666) 2026-07-26 16:52:25 +10:00
cron feat(cron): user-owned model pins + cron.model fleet default 2026-07-28 11:52:47 -07:00
dashboard fix(dashboard): use loopback host for in-container WebSocket client (#58993) [salvage #59682] (#60092) 2026-07-07 18:33:28 +10:00
docker fix(hermes_cli): heal root-owned logs/gateways on every stage2 boot 2026-07-27 19:19:01 +05:30
e2e test(relay): gate native Anthropic streaming in e2e 2026-07-28 08:25:25 -07:00
fakes
fixtures/plugins/example-dashboard/dashboard
gateway fix(feishu): classify native voice messages as VOICE for auto-transcription 2026-07-28 14:06:56 -07:00
hermes_cli fix(lmstudio): respect applied runtime context 2026-07-29 02:19:13 +05:30
hermes_state fix(state): heal alternation at the ACP / CLI-resume / TUI-resume restore sites too 2026-07-17 06:53:38 -07:00
honcho_plugin fix(honcho): default device-code poll interval to 5s when AS omits it 2026-07-24 07:53:12 -07:00
integration fix: remove dead f-string prefixes via ruff F541 (216 sites) (#52336) 2026-07-05 13:42:46 -07:00
manual
openviking_plugin fix(openviking): cool down failed refreshes and publish conn identity atomically 2026-07-24 13:00:53 +05:30
plugins fix(gemini): bump native provider aux default to gemini-3.6-flash 2026-07-28 11:54:46 -07:00
providers fix(openrouter): give auxiliary calls the sticky routing key 2026-07-25 22:46:35 -07:00
run_agent fix(lmstudio): respect applied runtime context 2026-07-29 02:19:13 +05:30
scripts Reapply "feat(observability): integrate NeMo Relay runtime and shared metrics" 2026-07-27 21:10:51 -07:00
secret_sources feat(secrets): orchestrator-level preserve_existing + profile aliasing (#69058) 2026-07-22 03:20:45 -07:00
skills fix(skills): parse stored GitHub credentials without scanner false positives 2026-07-26 20:59:26 -07:00
state fix(compression): recover rotated session lineage 2026-07-24 16:00:34 -07:00
stress fix: remove dead f-string prefixes via ruff F541 (216 sites) (#52336) 2026-07-05 13:42:46 -07:00
tools test(tts): accept stream kwarg in the 4 stale xAI fake_post mocks (#73619) 2026-07-28 12:49:23 -07:00
tui_gateway fix(session): skip display_kind timeline rows in undo/retry turn targets 2026-07-28 19:37:14 +05:30
website
__init__.py
conftest.py fix(kanban): preserve telegram dm topic metadata 2026-07-26 16:01:32 -07:00
run_interrupt_test.py
test_account_usage.py
test_atomic_replace_symlinks.py
test_background_review_list_shapes.py fix(background-review): guard summarize against list-shaped tool responses (#59437) 2026-07-06 03:28:30 -07:00
test_background_review_session_isolation.py
test_base_url_hostname.py
test_batch_runner_checkpoint.py
test_bitwarden_secrets.py fix(secrets): unify encrypted-cache fallback with the merged stale-cache path 2026-07-22 04:40:07 -07:00
test_cli_file_drop.py
test_cli_manual_compress.py test(cli): prove /compress type-ahead queue-drain; map contributor email 2026-07-23 07:24:46 -07:00
test_cli_skin_integration.py
test_code_skew.py
test_command_secret_source.py feat(secrets): rework command source as a registered SecretSource — no provider selector 2026-07-22 04:39:28 -07:00
test_conftest_wal_gate.py fix(tests): gate WAL-dependent tests on the linked SQLite's real capability 2026-07-25 07:17:52 -07:00
test_copilot_initiator.py
test_credential_file_permissions.py harden(slack): CDN-allowlist inbound file URLs, DNS-pin token downloads, widen token-file perms warning 2026-07-23 11:44:43 -07:00
test_ctx_halving_fix.py chore: restore test_ctx_halving_fix.py to main 2026-07-14 03:58:54 +05:30
test_delegate_cascade_49148.py
test_dispatch_session_id.py
test_empty_model_fallback.py feat(models): swap Gemini catalog entries to 3.1 Pro + 3.6 Flash; drop retired Qwen models 2026-07-28 10:07:18 -07:00
test_empty_session_hygiene.py
test_env_loader_applied_homes.py fix(secrets): mark _APPLIED_HOMES only after a real fetch attempt (#40597) (#69056) 2026-07-22 03:20:25 -07:00
test_env_loader_op_bootstrap.py fix(secrets): make 1Password bootstrap token reliable outside systemd 2026-07-06 04:58:07 -07:00
test_env_loader_secret_sources.py test(secrets): match real ApplyReport shape in isolation test 2026-07-22 04:39:17 -07:00
test_evidence_store.py
test_fast_safe_load.py
test_fts_cjk_bigram.py test(state): cover pure-Latin embedded-in-CJK recovery via the cjk index 2026-07-22 10:35:04 -07:00
test_gateway_streaming_nested_config.py fix(gateway): normalize YAML boolean streaming mode and keep enabled a mode-only alias 2026-07-20 05:39:09 -07:00
test_get_tool_definitions_cache_isolation.py
test_hermes_bootstrap.py test(install): add UTF-8 regression guard for skills_sync child path 2026-07-24 17:10:39 -07:00
test_hermes_constants.py fix(dashboard): keep custom themes visible after embedded chat starts (#60601) 2026-07-18 00:34:54 -04:00
test_hermes_home_profile_warning.py
test_hermes_logging.py
test_hermes_state.py fix(state): rebuild legacy gateway_routing PK; guard session_store in dispatch hook 2026-07-28 11:58:54 -07:00
test_hermes_state_compression_locks.py fix(compression-lock): reclaim crashed holders instead of stranding the lease 2026-07-25 22:47:07 -07:00
test_hermes_state_readonly_preflight.py fix(state): recover from read-only database files at startup 2026-07-27 17:27:38 -07:00
test_hermes_state_wal_fallback.py fix(state): make the byte-probe guard atomic, path-correct, and fail-closed 2026-07-25 21:44:43 -07:00
test_honcho_client_concurrency.py
test_honcho_client_config.py feat(honcho): make latency-adding paths configurable 2026-07-16 12:48:48 -07:00
test_honcho_session_context.py
test_honcho_startup_fail_open.py fix(ci): make tests, workflows, and attribution reliable under load (#66373) 2026-07-17 20:55:24 +00:00
test_install_autostash_conflict_recovery.py test: add happy-path + no-markers coverage for autostash recovery 2026-07-18 19:18:03 +05:30
test_install_diverged_update.py
test_install_lockfile_churn.py
test_install_macos_launcher.py fix(install): avoid realpath-dependent uv launcher on macOS 2026-07-26 19:30:32 -07:00
test_install_no_initial_commit.py
test_install_ps1_ascii_only.py fix(install): keep install.ps1 pure ASCII so Windows PowerShell 5.1 doesn't misparse it 2026-07-18 18:40:59 -04:00
test_install_ps1_native_stderr_eap.py
test_install_ps1_node_path_for_npm.py test(installer): guard Ensure-NodeExeOnPath wiring in install.ps1 2026-07-07 21:17:34 +07:00
test_install_ps1_python_fallback_venv.py
test_install_ps1_uv_powershell_host.py
test_install_ps1_web_server_syntax_probe.py fix(install): guard Windows desktop installs against broken web_server 2026-07-05 19:35:30 -07:00
test_install_sh_acp_launcher.py fix(install): install a hermes-acp launcher onto PATH 2026-07-28 11:53:12 -07:00
test_install_sh_bootstrap_marker.py fix(install): stamp the bootstrap-complete marker from install.sh too 2026-07-26 16:06:50 -05:00
test_install_sh_browser_install.py
test_install_sh_install_method_stamp.py
test_install_sh_node_global_prefix.py
test_install_sh_pythonpath_sanitization.py
test_install_sh_root_fhs_uv_python_path.py
test_install_sh_setup_wizard_tty_probe.py
test_install_sh_symlink_stomp.py
test_install_sh_termux_network_prereqs.py
test_install_unmerged_index.py
test_ipv4_preference.py
test_iron_proxy.py Reapply "Merge pull request #30179 from NousResearch/feat/iron-proxy" 2026-07-24 09:49:00 -07:00
test_iron_proxy_cli.py Reapply "Merge pull request #30179 from NousResearch/feat/iron-proxy" 2026-07-24 09:49:00 -07:00
test_iron_proxy_e2e.py Reapply "Merge pull request #30179 from NousResearch/feat/iron-proxy" 2026-07-24 09:49:00 -07:00
test_lazy_session_regressions.py fix(desktop): persist @image: refs instead of the vision-enrichment text 2026-07-24 21:20:52 -05:00
test_lint_config.py
test_live_system_guard_self_test.py fix(tests): make the live-system-guard canary fail closed 2026-07-21 12:15:46 +05:30
test_mcp_serve.py refactor: consolidate gateway session metadata into state.db (#58899) 2026-07-05 14:01:03 -07:00
test_mini_swe_runner.py
test_minimax_model_validation.py
test_minimax_oauth.py
test_minisweagent_path.py
test_model_forces_max_completion_tokens.py
test_model_picker_scroll.py
test_model_tools.py Reapply "feat(observability): integrate NeMo Relay runtime and shared metrics" 2026-07-27 21:10:51 -07:00
test_model_tools_async_bridge.py
test_ollama_num_ctx.py
test_onepassword_secrets.py fix(secrets): pass OP_LOAD_DESKTOP_APP_SETTINGS through to the op child env 2026-07-22 03:19:32 -07:00
test_output_cap_parsing.py
test_packaging_build_guard.py rip out brew + pip/PyPI wheel support (#68217) 2026-07-22 16:51:01 -04:00
test_packaging_metadata.py fix(deps): move CVE pins to current fixed versions so update stops downgrading patched envs 2026-07-26 19:29:07 -07:00
test_plugin_skills.py
test_plugin_utils.py
test_process_loop_event_loop_warning.py
test_profile_isolation_runtime.py
test_project_metadata.py Reapply "feat(observability): integrate NeMo Relay runtime and shared metrics" 2026-07-27 21:10:51 -07:00
test_pty_keepalive_ws.py fix(dashboard): scope chat attach tokens by session (#60745) 2026-07-16 19:48:47 -04:00
test_pty_session.py feat(pty): periodic reaper wired into dashboard lifespan 2026-07-07 15:15:37 -07:00
test_retry_utils.py refactor(retry): single-source Z.AI overload short-attempts + drop change-detector assert 2026-07-07 11:57:01 +05:30
test_run_tests_parallel.py fix(tests): a run that collects nothing can no longer look green 2026-07-25 07:09:22 -07:00
test_sanitize_tool_error.py
test_search_slow_query_log.py feat(state): messages_fts_cjk — CJK-bigram index on the v23 external-content layout 2026-07-22 07:56:47 -07:00
test_session_db_read_path_split.py fix: follow-up for PR #65541 — track read conns, convert remaining read paths, mark WAL tests 2026-07-28 20:29:44 +05:30
test_session_skill_previews.py fix(sessions): keep the skill body out of session previews 2026-07-26 02:58:20 -05:00
test_session_workspace_binding.py feat(sessions): workspace_key grouping helper + tests 2026-07-12 05:07:52 -04:00
test_slack_thread_require_mention.py Add Slack thread mention gating 2026-07-22 21:14:44 -07:00
test_slash_worker_watchdog.py test(tui): keep watchdog checks behavior-focused 2026-07-18 04:15:13 -07:00
test_sql_injection.py
test_sqlite_lock_safe_inspection.py fix(state): make the byte-probe guard atomic, path-correct, and fail-closed 2026-07-25 21:44:43 -07:00
test_sqlite_wal_reset_gate.py fix(state): make the byte-probe guard atomic, path-correct, and fail-closed 2026-07-25 21:44:43 -07:00
test_stale_utils_module_import.py
test_state_db_malformed_repair.py perf(state): external-content FTS + tool-row-free trigram index (schema v23) (#65798) 2026-07-22 04:42:50 -07:00
test_subprocess_home_isolation.py
test_telegram_polling_progress_ptb.py test(telegram): gate slots premise assert on runtimes without instance __dict__ 2026-07-14 21:25:44 -07:00
test_termux_all_extra_compat.py
test_timezone.py
test_tini_shim.py test(docker): cover tini -g legacy entrypoint boot path 2026-07-18 01:11:03 -07:00
test_toolset_distributions.py
test_toolsets.py docs(xai): clarify x_search vs xurl routing without schema cross-refs 2026-07-23 21:06:47 -07:00
test_trajectory_compressor.py fix(compaction): skip compression when it can't reduce tokens 2026-07-23 16:21:03 -07:00
test_trajectory_compressor_async.py
test_transform_llm_output_hook.py
test_transform_tool_result_hook.py
test_tui_entry_mcp_owner.py fix(tui): gate the shared-owner MCP discovery wait on the stdio TUI flag 2026-07-21 12:43:27 -07:00
test_tui_gateway_loop_noise.py
test_tui_gateway_queue_on_busy.py fix(gateway): a queue drain never becomes a live-turn correction 2026-07-28 01:48:08 -05:00
test_tui_gateway_server.py fix(voice): thread max_recording_seconds through the TUI path, add behavior coverage 2026-07-28 11:57:37 -07:00
test_tui_gateway_ws.py fix(mcp): propagate profile HERMES_HOME override into shared discovery owner; restore stdio startup + WSTransport tests 2026-07-26 14:14:03 -07:00
test_tui_mcp_late_refresh.py
test_utils_truthy_values.py
test_voice_max_recording_seconds.py fix(voice): enforce voice.max_recording_seconds (was dead config) 2026-07-28 11:57:37 -07:00
test_wal_checkpoint_strategy.py fix(state): use PASSIVE checkpoint for periodic WAL flush to prevent B-tree corruption 2026-07-15 04:55:46 -07:00
test_web_server.py feat(serve): add secure Desktop SSH bootstrap contract 2026-07-16 14:43:14 +02:00
test_web_server_sessiondb_eventloop.py Merge pull request #65893 from NousResearch/bb/salvage-63082-sessiondb-offload 2026-07-16 15:23:32 -04:00
test_windows_subprocess_no_window_flags.py fix(cron): respect the platform-conditional decode design in _run_job_script + taskkill kwarg snapshot 2026-07-24 11:45:57 -07:00
test_yaml_indent_consistency_31999.py
test_yuanbao_integration.py
test_yuanbao_markdown.py
test_yuanbao_pipeline.py perf(yuanbao): bounded-concurrency inbound media resolve 2026-07-08 08:05:45 -07:00
test_yuanbao_proto.py
test_yuanbao_reconnect_set_active.py
test_yuanbao_shutdown.py
test_zeroed_state_db.py fix(state): quarantine lock fails closed when unacquireable (#68805) 2026-07-24 23:06:05 -07:00