codex: fix developer instructions test config (#16976)

This commit is contained in:
Ahmed Ibrahim
2026-04-06 21:35:40 -07:00
parent d15c7117f8
commit 95212286d8
2 changed files with 16 additions and 2 deletions

View File

@@ -202,7 +202,14 @@ async fn thread_fork_honors_explicit_null_thread_instructions() -> Result<()> {
create_config_toml(codex_home.path(), &server.uri())?;
let config_path = codex_home.path().join("config.toml");
let mut config_toml = std::fs::read_to_string(&config_path)?;
config_toml.push_str("\ndeveloper_instructions = \"Config developer instructions sentinel\"\n");
let provider_table = "\n[model_providers.mock_provider]";
let provider_table_index = config_toml
.find(provider_table)
.expect("test config must include mock provider table");
config_toml.insert_str(
provider_table_index,
"\ndeveloper_instructions = \"Config developer instructions sentinel\"\n",
);
std::fs::write(config_path, config_toml)?;
let conversation_id = create_fake_rollout(

View File

@@ -168,7 +168,14 @@ async fn turn_start_honors_explicit_null_thread_instructions() -> Result<()> {
create_config_toml(codex_home.path(), &server.uri(), "never", &BTreeMap::new())?;
let config_path = codex_home.path().join("config.toml");
let mut config_toml = std::fs::read_to_string(&config_path)?;
config_toml.push_str("\ndeveloper_instructions = \"Config developer instructions sentinel\"\n");
let provider_table = "\n[model_providers.mock_provider]";
let provider_table_index = config_toml
.find(provider_table)
.expect("test config must include mock provider table");
config_toml.insert_str(
provider_table_index,
"\ndeveloper_instructions = \"Config developer instructions sentinel\"\n",
);
std::fs::write(config_path, config_toml)?;
let mut mcp = McpProcess::new(codex_home.path()).await?;