You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Native core settings tests fail because the build-time git version leaks into env overrides #1327
Native cargo test -p trusted-server-core --lib fails 11 settings::tests env override tests on main since #1213. Each fails with Configuration error: Failed to deserialize configuration.
The core build script exports TRUSTED_SERVER__GIT_VERSION with cargo:rustc-env. Cargo also sets that variable in the process environment of every cargo test run of the crate. The test-only Settings::from_toml_and_env loader reads every TRUSTED_SERVER__* variable as a settings override, so it tries to deserialize an unknown git_version field.
CI does not catch it. Core unit tests run in CI only on wasm32-wasip1 under Viceroy, which does not pass the host environment to the guest. The only native core run in CI is --test template_build_digest.
Runtime config loading is not affected. The EdgeZero env overlay only overrides keys that already exist in the config.
Reproduction steps
Check out main (for example d2f0d8cc0).
Run cargo test -p trusted-server-core --target <host-triple> --lib -- settings::tests.
Result: 170 passed; 11 failed.
Run the same test binary directly, without Cargo. All 181 tests pass. Set TRUSTED_SERVER__GIT_VERSION=example and 11 fail again. An empty value fails 12.
Failing tests include test_set_env, test_override_env, test_handlers_override_with_env, test_ec_partners_override_with_indexed_env, and proxy_normalize_applied_by_from_toml_and_env.
Expected behavior
The native core test suite passes. Build inputs that share the TRUSTED_SERVER__ prefix are not read as settings overrides.
Activity