Skip to content

test(config): config tests use the config fixture and edge fakes - #3867

Merged
dan-petty merged 3 commits into
mainfrom
test/1333-config-tests-on-edge-fakes
Nov 6, 2026
Merged

dan-petty merged 3 commits into
mainfrom
test/1333-config-tests-on-edge-fakes

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Config tests no longer rebind CONFIG_PATH. They set configuration through the config fixture and the config file of the hermetic floor, and they serve the gateway pool request with the web fake. The cache tests use the public load_settings and run on both config layers. The tests that named private functions now call the public ones. global_config moves to tests/support/config.py so the cache tests share it.

This lets the settings cache drop CONFIG_PATH from its key later (#1333). The change touches no product code.

Closes #3858

Change: openspec/changes/archive/2026-11-06-3858-config-tests-on-edge-fakes/

Three config test files rebind CONFIG_PATH. They now write their
configuration through the config fixture, the global_config fixture
and the floor's config file. The cache tests move to tests/config and
check the cache through what a load returns. The gateway pool and
embedding requests go through the web fixture.
@dan-petty dan-petty added type/test Type test: a new or changed test scope/config Settings, OS Keyring, environment variables, and defaults labels Nov 6, 2026
@dan-petty
dan-petty marked this pull request as ready for review November 6, 2026 23:43
@dan-petty
dan-petty merged commit 0550497 into main Nov 6, 2026
23 checks passed
@dan-petty
dan-petty deleted the test/1333-config-tests-on-edge-fakes branch November 6, 2026 23:44
@dan-petty

Copy link
Copy Markdown
Owner Author

Test results (local, on the branch head):

  • Full uv run devops ci: 20174 passed, 2 failed, 1 error. The failures are the two known host failures that also fail on origin/main: test_mark_only_commands_under_global_dry_run and test_the_direct_executor_refuses_a_network_profile_before_it_starts_the_tool[direct]. All other checks pass.
  • Focused run of tests/config and tests/telemetry/test_config_env_overrides.py: 252 passed.

Notes for the reviewer:

  • The issue lists only the CONFIG_PATH rebinding and the keyring patches. The keyring patches were already gone on origin/main. The branch also moves tests/core/test_config_settings_cache.py to tests/config/test_settings_cache.py (the mirror of config/settings.py) and removes four private-name imports and the gateway_pool patch. This follows the rule of test(cli): Use edge fakes and real git; drop test rebind hooks #1333: no patch and no private import in a migrated file. The proposal lists each one.
  • One known gap, not new: test_mutating_loaded_settings_does_not_poison_the_cache does not kill a mutation that removes the deep copy in _config_layers. The old test on origin/main has the same gap. A later item can fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/config Settings, OS Keyring, environment variables, and defaults type/test Type test: a new or changed test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(config): config tests run on the keyring fake and a config fixture

1 participant