mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-06-04 16:10:24 +00:00
c1942a1cd8
PR #3023 only updated Session.load() and Session.load_metadata_only(), leaving three sibling validators (Session-internal _repair_stale_pending and the /api/session/worktree/remove + /api/session/delete route handlers) still gated on the old lowercase-only character set. That would have shipped a confusing UX where api-* and reachy-voice-* sessions could be loaded into the sidebar but rejected with HTTP 400 on delete or worktree removal. This commit factors the validation into a single is_safe_session_id helper in api.models and updates all five call sites to use it. Adds regression coverage in tests/test_issue3023_safe_session_id_validators.py for both the helper itself and a repo-wide guarantee that no narrow lowercase-only magic string survives. Closes the follow-up flagged by the parallel reviewer agent on #3023.