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:
authored and GitHub committed 2026-08-20 01:01:10 +00:00
1 parent fc1dc3a52f
commit 43bcdcf97f
3 files changed
+93 -2

No files matched your search

+1 -1
View File
@@ -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)