From 2fcab541c777465d33b851a80a197c3a6a6af621 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Mon, 16 Mar 2026 12:01:25 -0700 Subject: [PATCH] fix: bootstrap resume_keywords.yaml on first cloud session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New cloud users got a "resume_keywords.yaml not found" warning in Settings → Skills & Keywords because the file was never created during account provisioning. resolve_session() now writes an empty scaffold (skills/domains/keywords: []) to the user's config dir on first visit if the file doesn't exist, consistent with how config/ and data/ dirs are already created. Never overwrites an existing file. --- app/cloud_session.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/cloud_session.py b/app/cloud_session.py index 527fadb..e5a3ed8 100644 --- a/app/cloud_session.py +++ b/app/cloud_session.py @@ -165,9 +165,15 @@ def resolve_session(app: str = "peregrine") -> None: user_path = _user_data_path(user_id, app) user_path.mkdir(parents=True, exist_ok=True) - (user_path / "config").mkdir(exist_ok=True) + config_path = user_path / "config" + config_path.mkdir(exist_ok=True) (user_path / "data").mkdir(exist_ok=True) + # Bootstrap config files that the UI requires to exist — never overwrite + _kw = config_path / "resume_keywords.yaml" + if not _kw.exists(): + _kw.write_text("skills: []\ndomains: []\nkeywords: []\n") + st.session_state["user_id"] = user_id st.session_state["db_path"] = user_path / "staging.db" st.session_state["db_key"] = derive_db_key(user_id)