aKode: eliminato chatgpt_base_url ormai inutilizzato
- La chiave è ancora accettata nei file di configurazione ma ignorata. - Schemi JSON e TypeScript dell'app-server rigenerati; i bundle ora si chiamano akode_app_server_protocol*.schemas.json, come produce il generatore. - app-server: niente più avviso unused_mut nella build release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -157,17 +157,10 @@ review_domains = ["review.example.com"]
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn managed_auth_settings_are_exposed_enforced_and_read_only() -> Result<()> {
|
||||
let codex_home = TempDir::new()?;
|
||||
write_config(
|
||||
&codex_home,
|
||||
r#"cli_auth_credentials_store = "file"
|
||||
chatgpt_base_url = "https://user.example/backend-api/"
|
||||
"#,
|
||||
)?;
|
||||
write_config(&codex_home, "cli_auth_credentials_store = \"file\"\n")?;
|
||||
std::fs::write(
|
||||
codex_home.path().join("requirements.toml"),
|
||||
r#"cli_auth_credentials_store = "ephemeral"
|
||||
chatgpt_base_url = "https://managed.example/backend-api/"
|
||||
"#,
|
||||
"cli_auth_credentials_store = \"ephemeral\"\n",
|
||||
)?;
|
||||
let mut app_server = TestAppServer::builder()
|
||||
.with_codex_home(codex_home.path())
|
||||
@@ -183,14 +176,8 @@ chatgpt_base_url = "https://managed.example/backend-api/"
|
||||
.await??;
|
||||
let requirements = requirements.requirements.expect("managed requirements");
|
||||
assert_eq!(
|
||||
(
|
||||
requirements.cli_auth_credentials_store,
|
||||
requirements.chatgpt_base_url.as_deref(),
|
||||
),
|
||||
(
|
||||
Some(CliAuthCredentialsStoreMode::Ephemeral),
|
||||
Some("https://managed.example/backend-api/"),
|
||||
),
|
||||
requirements.cli_auth_credentials_store,
|
||||
Some(CliAuthCredentialsStoreMode::Ephemeral),
|
||||
);
|
||||
|
||||
let config_id = app_server
|
||||
@@ -202,23 +189,11 @@ chatgpt_base_url = "https://managed.example/backend-api/"
|
||||
let config: ConfigReadResponse =
|
||||
timeout(DEFAULT_READ_TIMEOUT, app_server.read_response(config_id)).await??;
|
||||
assert_eq!(
|
||||
(
|
||||
config.config.additional.get("cli_auth_credentials_store"),
|
||||
config.config.additional.get("chatgpt_base_url"),
|
||||
),
|
||||
(
|
||||
Some(&json!("ephemeral")),
|
||||
Some(&json!("https://managed.example/backend-api/")),
|
||||
),
|
||||
config.config.additional.get("cli_auth_credentials_store"),
|
||||
Some(&json!("ephemeral")),
|
||||
);
|
||||
|
||||
for (field, value) in [
|
||||
("cli_auth_credentials_store", json!("file")),
|
||||
(
|
||||
"chatgpt_base_url",
|
||||
json!("https://user.example/backend-api/"),
|
||||
),
|
||||
] {
|
||||
for (field, value) in [("cli_auth_credentials_store", json!("file"))] {
|
||||
let write_id = app_server
|
||||
.send_config_value_write_request(ConfigValueWriteParams {
|
||||
file_path: None,
|
||||
@@ -246,7 +221,7 @@ chatgpt_base_url = "https://managed.example/backend-api/"
|
||||
|
||||
assert_eq!(
|
||||
std::fs::read_to_string(codex_home.path().join("config.toml"))?,
|
||||
"cli_auth_credentials_store = \"file\"\nchatgpt_base_url = \"https://user.example/backend-api/\"\n",
|
||||
"cli_auth_credentials_store = \"file\"\n",
|
||||
);
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user