Remove the deprecated thread/rollback API (#44915)

## What changed

Remove `thread/rollback`, its request and response types, generated bindings, and the core `Op::ThreadRollback` operation. Requests now follow the generic unknown-method rejection path. Document `thread/revert` as the alternative for paginated threads.

Keep historical `ThreadRolledBack` markers and legacy error deserialization so existing rollouts remain compatible with replay and migration.

## Testing

Adapt retained-context and Guardian history tests to append legacy rollback markers and resume threads, preserving coverage of surviving instructions, answers, and review history.

GitOrigin-RevId: b3da1becdf86b1869275aacb0ffc2817cee5af2e
This commit is contained in:
Owen Lin authored and copyberry committed 2026-09-11 21:32:04 +00:00
1 parent c62d191c4c
commit 3052bbcf8c
65 files changed
+124 -5472

No files matched your search

-24
View File
@@ -98,7 +98,6 @@ pub(crate) struct TurnSummary {
#[derive(Default)]
pub(crate) struct ThreadState {
pub(crate) pending_interrupts: PendingInterruptQueue,
pub(crate) pending_rollbacks: Option<(ConnectionRequestId, oneshot::Sender<()>)>,
pub(crate) turn_summary: TurnSummary,
pub(crate) last_terminal_turn_id: Option<String>,
/// Lets an internal runtime replacement wait until the old listener has processed Core's
@@ -146,7 +145,6 @@ impl ThreadState {
let _ = cancel_tx.send(());
}
self.shutdown_drain_waiter = None;
self.pending_rollbacks = None;
self.listener_command_tx = None;
self.current_turn_history.reset();
self.listener_thread = None;
@@ -251,28 +249,6 @@ mod tests {
use codex_utils_absolute_path::AbsolutePathBuf;
use pretty_assertions::assert_eq;
#[test]
fn clear_listener_releases_pending_rollback() {
let (completion_tx, mut completion_rx) = oneshot::channel();
let mut state = ThreadState {
pending_rollbacks: Some((
ConnectionRequestId {
connection_id: ConnectionId(1),
request_id: RequestId::Integer(1),
},
completion_tx,
)),
..Default::default()
};
state.clear_listener();
assert_eq!(
completion_rx.try_recv(),
Err(oneshot::error::TryRecvError::Closed)
);
}
#[test]
fn note_thread_settings_reports_only_effective_changes() {
let mut state = ThreadState::default();