HERMES-GIELIE/tests
nesquena-hermes 49ff8b3185
fix: bootstrap.py loads REPO_ROOT/.env so direct invocation matches start.sh (#730) (#791)
* fix: bootstrap.py loads REPO_ROOT/.env so direct invocation matches start.sh

When users run 'python3 bootstrap.py' directly (the primary documented
entry point in README), HERMES_WEBUI_HOST, HERMES_WEBUI_PORT and other
.env settings were silently ignored because the shell-level 'source .env'
in start.sh was never executed.

Add _load_repo_dotenv() in bootstrap.py that reads REPO_ROOT/.env into
os.environ before DEFAULT_HOST / DEFAULT_PORT are evaluated at module
level. Uses unconditional assignment matching 'set -a; source .env'
shell semantics. Only loads the repo .env (bootstrap config) — not
~/.hermes/.env, which the server still loads independently at startup
for provider credentials.

Reported in #730 by @leap233 who had HERMES_WEBUI_HOST=0.0.0.0 and
HERMES_WEBUI_PORT=18787 in the webui .env; running bootstrap.py directly
caused the server to ignore both settings.

Tests: 15 new tests in tests/test_bootstrap_dotenv.py covering the
full loader (key=value, comments, blank lines, quoted values, no-file,
unreadable-file, overwrite semantics, values with = signs) and structural
assertions that _load_repo_dotenv() is called before DEFAULT_HOST/PORT.
1613 tests total.

* fix: address review feedback on PR #791

- bootstrap.py: document overwrite semantics and 'export' note in docstring
- bootstrap.py: handle 'export FOO=bar' prefix (strip before splitting on =)
- bootstrap.py: print warning to stderr on .env parse failure (not silent swallow)
- bootstrap.py: add side-effect comment at _load_repo_dotenv() call site
- CHANGELOG.md: restore v0.50.124 and v0.50.123 headers (were merged into
  v0.50.125 section, making three consecutive ### Fixed blocks with no ## header
  between them)
- tests: fix test_noop_when_dotenv_unreadable to assert warning is emitted
- tests: tighten test_does_not_set_empty_values with concrete assertion
- tests: add test_export_prefix_stripped
- tests: remove dead _import_bootstrap_with_env() helper (never called)
1614 tests total

---------

Co-authored-by: nesquena-hermes <hermes@nesquena.com>
2026-04-20 20:55:53 -07:00
..
__init__.py
_pytest_port.py fix(tests): restore conftest default model in test_default_model_updates_hermes_config — fixes CI ordering failure 2026-04-21 02:25:14 +00:00
conftest.py perf: TTL cache for model list + incremental session index (#780) 2026-04-21 00:33:03 +00:00
test_745_code_block_newlines.py fix(renderer): preserve newlines in code blocks during paragraph split (#745) (#746) 2026-04-20 00:04:27 -07:00
test_approval_queue.py fix: queue simultaneous approval requests per session (fixes #527) 2026-04-15 19:16:14 +00:00
test_approval_unblock.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_auth_sessions.py
test_batch_fixes.py fix(config): use Hermes config.yaml as single source of default model (#773) 2026-04-20 22:12:01 +00:00
test_bootstrap_dotenv.py fix: bootstrap.py loads REPO_ROOT/.env so direct invocation matches start.sh (#730) (#791) 2026-04-20 20:55:53 -07:00
test_bugbatch_apr2026.py fix(ui): dark-mode user bubbles use subtle tint + thinking card collapsible — v0.50.111 (#759) 2026-04-20 01:12:45 -07:00
test_cancel_interrupt.py fix(streaming): eagerly release session lock in cancel_stream() (#778) 2026-04-20 23:54:40 +00:00
test_chinese_locale.py fix i18n review comments and locale test robustness 2026-04-14 17:14:01 +00:00
test_clarify_unblock.py feat: harden clarify dialog flow and refresh recovery 2026-04-15 13:10:50 +08:00
test_commands_endpoint.py feat: slash command parity + skill autocomplete — v0.50.91 (PR #711) 2026-04-19 05:37:44 +00:00
test_custom_provider_display_name.py fix(tests): pin _cfg_mtime in _models_with_cfg to prevent ordering-dependent failure — v0.50.109 (fixes #754) (#756) 2026-04-20 00:39:24 -07:00
test_default_workspace_fallback.py fix: HERMES_WEBUI_DEFAULT_WORKSPACE wins over settings.json; trust DEFAULT_WORKSPACE subtree (#610) 2026-04-16 18:09:16 -07:00
test_gateway_sync.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_ime_composition.py test: loosen IME guard regression assertions 2026-04-15 23:21:56 +08:00
test_issue341.py feat(theme): replace color scheme system with light/dark + accent skins (PR #627 by @aronprins) 2026-04-18 06:37:09 +00:00
test_issue342.py fix(renderer): prevent double-linking and esc() corruption in renderMd() 2026-04-14 21:13:33 +00:00
test_issue347.py feat: KaTeX math rendering for LaTeX in chat + workspace previews (#352) 2026-04-13 11:40:15 -07:00
test_issue357.py fix: streaming scroll override, Gemini 3.x models, read-only workspace, two-container UID — v0.50.87 (closes #677 #669 #670 #668) 2026-04-18 17:09:59 +00:00
test_issue401.py feat: redesign chat transcript + fix streaming/persistence lifecycle — v0.50.70 (PR #587 by @aronprins) 2026-04-16 14:04:42 -07:00
test_issue470.py fix(renderer): backtick code spans inside bold/italic no longer get esc'd 2026-04-14 21:14:00 +00:00
test_issue477.py fix(csp): allow cdn.jsdelivr.net for font-src so KaTeX fonts load (fixes #477) 2026-04-14 21:14:33 +00:00
test_issue486_487.py fix: code-in-table CSS sizing + markdown image rendering (#486, #487) 2026-04-14 21:52:34 +00:00
test_issue487b.py fix(review): 4 issues found in agent review of PR #535 2026-04-16 00:00:22 +00:00
test_issue569_579.py feat(ui): add sidebar density mode to session list (#764) 2026-04-20 19:43:40 +00:00
test_issue570_permission.py fix: catch OSError from SETTINGS_FILE.exists() — Docker UID-mismatch 500 crash (#614) 2026-04-16 20:16:07 -07:00
test_issue572.py feat: MCP toolsets in WebUI + onboarding fix for non-standard providers — v0.50.63 2026-04-15 23:39:07 -07:00
test_issue607.py fix(streaming): strip Gemma 4 thinking token delimiter in all paths — closes #607 2026-04-18 06:45:39 +00:00
test_issue609.py fix: HERMES_WEBUI_DEFAULT_WORKSPACE wins over settings.json; trust DEFAULT_WORKSPACE subtree (#610) 2026-04-16 18:09:16 -07:00
test_issue632.py fix(ui): streamline slash sub-argument autocomplete (#771) 2026-04-20 22:04:28 +00:00
test_issue634.py fix(sessions): surface get_cli_sessions() failures via logger.warning (#769) 2026-04-20 23:13:54 +00:00
test_issue644.py fix(config): load provider models from config.yaml in model dropdown — PR #644 by @ccqqlo 2026-04-18 07:14:03 +00:00
test_issue646.py fix(config): default model empty string — no unavailable OpenAI model for non-OpenAI users — closes #646 (PR #649) 2026-04-18 06:46:43 +00:00
test_issue660.py fix(ui): persist session queue to sessionStorage across page refresh (#768) 2026-04-20 23:04:09 +00:00
test_issue673.py feat(ui): add sidebar density mode to session list (#764) 2026-04-20 19:43:40 +00:00
test_issue677.py fix: streaming scroll override, Gemini 3.x models, read-only workspace, two-container UID — v0.50.87 (closes #677 #669 #670 #668) 2026-04-18 17:09:59 +00:00
test_issue739_652_653.py fix(streaming): quota error detection, error persistence, stream_end session_id fix (#767) 2026-04-20 22:48:19 +00:00
test_issue744.py fix(ui): restrict edit to latest user message (#747) 2026-04-19 23:11:49 -07:00
test_issue781.py fix(ui): hide duplicate close button in workspace header at mobile width (#783) 2026-04-21 00:58:02 +00:00
test_issue_code_syntax_highlight.py feat(ui): remove mobile bottom nav on phones 2026-04-14 17:13:03 +00:00
test_issues_373_374_375.py fix(streaming): quota error detection, error persistence, stream_end session_id fix (#767) 2026-04-20 22:48:19 +00:00
test_language_precedence.py fix i18n review comments and locale test robustness 2026-04-14 17:14:01 +00:00
test_login_locale.py feat: add full Russian (ru-RU) localization — v0.50.95 (PR #713) 2026-04-19 06:47:24 +00:00
test_media_inline.py feat: support subpath mount via reverse proxy — v0.50.67 (PR #588 by @vcavichini) 2026-04-16 11:20:08 -07:00
test_minimax_provider.py feat: add MiniMax M2.7 to fallback model list and fix env var detection — PR #650 by @octo-patch 2026-04-18 07:18:20 +00:00
test_mobile_layout.py feat(ui): remove mobile bottom nav on phones 2026-04-14 17:13:03 +00:00
test_model_resolver.py fix(model dropdown): stop injecting default into unrelated providers 2026-04-19 08:18:24 +08:00
test_onboarding_existing_config.py fix: harden test server isolation — HERMES_BASE_HOME + strip provider keys + mock _get_active_hermes_home in unit tests (#620) 2026-04-16 23:03:32 -07:00
test_onboarding_mvp.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_onboarding_network.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_onboarding_static.py feat: support subpath mount via reverse proxy — v0.50.67 (PR #588 by @vcavichini) 2026-04-16 11:20:08 -07:00
test_opencode_providers.py fix: delegate all live model fetching to agent provider_model_ids() (#411) 2026-04-13 22:57:58 -07:00
test_orphaned_tool_messages.py fix: strip orphaned tool messages before sending history to API (fixes #534) 2026-04-15 16:57:31 +00:00
test_profile_env_isolation.py fix: isolate profile .env secrets on switch (#351) 2026-04-13 00:51:55 -07:00
test_profile_path_security.py v0.50.25: mobile scroll, import timestamps, profile security, mic fallback (#404) 2026-04-13 22:11:45 -07:00
test_provider_mismatch.py fix(streaming): quota error detection, error persistence, stream_end session_id fix (#767) 2026-04-20 22:48:19 +00:00
test_regressions.py feat: slash command parity + skill autocomplete — v0.50.91 (PR #711) 2026-04-19 05:37:44 +00:00
test_russian_locale.py feat: add full Russian (ru-RU) localization — v0.50.95 (PR #713) 2026-04-19 06:47:24 +00:00
test_security_redaction.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_session_index.py perf: TTL cache for model list + incremental session index (#780) 2026-04-21 00:33:03 +00:00
test_session_ops.py feat: slash command parity + skill autocomplete — v0.50.91 (PR #711) 2026-04-19 05:37:44 +00:00
test_session_sidebar_relative_time.py chore: CHANGELOG + v0.50.64 badge + Today-bucket test (post-merge follow-up for #584) 2026-04-16 10:09:51 -07:00
test_session_summary_redaction.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_spanish_locale.py feat(i18n): add Spanish locale for WebUI (#275) 2026-04-11 20:06:37 -07:00
test_sprint1.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint2.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint3.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint4.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint5.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint6.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint7.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint8.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint9.py feat: support subpath mount via reverse proxy — v0.50.67 (PR #588 by @vcavichini) 2026-04-16 11:20:08 -07:00
test_sprint10.py feat: support subpath mount via reverse proxy — v0.50.67 (PR #588 by @vcavichini) 2026-04-16 11:20:08 -07:00
test_sprint11.py fix(config): default model empty string — no unavailable OpenAI model for non-OpenAI users — closes #646 (PR #649) 2026-04-18 06:46:43 +00:00
test_sprint12.py fix(tests): restore conftest default model in test_default_model_updates_hermes_config — fixes CI ordering failure 2026-04-21 02:25:14 +00:00
test_sprint13.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint14.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint15.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint16.py feat(theme): replace color scheme system with light/dark + accent skins (PR #627 by @aronprins) 2026-04-18 06:37:09 +00:00
test_sprint17.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint19.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint20.py feat(theme): replace color scheme system with light/dark + accent skins (PR #627 by @aronprins) 2026-04-18 06:37:09 +00:00
test_sprint20b.py feat(theme): replace color scheme system with light/dark + accent skins (PR #627 by @aronprins) 2026-04-18 06:37:09 +00:00
test_sprint23.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint26.py feat(theme): replace color scheme system with light/dark + accent skins (PR #627 by @aronprins) 2026-04-18 06:37:09 +00:00
test_sprint27.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint28.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint29.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint30.py feat: harden clarify dialog flow and refresh recovery 2026-04-15 13:10:50 +08:00
test_sprint31.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint32.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint33.py v0.47.0: dialogs, session menu, /skills, mobile fixes, mobile QA suite 2026-04-11 12:19:12 -07:00
test_sprint34.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint35.py fix+feat: session title guard + breadcrumb nav + wider panel + responsive msgs (closes #300, #292) 2026-04-12 10:51:48 -07:00
test_sprint36.py feat: add full Russian (ru-RU) localization — v0.50.95 (PR #713) 2026-04-19 06:47:24 +00:00
test_sprint37.py feat: redesign chat transcript + fix streaming/persistence lifecycle — v0.50.70 (PR #587 by @aronprins) 2026-04-16 14:04:42 -07:00
test_sprint38.py fix(streaming): strip Gemma 4 thinking token delimiter in all paths — closes #607 2026-04-18 06:45:39 +00:00
test_sprint39.py fix: HERMES_WEBUI_SKIP_ONBOARDING unconditional + guard against config writes + 10 skipped tests fixed — v0.50.65 2026-04-16 10:19:10 -07:00
test_sprint40.py feat: OAuth provider onboarding path — Codex/Copilot no longer blocks setup (#331) 2026-04-12 14:28:16 -07:00
test_sprint40_ui_polish.py feat(theme): replace color scheme system with light/dark + accent skins (PR #627 by @aronprins) 2026-04-18 06:37:09 +00:00
test_sprint41.py fix(streaming): quota error detection, error persistence, stream_end session_id fix (#767) 2026-04-20 22:48:19 +00:00
test_sprint42.py fix(streaming): guard newer AIAgent kwargs with inspect for hermes-agent compat (#775) 2026-04-20 23:23:19 +00:00
test_sprint43.py security: bandit fixes B310/B324/B110 + QuietHTTPServer (#354) 2026-04-13 11:11:56 -07:00
test_sprint44.py fix: workspace panel close button — no duplicate X on desktop, mobile X respects file preview (#414) 2026-04-13 23:25:26 -07:00
test_sprint45.py fix(tests): auto-derive unique port+state-dir per worktree (fixes parallel pytest) 2026-04-14 19:04:48 +00:00
test_sprint46.py fix(compress): prefer persisted reference handoff after completion — v0.50.90 (PR #699 by @franksong2702) 2026-04-19 04:29:07 +00:00
test_sprint47.py feat: slash command parity + skill autocomplete — v0.50.91 (PR #711) 2026-04-19 05:37:44 +00:00
test_sprint48.py fix: XML tool-call leak + workspace empty-state + notification text — v0.50.92 (PR #712) 2026-04-19 05:40:37 +00:00
test_sprint49.py fix(ui): hover-only footer chrome with timestamps for both user and assistant — v0.50.110 (fixes #680) (#758) 2026-04-20 00:53:19 -07:00
test_sprint50.py fix(ui): constrain slash autocomplete width to composer — v0.50.98 (closes #633) (#750) 2026-04-19 23:17:00 -07:00
test_sprint51.py fix(streaming): eagerly release session lock in cancel_stream() (#778) 2026-04-20 23:54:40 +00:00
test_title_sanitization.py fix(title): strip markdown labels and skip empty placeholders in auto-title (#611) 2026-04-16 18:51:00 -07:00
test_tls_support.py feat: optional HTTPS/TLS support via cert and key env vars (#199) 2026-04-09 18:08:29 -07:00
test_tool_call_persistence.py feat: redesign chat transcript + fix streaming/persistence lifecycle — v0.50.70 (PR #587 by @aronprins) 2026-04-16 14:04:42 -07:00
test_ttl_cache.py perf: TTL cache for model list + incremental session index (#780) 2026-04-21 00:33:03 +00:00
test_ui_card_animation.py fix(ui): dark-mode user bubbles use subtle tint + thinking card collapsible — v0.50.111 (#759) 2026-04-20 01:12:45 -07:00
test_update_checker.py v0.44.0: approval fix, login CSP, update diagnostics, Lucide icons 2026-04-10 10:02:28 -07:00
test_updates.py fix: improve self-update git pull diagnostics (#287) 2026-04-12 00:19:33 -07:00
test_version_badge.py fix: dynamic version badge — read from git tag, never hardcoded (#790) 2026-04-20 20:36:53 -07:00
test_voice_transcribe_endpoint.py v0.50.25: mobile scroll, import timestamps, profile security, mic fallback (#404) 2026-04-13 22:11:45 -07:00