This commit is contained in:
jimmyfraiture
2025-09-29 13:08:17 +01:00
parent 6283dc42f8
commit 8a7f75eeef
4 changed files with 16 additions and 14 deletions
+2 -1
View File
@@ -111,7 +111,8 @@ pub async fn find_conversation_path_by_id_str(
}
let limit = NonZero::new(1).ok_or_else(|| io::Error::other("search limit must be non-zero"))?;
let threads = NonZero::new(2).ok_or_else(|| io::Error::other("thread pool size must be non-zero"))?;
let threads =
NonZero::new(2).ok_or_else(|| io::Error::other("thread pool size must be non-zero"))?;
let cancel = Arc::new(AtomicBool::new(false));
let exclude: Vec<String> = Vec::new();
let compute_indices = false;
+4 -8
View File
@@ -560,13 +560,6 @@ impl Session {
startup_errors,
..
} = bootstrap;
let post_session_configured_error_events: Vec<Event> = startup_errors
.into_iter()
.map(|message| Event {
id: INITIAL_SUBMIT_ID.to_owned(),
msg: EventMsg::Error(ErrorEvent { message }),
})
.collect();
// Create the mutable state for the Session.
let state = SessionState::new();
@@ -599,7 +592,10 @@ impl Session {
rollout_path,
}),
})
.chain(post_session_configured_error_events.into_iter());
.chain(startup_errors.into_iter().map(|message| Event {
id: INITIAL_SUBMIT_ID.to_owned(),
msg: EventMsg::Error(ErrorEvent { message }),
}));
for event in events {
sess.send_event(event).await;
}
+6 -3
View File
@@ -25,9 +25,12 @@ async fn user_info_returns_email_from_auth_json() {
let codex_home = TempDir::new().expect("create tempdir");
let auth_path = get_auth_file(codex_home.path());
let mut id_token = IdTokenInfo::default();
id_token.email = Some("user@example.com".to_string());
id_token.raw_jwt = encode_id_token_with_email("user@example.com").expect("encode id token");
let raw_jwt = encode_id_token_with_email("user@example.com").expect("encode id token");
let id_token = IdTokenInfo {
email: Some("user@example.com".to_string()),
raw_jwt,
..IdTokenInfo::default()
};
let auth = AuthDotJson {
openai_api_key: None,
+4 -2
View File
@@ -590,8 +590,10 @@ mod tests {
AuthMode::ChatGPT => {
// Minimal valid JWT payload: header.payload.signature (all base64url, no padding)
const FAKE_JWT: &str = "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.e30.c2ln"; // {"alg":"none","typ":"JWT"}.{}."sig"
let mut id_info = IdTokenInfo::default();
id_info.raw_jwt = FAKE_JWT.to_string();
let id_info = IdTokenInfo {
raw_jwt: FAKE_JWT.to_string(),
..IdTokenInfo::default()
};
let auth = AuthDotJson {
openai_api_key: None,
tokens: Some(TokenData {