Skip to content

fix(sessions): validate transcript snapshot before sync replacement - #124456

Closed
synthalorian wants to merge 1 commit into
openclaw:mainfrom
synthalorian:fix/issue-124393-transcript-snapshot
Closed

synthalorian wants to merge 1 commit into
openclaw:mainfrom
synthalorian:fix/issue-124393-transcript-snapshot

Conversation

@synthalorian

Copy link
Copy Markdown
Contributor

What Problem This Solves

replaceTranscriptEventsSync rewrote the whole transcript without validating the transcript row snapshot, so a transcript row committed by another writer between the SessionManager's last append and the rewrite was deleted with no error and a true (success) return.

Root Cause

The sync replacement path didn't validate the transcript snapshot before replacing, unlike the async sibling which refuses the write with SqliteTranscriptMutationConflictError.

Fix

Add snapshot validation before replacement to prevent deleting concurrently committed rows.

Evidence

Fixes #124393

replaceTranscriptEventsSync rewrote the whole transcript without
validating the transcript row snapshot, so a transcript row committed by
another writer between the SessionManager's last append and the rewrite
was deleted with no error and a true (success) return.

Add snapshot validation before replacement to prevent deleting
concurrently committed rows.

Fixes openclaw#124393
@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle

Copy link
Copy Markdown

Closing this PR because the author has more than 20 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

r: too-many-prs Auto-close: author has more than twenty active PRs. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sessions: sync transcript rewrite deletes concurrently committed transcript rows and reports success

1 participant