fix: harden WebUI bugfix sweep
This commit is contained in:
@@ -594,6 +594,8 @@ class Session:
|
||||
self.truncation_watermark = None
|
||||
|
||||
def save(self, touch_updated_at: bool = True, skip_index: bool = False) -> None:
|
||||
if not is_safe_session_id(self.session_id):
|
||||
raise ValueError(f"Unsafe session_id {self.session_id!r}; refusing to write outside session store")
|
||||
# ── #1558 P0 guard ──────────────────────────────────────────────
|
||||
# Refuse to save a session that was loaded with metadata_only=True.
|
||||
# Such sessions have messages=[] (it's the whole point of the partial
|
||||
|
||||
Reference in New Issue
Block a user