HERMES-GIELIE/api
nesquena-hermes a3647570fb
fix: persist onboarding_completed for CLI-configured users on first chat_ready (#922)
* fix: persist onboarding_completed for CLI-configured users on first chat_ready (v0.50.179, #921)

Co-authored-by: bsgdigital

* fix(onboarding): don't 500 the status endpoint if save_settings fails

The #921 persist call `save_settings({"onboarding_completed": True})` in
get_onboarding_status() raises if the settings.json write fails
(read-only filesystem, disk full, permission error). That turns every
/api/onboarding/status call into a 500 until the disk is writable,
which is much worse UX than losing the persistence-across-restart guard.

Wrapped in try/except so persistence becomes best-effort. The function
still sets settings["onboarding_completed"] = True in memory on success,
and `completed` reflects `config_auto_completed` on this request either
way, so the user sees the right state even when the write fails — only
the next-restart protection degrades.

Added regression test that patches save_settings to raise OSError and
asserts the endpoint still returns completed=True without raising.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: nesquena-hermes <nesquena-hermes@users.noreply.github.com>
Co-authored-by: Nathan Esquenazi <nesquena@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 15:46:02 -07: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 release: v0.50.102–v0.50.108 batch (code blocks, utf-8, image URLs, deletion warning, PermissionError, Docker docs, kimi-k2.5) (#755) 2026-04-20 00:26:55 -07:00
clarify.py feat: harden clarify dialog flow and refresh recovery 2026-04-15 13:10:50 +08:00
commands.py feat: slash command parity + skill autocomplete — v0.50.91 (PR #711) 2026-04-19 05:37:44 +00:00
config.py fix(models): duplicate dropdown entries, stale default model, lowercase injected label (#907 #908 #909) (#918) 2026-04-23 14:41:06 -07:00
gateway_watcher.py fix(sessions): surface gateway SSE failures and add polling fallback (#828) 2026-04-21 21:18:55 -07:00
helpers.py fix: correct webui profile switching state — v0.50.150 (PR #849 by @migueltavares) 2026-04-22 16:27:01 +00:00
models.py fix: harden session persistence and per-session lock handling during streaming (v0.50.175, #910) (#910) 2026-04-23 14:25:43 -07:00
onboarding.py fix: persist onboarding_completed for CLI-configured users on first chat_ready (#922) 2026-04-23 15:46:02 -07:00
profiles.py fix(profiles): complete profile isolation via cookie + thread-local (#805) 2026-04-21 17:04:11 +00:00
providers.py fix(ci): eliminate test_set_key flakiness — v0.50.161 2026-04-23 02:09:37 +00:00
routes.py feat: add PWA support (manifest, service worker, install prompt) (#920) 2026-04-23 15:14:21 -07:00
session_ops.py fix: harden session persistence and per-session lock handling during streaming (v0.50.175, #910) (#910) 2026-04-23 14:25:43 -07:00
startup.py fix(security): gate auto-install behind HERMES_WEBUI_AUTO_INSTALL=1 — v0.50.156 2026-04-22 20:49:28 +00:00
state_sync.py security: bandit fixes B310/B324/B110 + QuietHTTPServer (#354) 2026-04-13 11:11:56 -07:00
streaming.py fix: harden session persistence and per-session lock handling during streaming (v0.50.175, #910) (#910) 2026-04-23 14:25:43 -07:00
updates.py fix: update banner — conflict recovery path + server self-restart after update (#816) 2026-04-21 17:10:41 -07:00
upload.py v0.50.25: mobile scroll, import timestamps, profile security, mic fallback (#404) 2026-04-13 22:11:45 -07:00
workspace.py feat(workspaces): autocomplete trusted workspace paths — v0.50.162 (PR #880 by @franksong2702, closes #616) 2026-04-23 02:35:58 +00:00