fix(state): add immutable created_source provenance column (#56439)
Gateway /resume rewrites sessions.source to the resuming platform, which is correct routing behavior (source feeds find_latest_gateway_session_for_peer, Telegram listings, and the TUI ghost pruner) but destroys creation provenance. Add a separate immutable created_source column stamped once at session creation and preserved by all upsert paths; surface it in hermes sessions list as '<created>→<current>' when the two diverge. Fixes #56439
This commit is contained in:
@@ -362,6 +362,7 @@ CREATE TABLE IF NOT EXISTS system_prompts (
|
||||
CREATE TABLE IF NOT EXISTS sessions (
|
||||
id TEXT PRIMARY KEY,
|
||||
source TEXT NOT NULL,
|
||||
created_source TEXT,
|
||||
user_id TEXT,
|
||||
session_key TEXT,
|
||||
chat_id TEXT,
|
||||
|
||||
Reference in New Issue
Block a user