Skip to content

fix: keep session deletion and rollouts consistent#1419

Open
superman2003 wants to merge 1 commit into
BigPizzaV3:mainfrom
superman2003:codex/fix-session-delete-atomicity
Open

fix: keep session deletion and rollouts consistent#1419
superman2003 wants to merge 1 commit into
BigPizzaV3:mainfrom
superman2003:codex/fix-session-delete-atomicity

Conversation

@superman2003

Copy link
Copy Markdown

Summary

  • keep Codex thread row deletion inside the SQLite transaction until rollout files are removed
  • restore rollout backups if file deletion or transaction commit fails
  • restore files before undoing database rows and remove partial restores when the database transaction fails

Test plan

  • cargo fmt --all -- --check
  • cargo test -p codex-plus-data --lib storage::tests -- --test-threads=1 (2 passed)
  • cargo test -p codex-plus-data --test storage_adapter -j 1 -- --test-threads=1 (19 passed)
  • cargo check -p codex-plus-data -j 1

Coordinate SQLite transactions with rollout file removal and compensate failed delete or undo operations from the existing backup.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant