diff --git a/codex-rs/core/src/codex_tests.rs b/codex-rs/core/src/codex_tests.rs index 268972a8cd..845d159cf0 100644 --- a/codex-rs/core/src/codex_tests.rs +++ b/codex-rs/core/src/codex_tests.rs @@ -4303,6 +4303,10 @@ async fn rejects_escalated_permissions_when_policy_not_on_request() { network: None, sandbox_permissions, windows_sandbox_level: turn_context.windows_sandbox_level, + windows_sandbox_private_desktop: turn_context + .config + .permissions + .windows_sandbox_private_desktop, justification: Some("test".to_string()), arg0: None, }; @@ -4315,6 +4319,10 @@ async fn rejects_escalated_permissions_when_policy_not_on_request() { env: HashMap::new(), network: None, windows_sandbox_level: turn_context.windows_sandbox_level, + windows_sandbox_private_desktop: turn_context + .config + .permissions + .windows_sandbox_private_desktop, justification: params.justification.clone(), arg0: None, }; diff --git a/codex-rs/core/src/plugins/render_tests.rs b/codex-rs/core/src/plugins/render_tests.rs index 24af2257d9..75d374ecf6 100644 --- a/codex-rs/core/src/plugins/render_tests.rs +++ b/codex-rs/core/src/plugins/render_tests.rs @@ -8,16 +8,16 @@ fn render_plugin_instructions_returns_none_for_empty_plugins() { #[test] fn render_plugins_section_includes_descriptions_and_skill_naming_guidance() { - let rendered = render_plugins_section(&[PluginCapabilitySummary { + let rendered = render_plugin_instructions(&[PluginCapabilitySummary { config_name: "sample@test".to_string(), display_name: "sample".to_string(), description: Some("inspect sample data".to_string()), has_skills: true, ..PluginCapabilitySummary::default() }]) - .expect("plugin section should render"); + .unwrap_or_else(|| panic!("plugin section should render")); let expected = "## Plugins\nA plugin is a local bundle of skills, MCP servers, and apps. Below is the list of plugins that are enabled and available in this session.\n### Available plugins\n- `sample`: inspect sample data\n### How to use plugins\n- Discovery: The list above is the plugins available in this session.\n- Skill naming: If a plugin contributes skills, those skill entries are prefixed with `plugin_name:` in the Skills list.\n- Trigger rules: If the user explicitly names a plugin, prefer capabilities associated with that plugin for that turn.\n- Relationship to capabilities: Plugins are not invoked directly. Use their underlying skills, MCP tools, and app tools to help solve the task.\n- Preference: When a relevant plugin is available, prefer using capabilities associated with that plugin over standalone capabilities that provide similar functionality.\n- Missing/blocked: If the user requests a plugin that is not listed above, or the plugin does not have relevant callable capabilities for the task, say so briefly and continue with the best fallback."; - assert_eq!(rendered, expected); + assert_eq!(rendered.text, expected); } diff --git a/codex-rs/core/tests/suite/prompt_caching.rs b/codex-rs/core/tests/suite/prompt_caching.rs index a1b2ad3062..82396efbe1 100644 --- a/codex-rs/core/tests/suite/prompt_caching.rs +++ b/codex-rs/core/tests/suite/prompt_caching.rs @@ -73,9 +73,10 @@ fn assert_default_env_context(text: &str, cwd: &str, shell: &Shell) { } fn message_input_texts(value: &serde_json::Value) -> Vec<&str> { - value["content"] - .as_array() - .expect("message content array") + let Some(content) = value["content"].as_array() else { + panic!("message content array"); + }; + content .iter() .filter_map(|entry| entry["text"].as_str()) .collect()