HERMES-GIELIE/api
Nathan Esquenazi 571a5a40f1 fix(review): 3 issues found in agent review of PR #41
BUG-3 (high): /api/profile/delete missing RuntimeError catch. When
deleting the active profile while an agent was running, delete_profile_api()
called switch_profile('default') which raises RuntimeError('Cannot switch
profiles while agent is running'). This propagated to the 500 handler
giving the user 'Internal server error' with no context. Added the same
except RuntimeError -> 409 pattern that /api/profile/switch already uses.

INFO-1 (defense-in-depth): /api/profile/create had no server-side name
validation before delegating to hermes_cli.validate_profile_name. Added
server-side ^[a-z0-9][a-z0-9_-]{0,63}$ check, consistent with client-side
regex in submitProfileCreate(). Prevents path-traversal-ish names from
reaching hermes_cli even if the client-side guard is bypassed.

INFO-2 (defense-in-depth): clone_from parameter was passed directly to
hermes_cli with no validation. Applied the same name regex check to
clone_from before delegating.

BUG-11 (low): toggleProfileDropdown() and toggleWsDropdown() could both
be open simultaneously. Added cross-dropdown close calls: opening the
profile dropdown now closes the workspace dropdown, and vice versa.

Tests: 415 passed, 0 failed.
2026-04-03 18:06:18 +00:00
..
__init__.py Hermes Web UI — Sprints 11-14: multi-provider models, settings, session QoL, alerts, polish 2026-03-31 07:02:47 +00:00
auth.py fix(auth): redirect to /login when auth is enabled and accessing root 2026-04-03 06:21:04 -07:00
config.py feat: multi-profile support -- create, switch, delete profiles from web UI (Issue #28) 2026-04-03 10:50:21 -07:00
helpers.py feat: Sprint 19 — password auth, security headers, login page 2026-04-03 05:53:26 -07:00
models.py feat: multi-profile support -- create, switch, delete profiles from web UI (Issue #28) 2026-04-03 10:50:21 -07:00
profiles.py feat: multi-profile support -- create, switch, delete profiles from web UI (Issue #28) 2026-04-03 10:50:21 -07:00
routes.py fix(review): 3 issues found in agent review of PR #41 2026-04-03 18:06:18 +00:00
streaming.py feat: multi-profile support -- create, switch, delete profiles from web UI (Issue #28) 2026-04-03 10:50:21 -07:00
upload.py fix: stop leaking stack traces to clients in HTTP 500 responses 2026-04-03 06:41:32 -07:00
workspace.py Hermes Web UI — Sprints 11-14: multi-provider models, settings, session QoL, alerts, polish 2026-03-31 07:02:47 +00:00