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
Contributor

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>
@BigPizzaV3

Copy link
Copy Markdown
Owner

Codex++ maintainer review note

当前 main 下这个 PR 仍存在 merge conflict,暂时不能合并。请先 rebase 到最新 main 并解决冲突;更新后我们会重新跑针对性测试再复审。

This PR currently conflicts with main, so it is not mergeable yet. Please rebase onto the latest main and resolve the conflicts, then we can review and test it again.

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.

2 participants