Repository navigation
Conversation
|
Summary
Review
Follow-up (PR body)
|
dylan-hurd-oai
left a comment
There was a problem hiding this comment.
1 comment about our error state, otherwise +++ for parallelization
|
|
||
| RolloutResult { | ||
| session_id: Uuid::new_v4(), | ||
| rollout_recorder: None, |
There was a problem hiding this comment.
Won't this just eventually panic when we call record_state_snapshot later on, which uses unwrap?
There was a problem hiding this comment.
In record_state_snapshot(), assuming you are referring to:
let recorder = {
let guard = self.rollout.lock().unwrap();
guard.as_ref().cloned()
};
the unwrap() is not on the Option<RolloutRecorder>, but on Mutex<Option<RolloutRecorder>> (which is understandably confusing).
In that case, the unwrap() is with respect to getting access to the Mutex, not pulling the value from the Option.
There was a problem hiding this comment.
ah, yep - makes sense!
| .await; | ||
| sess.sandbox_policy.clone(), | ||
| ))); | ||
| sess.record_conversation_items(&conversation_items).await; |
There was a problem hiding this comment.
LGTM - thanks for consolidating
#2291 made it so that
Session::new()is on the critical path toCodex::spawn(), which means it is on the hot path to CLI startup. This refactorsSession::new()to run a number of async tasks in parallel that were previously run serially to try to reduce latency.