mirror of
https://github.com/openai/codex.git
synced 2026-09-13 11:47:17 +00:00
codex: fix CI failure on PR #15226
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -518,6 +518,36 @@ impl GuardianReviewSessionManager {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) async fn cache_for_test(&self, codex: Codex) {
|
||||
let reuse_key = GuardianReviewSessionReuseKey::from_spawn_config(
|
||||
codex.session.get_config().await.as_ref(),
|
||||
);
|
||||
self.state.lock().await.trunk = Some(Arc::new(GuardianReviewSession {
|
||||
reuse_key,
|
||||
codex,
|
||||
cancel_token: CancellationToken::new(),
|
||||
review_lock: Mutex::new(()),
|
||||
last_committed_rollout_items: Mutex::new(None),
|
||||
}));
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) async fn register_fork_for_test(&self, codex: Codex) {
|
||||
let reuse_key = GuardianReviewSessionReuseKey::from_spawn_config(
|
||||
codex.session.get_config().await.as_ref(),
|
||||
);
|
||||
self.fork_pool
|
||||
.register(Arc::new(GuardianReviewSession {
|
||||
reuse_key,
|
||||
codex,
|
||||
cancel_token: CancellationToken::new(),
|
||||
review_lock: Mutex::new(()),
|
||||
last_committed_rollout_items: Mutex::new(None),
|
||||
}))
|
||||
.await;
|
||||
}
|
||||
|
||||
async fn choose_review_lane<'a>(
|
||||
&self,
|
||||
trunk: &'a Arc<GuardianReviewSession>,
|
||||
|
||||
Reference in New Issue
Block a user