mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
Skip host skill discovery in the remote command approval test (#64827)
## Why An empty extension registry falls back to legacy host skill discovery even when `SkipHostSkillDiscovery` is enabled. The remote command approval test only needs to check plugin attribution when script reads are denied. ## What changed Enable `SkipHostSkillDiscovery` and register the skills extension with no providers in both variants of `remote_command_approval_skips_attribution_for_a_read_denied_script`. GitOrigin-RevId: 1abcf6a762ac359825fe1c4db97160b9bfde0f87
This commit is contained in:
@@ -109,15 +109,19 @@ const REMOTE_PLUGIN_CONFIG_NAME: &str = "sample@openai-curated-remote";
|
||||
|
||||
fn skills_extensions() -> Arc<ExtensionRegistry<Config>> {
|
||||
let mut extensions = ExtensionRegistryBuilder::<Config>::new();
|
||||
install(&mut extensions, |config: &Config| SkillsExtensionConfig {
|
||||
install(&mut extensions, skills_extension_config);
|
||||
Arc::new(extensions.build())
|
||||
}
|
||||
|
||||
fn skills_extension_config(config: &Config) -> SkillsExtensionConfig {
|
||||
SkillsExtensionConfig {
|
||||
include_instructions: config.include_skill_instructions,
|
||||
catalog_deltas_enabled: config.features.enabled(Feature::SkillCatalogDeltas),
|
||||
omit_descriptions: false,
|
||||
max_context_tokens: config.skill_max_context_tokens,
|
||||
bundled_skills_enabled: config.bundled_skills_enabled(),
|
||||
cloud_skill_enabled: config.cloud_skill_enabled,
|
||||
});
|
||||
Arc::new(extensions.build())
|
||||
}
|
||||
}
|
||||
|
||||
fn sample_plugin_root(home: &TempDir) -> std::path::PathBuf {
|
||||
@@ -793,7 +797,15 @@ async fn remote_command_approval_skips_attribution_for_a_read_denied_script(
|
||||
)
|
||||
.await;
|
||||
let base_url = server.uri();
|
||||
// An empty registry requests legacy host skill discovery even with the opt-out.
|
||||
let mut extensions = ExtensionRegistryBuilder::new();
|
||||
codex_skills_extension::install_with_providers(
|
||||
&mut extensions,
|
||||
codex_skills_extension::SkillProviders::new(),
|
||||
skills_extension_config,
|
||||
);
|
||||
let test = test_codex()
|
||||
.with_extensions(Arc::new(extensions.build()))
|
||||
.with_home(home)
|
||||
.with_model("gpt-5.2")
|
||||
.with_exec_server_url(executor.websocket_url.clone())
|
||||
@@ -801,6 +813,10 @@ async fn remote_command_approval_skips_attribution_for_a_read_denied_script(
|
||||
.with_config(move |config| {
|
||||
config.chatgpt_base_url = base_url;
|
||||
config.approvals_reviewer = ApprovalsReviewer::User;
|
||||
config
|
||||
.features
|
||||
.enable(Feature::SkipHostSkillDiscovery)
|
||||
.unwrap();
|
||||
config
|
||||
.features
|
||||
.enable(Feature::RequestPermissionsTool)
|
||||
|
||||
Reference in New Issue
Block a user