fix(transcript): recognize Agent _row_id during replay merge (#7133)
* fix(transcript): recognize agent row ids in replay merge * Strip imported _row_id so replay merge cannot trust caller provenance. Session import already dropped _state_db_row_id aliases. After treating Agent _row_id as identity, the same public/import scrubber must drop that field too, or a crafted import can collide with a later state.db turn. --------- Co-authored-by: Anthony Ruiz <ruizanthony@users.noreply.github.com> Co-authored-by: nesquena-hermes <nesquena+hermes@gmail.com>
This commit is contained in:
3 files changed
+93
-2
No files matched your search
+1
-1
@@ -8646,7 +8646,7 @@ def _state_db_row_identity_details(message: dict | None) -> tuple[str | None, bo
|
||||
if not isinstance(message, dict):
|
||||
return None, True
|
||||
values = set()
|
||||
for key in ("_state_db_row_id", "_db_row_id", "state_db_row_id"):
|
||||
for key in ("_row_id", "_state_db_row_id", "_db_row_id", "state_db_row_id"):
|
||||
if key not in message or message.get(key) in (None, ""):
|
||||
continue
|
||||
value = message.get(key)
|
||||
|
||||
Reference in new issue
Block a user