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
[TEST] Flaky ADO auth unit tests in CI shard 2: ambient git credential helper leaks into test_auth.py #4762
area/testingTest infrastructure, fixtures, e2e harness, coverage.status/acceptedHuman scope approval; verify the issue's approval record and review contact before work.type/test
Symptom: git credential fill returned no credential (for dev.azure.com).
Seen on #4715, run 45039642745, job 137261093908. That PR touches no auth code.
Likely cause: test isolation. The tests do not pin the git credential environment, so an ambient credential helper or git config on the runner, or one leaked by another test in the same xdist worker, changes the credential-fill path.
Done when:
These tests pin their environment: an isolated HOME and GIT_CONFIG_GLOBAL/GIT_CONFIG_NOSYSTEM, no credential helper, and the subprocess mocked where intended.
They pass deterministically regardless of runner credential state.
A regression check proves the isolation: the test passes with a hostile credential helper configured in the environment.
Decision: approve
Area: project
Scope: Tests only. tests/unit/test_auth.py (TestBuildErrorContextADO and TestCredentialFallbackOrderRegressionTrap::test_ado_attempts_bearer_before_raising) pin their git credential environment: an isolated HOME, GIT_CONFIG_GLOBAL and GIT_CONFIG_NOSYSTEM, no credential helper, and the git credential subprocess mocked where the test intends it, so an ambient helper or config on the runner, or state leaked by another test in the same worker, cannot change the credential-fill path. No auth behaviour changes.
Done when: The tests pass deterministically; a regression check runs them with a hostile credential helper configured in the environment and they still pass; a local loop of 50 runs has no failure; CI is green. No CHANGELOG line (tests only).
Out of scope: Auth behaviour or credential resolution order changes; other test modules.
Review contact: Daniel Meppiel (@danielmeppiel)
area/testingTest infrastructure, fixtures, e2e harness, coverage.status/acceptedHuman scope approval; verify the issue's approval record and review contact before work.type/test
Activity
danielmeppiel commentedon Nov 22, 2026
Decision: approve
Area: project
Scope: Tests only. tests/unit/test_auth.py (TestBuildErrorContextADO and TestCredentialFallbackOrderRegressionTrap::test_ado_attempts_bearer_before_raising) pin their git credential environment: an isolated HOME, GIT_CONFIG_GLOBAL and GIT_CONFIG_NOSYSTEM, no credential helper, and the git credential subprocess mocked where the test intends it, so an ambient helper or config on the runner, or state leaked by another test in the same worker, cannot change the credential-fill path. No auth behaviour changes.
Done when: The tests pass deterministically; a regression check runs them with a hostile credential helper configured in the environment and they still pass; a local loop of 50 runs has no failure; CI is green. No CHANGELOG line (tests only).
Out of scope: Auth behaviour or credential resolution order changes; other test modules.
Review contact: Daniel Meppiel (@danielmeppiel)
test: serialize the simulated ADO chain's bearer patch across threads (…
test: drop the provider patch from the hostile-helper check; mark pro…
test: make the chain thread test deterministic; drop the no-op helper…
Merge pull request #4785 from microsoft/danielmeppiel-4762-ado-auth-h…