aKode fase 5: rinomina interna (crate akode-*, akode-rs/, akode-cli/, binario akode, AKODE_*, ~/.akode, snapshot)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-11 11:06:46 +01:00
parent df99318392
commit 86e7c72e5f
10383 changed files with 749164 additions and 749170 deletions

View File

@@ -0,0 +1,35 @@
//! Desktop storage policies are exposed through the public requirements API.
use anyhow::Result;
use app_test_support::TestAppServer;
use pretty_assertions::assert_eq;
use serde_json::json;
/// Desktop can obtain enforced storage paths before creating its first workspace.
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn desktop_storage_requirements_are_exposed() -> Result<()> {
let home = tempfile::tempdir()?;
let projects = home.path().join("projects");
let chats = home.path().join("chats");
std::fs::write(
home.path().join("requirements.toml"),
format!(
"[application.storage]\ndefault_project_parent = '{}'\nprojectless_workspace_root = '{}'",
projects.display(),
chats.display(),
),
)?;
let mut server = TestAppServer::builder()
.with_codex_home(home.path())
.build_initialized()
.await?;
let id = server.send_config_requirements_read_request().await?;
let response: serde_json::Value = server.read_response(id).await?;
assert_eq!(
response["requirements"]["application"]["storage"],
json!({
"defaultProjectParent": projects, "projectlessWorkspaceRoot": chats,
})
);
Ok(())
}