hermes-hub/tests
Hermes Team eaae2f8ac4 fix(A15): восстановить десктоп и починить веб-API
Правки при приёмке A15. Веб-API и вынесение действий приняты, но
в сданном виде не работали ни то, ни другое.

1. Десктоп был уничтожен. При выносе действий из hermes_hub_app.py
   пропало объявление class HermesHubApp вместе с 13 методами каркаса:
   __init__, _build_layout, _create_view, _show_view, _refresh_data и
   другими. Оставшиеся 14 методов оказались вложены внутрь функции
   _load_saved_theme после её return — синтаксически валидный
   недостижимый код, поэтому модуль импортировался и дефект выглядел
   безобидно. launch_hub() при этом падал бы с NameError.
   hermes_hub_app.py восстановлен из main; задание прямо требовало
   десктоп не ломать.

2. Дублирование убрано правильным способом: десктоп импортирует пять
   do_* из action_handler, второй реализации в проекте нет.

3. Веб-API падал с 500 на обоих значимых эндпоинтах: get_auth_token и
   run_server читали config.hub, а такого атрибута у RouterConfig нет.
   Настройки живут в hub_settings.json. Работал только /api/health, у
   которого нет проверки авторизации, — из-за чего сервер и выглядел
   поднявшимся.

4. do_save_settings при переносе потеряла атомарную запись через
   os.replace, ensure_ascii=False и вызов set_refresh_interval, то есть
   интервал обновления квот из настроек перестал применяться.
   Восстановлено.

5. Импорт адаптера был убран внутрь do_test_profile, что делало функцию
   неподменяемой в тестах. Поднят на уровень модуля.

6. Версия в /api/health была зашита как "1.0.0" вместо настоящей.

Проверено исполнением: /api/snapshot отдаёт 200 и 12 ключей, полностью
совпадающих с docs/web-api/snapshot.example.json; секретов в ответе нет;
неизвестное действие даёт 404. Тесты: 319 passed, ruff чисто.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 19:54:29 +07:00
..
conftest.py Fix UI test instability and clarify contract boundaries 2026-08-23 18:27:07 +07:00
test_a9_migration_quotas_models.py feat(router): A9 — миграция конфигурации, квоты провайдеров, реальные модели, перехват Hermes и токены Codex 2026-08-23 12:45:08 +07:00
test_accounts_tariffs_quotas.py feat(A11): интеграция с Hermes, токены Codex, честное обнаружение моделей 2026-08-23 15:27:28 +07:00
test_antigravity_concurrency.py refactor(plan-a): close residual blockers, concurrency race, and feed verification 2026-08-20 22:55:43 +07:00
test_codex_opencode_wizard.py fix(ui): repair startup crash in TeamView and tighten the headless guard 2026-08-20 23:22:19 +07:00
test_credential_isolation.py feat(security): isolate subprocess credentials, implement selection explanation matrix, and resolve installer registry isolation 2026-08-21 10:17:19 +07:00
test_dashboard_data.py fix(dashboard): unify LeaseManager, warm up initial CPU measurement, add live network speed, and clarify YAML comment support 2026-08-21 22:18:59 +07:00
test_data_truthfulness_and_oauth_security.py feat(state): harden snapshots quotas and routing 2026-08-21 00:03:50 +07:00
test_deployment_doctor.py feat(installer): implement P0-4bis reinstall detection, UI screen, and user data preservation 2026-08-22 21:25:39 +07:00
test_import_invariants.py style: normalize merged state tests 2026-08-21 00:11:16 +07:00
test_import_source_contract.py feat(state): harden snapshots quotas and routing 2026-08-21 00:03:50 +07:00
test_installer.py feat(security): isolate subprocess credentials, implement selection explanation matrix, and resolve installer registry isolation 2026-08-21 10:17:19 +07:00
test_linux_port_paths.py feat(A15): веб-API, общий ActionExecutor и порт путей на Linux 2026-08-23 19:45:13 +07:00
test_multi_provider_router.py fix(deployment): implement self-healing bootstrap, Claude & Grok profiles, non-interactive test mode, mirror installer, and comprehensive doctor CLI 2026-08-22 21:22:21 +07:00
test_oauth_lifecycle.py Fix UI test instability and clarify contract boundaries 2026-08-23 18:27:07 +07:00
test_p0_release_gate.py fix: update canonical installer with dependency resolution and close release blockers 2026-08-20 18:17:08 +07:00
test_plan_a_stabilization_and_smart_routing.py feat(hub): Plan A stabilization, refresh architecture, delta UI, and capability routing 2026-08-20 21:20:51 +07:00
test_plugin_passthrough.py fix(plugin): отказ роутера больше не подменяет ответ модели в Hermes 2026-08-23 12:25:02 +07:00
test_roadmap_features.py feat(state): harden snapshots quotas and routing 2026-08-21 00:03:50 +07:00
test_router_telemetry.py feat(telemetry): implement empirical call telemetry, metrics aggregates, user pricing, and update state contract 2026-08-21 16:57:57 +07:00
test_state_layer_and_event_driven_quota.py feat(release): close contract audit v1.2, release feed verification, diagnostic CLI, and failover event logging 2026-08-21 10:05:30 +07:00
test_state_layer_contract.py feat(state): harden snapshots quotas and routing 2026-08-21 00:03:50 +07:00
test_ui_claude_grok_connection.py fix(A15): восстановить десктоп и починить веб-API 2026-08-23 19:54:29 +07:00
test_ui_contract_v11.py Fix UI test instability and clarify contract boundaries 2026-08-23 18:27:07 +07:00
test_ui_design_system.py refactor(ui): centralize design tokens and complete the component library 2026-08-20 23:35:10 +07:00
test_ui_mockup_redesign.py Fix UI test instability and clarify contract boundaries 2026-08-23 18:27:07 +07:00
test_ui_model_discovery_reachability.py feat(ui): A12 — компактные карточки аккаунтов, доступность причин Н/Д, упорядочивание провайдеров и тест службы моделей 2026-08-23 13:30:20 +07:00
test_ui_phase2_6.py Fix UI test instability and clarify contract boundaries 2026-08-23 18:27:07 +07:00
test_ui_refinement.py fix(router): address review findings B1-B4 and S1-S9 with full regression suite 2026-08-20 17:04:49 +07:00
test_ui_routing_graph.py fix(A15): восстановить десктоп и починить веб-API 2026-08-23 19:54:29 +07:00
test_ui_screenshot_harness.py feat(ui): implement approved three-theme mockup redesign 2026-08-21 19:06:46 +07:00
test_ui_wizard_finish.py Fix UI test instability and clarify contract boundaries 2026-08-23 18:27:07 +07:00
test_unified_health.py Merge codex/usability-fixes into review/a8 (A8 + B6/B7) 2026-08-23 01:12:31 +07:00
test_updater.py fix: update canonical installer with dependency resolution and close release blockers 2026-08-20 18:17:08 +07:00
test_view_startup_contract.py test(ui): keep the startup guard assertion after views stopped reading the store 2026-08-21 08:47:59 +07:00
test_web_api_security.py feat(A15): веб-API, общий ActionExecutor и порт путей на Linux 2026-08-23 19:45:13 +07:00