merge upstream/dev/friel/watchdog-runtime-and-prompts into collab stack

This commit is contained in:
Friel
2026-03-30 01:53:08 +00:00
58 changed files with 4043 additions and 426 deletions

View File

@@ -596,10 +596,10 @@ impl RolloutRecorder {
Ok((items, thread_id, parse_errors))
}
/// Load a rollout for resume semantics.
/// Load a rollout for resuming the same thread.
///
/// This preserves the rollout's existing conversation id and rollout path, so callers must
/// not use it for true forking semantics.
/// This preserves the rollout's existing conversation id and rollout path, so callers
/// must not use it for true forking semantics.
pub async fn get_rollout_history(path: &Path) -> std::io::Result<InitialHistory> {
let (items, thread_id, _parse_errors) = Self::load_rollout_items(path).await?;
let conversation_id = thread_id
@@ -617,10 +617,11 @@ impl RolloutRecorder {
}))
}
/// Load a rollout for true fork semantics.
/// Load a rollout for forking into a distinct thread.
///
/// Unlike `get_rollout_history`, this intentionally discards the source rollout's
/// conversation id so the child thread gets a fresh id and preserves `forked_from_id`.
/// conversation id so `Codex::spawn` allocates a fresh thread id and rollout path for
/// the child.
pub async fn get_fork_history(path: &Path) -> std::io::Result<InitialHistory> {
let (items, _thread_id, _parse_errors) = Self::load_rollout_items(path).await?;