Skip to content

Native core settings tests fail because the build-time git version leaks into env overrides #1327

Closed

Description

@aram356

Description

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

  1. Check out main (for example d2f0d8cc0).
  2. Run cargo test -p trusted-server-core --target <host-triple> --lib -- settings::tests.
  3. Result: 170 passed; 11 failed.
  4. 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.

Affected area

CI / Tooling

Version

main at d2f0d8cc0, after #1213.

Done when

  • Native cargo test -p trusted-server-core --lib passes on main.
  • A regression test sets TRUSTED_SERVER__GIT_VERSION explicitly, so it fails under Viceroy in CI if the leak returns.

Activity

  1. self-assigned this
    on Oct 14, 2026
  2. added theissue type on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions