WIP fase 2b-3: rimozione sottosistemi solo-ChatGPT (plugin remoti, image gen, daybreak, cyber, attestation, cloud config, app/connettori) - test in corso

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-10 16:07:22 +01:00
parent 231e8cd136
commit 5afc7e9f7f
1223 changed files with 6225 additions and 113722 deletions

View File

@@ -7,7 +7,7 @@ use tokio::sync::Notify;
struct PausedExecutor {
entered: Notify,
resume: Notify,
queries: Mutex<Vec<(bool, bool)>>,
queries: Mutex<Vec<bool>>,
}
impl SkillProvider for PausedExecutor {
@@ -16,7 +16,7 @@ impl SkillProvider for PausedExecutor {
self.queries
.lock()
.unwrap_or_else(std::sync::PoisonError::into_inner)
.push((query.include_bundled_skills, query.include_cloud_skills));
.push(query.include_bundled_skills);
self.entered.notify_one();
self.resume.notified().await;
Ok(SkillCatalog::default())
@@ -36,31 +36,13 @@ impl SkillProvider for PausedExecutor {
}
#[tokio::test]
async fn config_reload_during_preparation_applies_to_next_step_but_reads_still_check_live_policy()
-> TestResult {
async fn config_reload_during_preparation_applies_to_next_step() -> TestResult {
let executor = Arc::new(PausedExecutor {
entered: Notify::new(),
resume: Notify::new(),
queries: Mutex::default(),
});
let cloud = test_entry(
SkillSourceKind::Cloud,
"codex_apps",
"cloud/demo",
"skill://cloud/demo/SKILL.md",
);
let cloud_reads = Arc::default();
let providers = SkillProviders::new()
.with_executor_provider(executor.clone())
.with_cloud_provider(Arc::new(StaticSkillProvider {
catalog: SkillCatalog {
entries: vec![cloud],
..Default::default()
},
read_requests: Arc::clone(&cloud_reads),
list_calls: None,
fail_first_list: false,
}));
let providers = SkillProviders::new().with_executor_provider(executor.clone());
let mut builder = ExtensionRegistryBuilder::new();
install_with_providers(&mut builder, providers, skills_extension_config);
let registry = builder.build();
@@ -69,7 +51,6 @@ async fn config_reload_during_preparation_applies_to_next_step_but_reads_still_c
let turn = ExtensionData::new("turn");
let config = default_config();
let updated = TestConfig {
cloud_skill_enabled: false,
bundled_skills_enabled: false,
..config.clone()
};
@@ -96,8 +77,8 @@ async fn config_reload_during_preparation_applies_to_next_step_but_reads_still_c
let step = ExtensionData::new("step");
let next_step = ExtensionData::new("next-step");
let model_info = catalog_model_info();
for (store, expected_enabled) in [(&step, true), (&next_step, false)] {
let (sections, ()) = tokio::join!(
for store in [&step, &next_step] {
let (_sections, ()) = tokio::join!(
prepared_world_state(
&registry,
&roots,
@@ -121,30 +102,10 @@ async fn config_reload_during_preparation_applies_to_next_step_but_reads_still_c
executor.resume.notify_one();
}
);
let rendered = sections
.iter()
.filter_map(|section| section.render_diff(PreviousWorldStateSection::Absent).1)
.map(|fragment| fragment.body().clone().expect_text())
.collect::<Vec<_>>()
.join("\n");
assert_eq!(
rendered.contains("cloud/demo"),
expected_enabled,
"{rendered}"
);
}
assert_eq!(
*executor.queries.lock().unwrap(),
vec![(true, true), (false, false)]
vec![true, false]
);
let tools = registry.tool_contributors()[0].tools_for_step(&session, &thread, &step);
let result = merge_catalog_tests::call_tool(
&tools,
"read",
serde_json::json!({"package": "cloud/demo"}),
)
.await;
assert_matches!(result, Err(FunctionCallError::RespondToModel(message)) if message == "failed to read skill resource");
assert!(read_request_keys(&cloud_reads).is_empty());
Ok(())
}