From 256ff2528e584a8f85da2e69f3cadd5655937143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sat, 19 Sep 2026 04:16:35 -0400 Subject: [PATCH] test(config): two e2e routing tests stop racing KIGI_CODE_BASE_URL `e2e_default_model_with_session_routes_to_proxy` and `e2e_duplicate_model_field_both_entries_survive` assert the default model's base URL. They were not serial and read `KIGI_CODE_BASE_URL` through `EndpointsConfig`, while two serial tests (auth_method.rs, models_fetch.rs) point that variable at wiremock. When the runs overlapped, the base URL came back as the wiremock URI: the Linux suite failed in 2 of 13 full runs. Presetting the variable fails both tests every time, on v0.1.15 as well. Both tests are now `#[serial]` and unset the variable for their scope, the same cure `e2e_enterprise_endpoints_only_no_model_override` got for the moonshot variable. With the variable preset they pass. --- crates/codegen/kigi-shell/src/agent/config.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/codegen/kigi-shell/src/agent/config.rs b/crates/codegen/kigi-shell/src/agent/config.rs index 490b282..2540b6e 100644 --- a/crates/codegen/kigi-shell/src/agent/config.rs +++ b/crates/codegen/kigi-shell/src/agent/config.rs @@ -6707,7 +6707,10 @@ reasoning_effort = "low" assert_eq!(model.info.base_url, "https://inference.example.com/v1"); } #[test] + #[serial] fn e2e_default_model_with_session_routes_to_proxy() { + // Hermetic: serial tests point KIGI_CODE_BASE_URL at wiremock. + let _base = EnvGuard::unset(kigi_env::CODE_BASE_URL_ENV); let (_, models) = resolve_models_from_toml("", None); let model = models .get(BUNDLED_DEFAULT_KEY) @@ -6839,7 +6842,10 @@ reasoning_effort = "low" ); } #[test] + #[serial] fn e2e_duplicate_model_field_both_entries_survive() { + // Hermetic: serial tests point KIGI_CODE_BASE_URL at wiremock. + let _base = EnvGuard::unset(kigi_env::CODE_BASE_URL_ENV); let dm = crate::models::default_model(); let (_, models) = resolve_models_from_toml( &format!(