codex: fix personality instruction assertions (#16964)

This commit is contained in:
Ahmed Ibrahim
2026-04-06 20:36:58 -07:00
parent 3047ae3fb2
commit 585450b16b
2 changed files with 3 additions and 7 deletions
@@ -1772,7 +1772,6 @@ async fn thread_resume_accepts_personality_override() -> Result<()> {
let start_id = primary
.send_thread_start_request(ThreadStartParams {
model: Some("gpt-5.2-codex".to_string()),
base_instructions: Some(Some(CODEX_5_2_INSTRUCTIONS_TEMPLATE_DEFAULT.to_string())),
..Default::default()
})
.await?;
@@ -1811,7 +1810,6 @@ async fn thread_resume_accepts_personality_override() -> Result<()> {
.send_thread_resume_request(ThreadResumeParams {
thread_id: thread.id,
model: Some("gpt-5.2-codex".to_string()),
base_instructions: Some(Some(CODEX_5_2_INSTRUCTIONS_TEMPLATE_DEFAULT.to_string())),
personality: Some(Personality::Friendly),
..Default::default()
})
@@ -1041,12 +1041,10 @@ async fn turn_start_uses_migrated_pragmatic_personality_without_override_v2() ->
.await??;
let request = response_mock.single_request();
let developer_texts = request.message_input_texts("developer");
let instructions_text = request.instructions_text();
assert!(
developer_texts
.iter()
.any(|text| text.contains(LOCAL_PRAGMATIC_TEMPLATE)),
"expected startup-migrated pragmatic personality in developer instructions, got: {developer_texts:?}"
instructions_text.contains(LOCAL_PRAGMATIC_TEMPLATE),
"expected startup-migrated pragmatic personality in model instructions, got: {instructions_text:?}"
);
Ok(())