HERMES-GIELIE/tests
nesquena-hermes 27c2fd6c08
v0.46.0: security, Docker UID/GID, model discovery, i18n, cancel fix
* fix: decode HTML entities before markdown processing + zh/zh-Hant translations (#239)

Adds decode() helper in renderMd() to fix double-escaping of HTML entities
from LLM output (e.g. <code> becoming <code> instead
of rendering). XSS-safe: decode runs before esc(), only 5 entity patterns.

Also adds 40+ missing zh (Simplified Chinese) translation keys and a new
zh-Hant (Traditional Chinese) locale with 163 keys.

Fix applied: removed duplicate settings_label_notifications key in both
zh and zh-Hant locales.

Fixes #240

* fix: restore custom model list discovery with config api key (#238)

get_available_models() now reads api_key from config.yaml before env vars:
  1. model.api_key
  2. providers.<active>.api_key / providers.custom.api_key
  3. env var fallbacks (HERMES_API_KEY, OPENAI_API_KEY, etc.)

Also adds OpenAI/Python User-Agent header and a regression test covering
authenticated /v1/models discovery.

Fixes users with LM Studio / Ollama custom endpoints configured in
config.yaml whose model picker silently collapsed to the default model.

* feat: Docker UID/GID matching to avoid root-owned .hermes files (#237)

Adds docker_init.bash with hermeswebuitoo/hermeswebui user pattern so
container files match the host user UID/GID. Prevents .hermes volume
mounts from being owned by root when using a non-root host user.

Configure via WANTED_UID and WANTED_GID env vars (default 1000/1000).
Readme updated with setup instructions.

Fix applied: removed duplicate WANTED_GID=1000 line in docker-compose.yml
that was overriding the ${GID:-1000} variable expansion.

* security: redact credentials from API responses and fix credential file permissions (#243)

Adds response-layer credential redaction to three endpoints:
  - GET /api/session — messages[], tool_calls[], and title
  - GET /api/session/export — download also redacted
  - SSE done event — session payload in stream
  - GET /api/memory — MEMORY.md and USER.md content

Adds api/startup.py with fix_credential_permissions() at server startup.
Adds 13 tests in tests/test_security_redaction.py.

Merged with #237 container detection changes in server.py.

* fix: cancel button now interrupts agent and cleans up UI state (#244)

Wires agent.interrupt() into cancel_stream() so the backend actually
stops tool execution when the user clicks Cancel, rather than only
stopping the SSE stream while the agent keeps running.

Changes:
  - api/config.py: adds AGENT_INSTANCES dict (stream_id -> AIAgent)
  - api/streaming.py: stores agent in AGENT_INSTANCES after creation,
    checks CANCEL_FLAGS immediately after store (race condition fix),
    calls agent.interrupt() in cancel_stream(), cleans up in finally block
  - static/boot.js: removes stale setStatus(cancelling) call
  - static/messages.js: setBusy(false)/setStatus('') unconditionally on cancel

Race condition fix: after storing agent in AGENT_INSTANCES, immediately
checks if CANCEL_FLAGS[stream_id] is already set (cancel arrived during
agent init) and interrupts before starting. Check is inside the same
STREAMS_LOCK acquisition, making it atomic.

New test file: tests/test_cancel_interrupt.py with 6 unit tests.

* docs: v0.46.0 release notes, bump version, update test counts

---------

Co-authored-by: Nathan Esquenazi <nesquena@gmail.com>
2026-04-11 10:17:52 -07:00
..
__init__.py Hermes WebUI v0.1.0 — initial public release 2026-03-30 20:40:19 -07:00
conftest.py fix: wire auto_install_agent_deps into server.py startup (#216) 2026-04-10 00:56:07 -07:00
test_approval_unblock.py fix: unskip 16 approval tests — remove stale has_pending/pop_pending imports 2026-04-10 10:10:28 -07:00
test_auth_sessions.py fix(auth): prune expired sessions on every verify to prevent memory leak (#196) 2026-04-09 18:05:23 -07:00
test_cancel_interrupt.py v0.46.0: security, Docker UID/GID, model discovery, i18n, cancel fix 2026-04-11 10:17:52 -07:00
test_model_resolver.py v0.46.0: security, Docker UID/GID, model discovery, i18n, cancel fix 2026-04-11 10:17:52 -07:00
test_regressions.py fix: stop leaking stack traces to clients in HTTP 500 responses 2026-04-03 06:41:32 -07:00
test_security_redaction.py v0.46.0: security, Docker UID/GID, model discovery, i18n, cancel fix 2026-04-11 10:17:52 -07:00
test_sprint1.py Hermes Web UI — Sprints 11-14: multi-provider models, settings, session QoL, alerts, polish 2026-03-31 07:02:47 +00:00
test_sprint2.py Hermes WebUI v0.1.0 — initial public release 2026-03-30 20:40:19 -07:00
test_sprint3.py Hermes WebUI v0.1.0 — initial public release 2026-03-30 20:40:19 -07:00
test_sprint4.py Hermes WebUI v0.1.0 — initial public release 2026-03-30 20:40:19 -07:00
test_sprint5.py Hermes WebUI v0.1.0 — initial public release 2026-03-30 20:40:19 -07:00
test_sprint6.py Hermes WebUI v0.1.0 — initial public release 2026-03-30 20:40:19 -07:00
test_sprint7.py Hermes WebUI v0.1.0 — initial public release 2026-03-30 20:40:19 -07:00
test_sprint8.py Hermes WebUI v0.1.0 — initial public release 2026-03-30 20:40:19 -07:00
test_sprint9.py Hermes WebUI v0.1.0 — initial public release 2026-03-30 20:40:19 -07:00
test_sprint10.py Hermes WebUI v0.1.0 — initial public release 2026-03-30 20:40:19 -07:00
test_sprint11.py Hermes Web UI — Sprints 11-14: multi-provider models, settings, session QoL, alerts, polish 2026-03-31 07:02:47 +00:00
test_sprint12.py Hermes Web UI — Sprints 11-14: multi-provider models, settings, session QoL, alerts, polish 2026-03-31 07:02:47 +00:00
test_sprint13.py Hermes Web UI — Sprints 11-14: multi-provider models, settings, session QoL, alerts, polish 2026-03-31 07:02:47 +00:00
test_sprint14.py Hermes Web UI — Sprints 11-14: multi-provider models, settings, session QoL, alerts, polish 2026-03-31 07:02:47 +00:00
test_sprint15.py feat: Sprint 15 — session projects, code copy button, tool card toggle 2026-04-02 00:11:49 -07:00
test_sprint16.py feat: safe HTML rendering in AI responses + active session gold style + Sprint 16 tests 2026-04-03 00:27:43 +00:00
test_sprint17.py feat: Sprint 17 -- workspace breadcrumbs, slash commands, send key setting 2026-04-03 04:13:38 -07:00
test_sprint19.py fix(auth): harden password_hash handling in settings API 2026-04-03 06:21:04 -07:00
test_sprint20.py feat: pluggable i18n with English/Chinese language switcher in Settings 2026-04-08 18:57:50 -07:00
test_sprint20b.py fix: test_send_pop_in keyframe parser hit wrong @keyframes block 2026-04-03 14:23:56 +00:00
test_sprint23.py fix: test hardening for sprint 23 — handle missing cron/skills modules in test env 2026-04-03 19:16:17 -07:00
test_sprint26.py fix: settings unsaved-changes guard, add Slate theme, improve Light theme 2026-04-05 04:00:24 +00:00
test_sprint27.py fix: harden bot_name — crash guard, XSS escape, sanitization, tests 2026-04-06 15:06:16 +00:00
test_sprint28.py fix: personalities from config.yaml + ephemeral_system_prompt (#139) (#148) 2026-04-06 14:10:30 -07:00
test_sprint29.py fix: broaden session ID validator to support new hermes-agent format (#212) 2026-04-10 00:00:02 -07:00
test_sprint30.py v0.44.0: approval fix, login CSP, update diagnostics, Lucide icons 2026-04-10 10:02:28 -07:00
test_sprint31.py feat: custom endpoint fields in new profile form (fixes #170, closes #214) 2026-04-10 11:43:49 -07:00
test_sprint32.py feat: auto-install missing agent deps on startup (#215) 2026-04-10 00:42:02 -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_update_checker.py v0.44.0: approval fix, login CSP, update diagnostics, Lucide icons 2026-04-10 10:02:28 -07:00