fix(e2e-test): Isolate auth locks in spawned test binaries - #2213
Open
MuskanPaliwal wants to merge 2 commits into
Open
fix(e2e-test): Isolate auth locks in spawned test binaries#2213MuskanPaliwal wants to merge 2 commits into
MuskanPaliwal wants to merge 2 commits into
Conversation
Entire-Checkpoint: 01M1E2G7Q0WAY0A5EQ1ZQ1R4NB
MuskanPaliwal
marked this pull request as ready for review
September 1, 2026 09:57
Contributor
Author
|
Hey @Soph , would appreciate your review here. Thanks :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2201
The existing auth-go lock isolation only protected code running inside a
go testexecutable. Integration and E2E tests spawn a separately builtentirebinary, wheretesting.Testing()is false. That binary therefore fell back to the auth-go user-cache lock directory. On macOS,os.UserCacheDir()ignoresXDG_CACHE_HOME, leaving the developer real~/Library/Caches/auth-goexposed.The fix
Add
ENTIRE_AUTH_LOCK_DIRas an explicit override ahead of the existing in-process test fallback. The CLI package, integration, and E2E TestMains now point it at their test-owned directories so spawned binaries and hooks inherit the isolation.When the variable is unset, production behavior is unchanged. Auth-go continues using its normal user-cache default.
The repository spawned-binary testing guidance now includes the new isolation variable.
Verification
The focused regression test failed before the resolver change and passed afterward:
A manual spawned-process check built the CLI with
go build, seeded an expired login and refresh token, and ranentire auth tokenagainst a local/oauth/tokenendpoint twice:HOME/Library/Caches/auth-go.ENTIRE_AUTH_LOCK_DIR.Automated checks passed:
The resolver override and no-override branches also passed together as the blast-radius guard.