* 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>
8.8 KiB
8.8 KiB