fix(state): route the remaining model_config marker reads through _sql_json_extract
Sibling widening of the #101726 salvage: FTS_TRIGRAM_SESSION_SQL (trigram view/triggers/backfill), the v16 delegate-tagging data migration and reopen_session's legacy reset-child stamp still called json_extract() on the raw model_config cell, so one malformed JSON row could still abort FTS maintenance, a schema migration or /resume of a reset child. Zero raw model_config json_extract reads remain in hermes_state_*.py.
This commit is contained in:
@@ -454,8 +454,7 @@ class SessionSessionsMixin:
|
||||
conn.execute(
|
||||
"UPDATE sessions AS child SET model_config = json_set("
|
||||
"COALESCE(child.model_config, '{}'), '$._reset_from', child.parent_session_id) "
|
||||
"WHERE child.parent_session_id = ? AND json_extract(COALESCE(child.model_config, '{}'), "
|
||||
" '$._reset_from') IS NULL "
|
||||
f"WHERE child.parent_session_id = ? AND {_sql_json_extract('child.model_config', '$._reset_from')} IS NULL "
|
||||
f"AND {_legacy_reset_child_sql('child', _session_ids_placeholders(_RESET_END_REASONS))}",
|
||||
(session_id, *_RESET_END_REASONS),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user