Skip to content

fix(clix): eliminate data race in test-race CI job#238

Merged
indaco merged 2 commits intomainfrom
fix/clix-test-race
Mar 19, 2026
Merged

fix(clix): eliminate data race in test-race CI job#238
indaco merged 2 commits intomainfrom
fix/clix-test-race

Conversation

@indaco
Copy link
Copy Markdown
Owner

@indaco indaco commented Mar 19, 2026

Description

Fix intermittent test-race CI failures caused by a data race in internal/clix tests.

TestGetOrInitVersionFile_InitError mutated the package-level defaultManager via semver.SetDefaultManager() while parallel tests read it through semver.InitializeVersionFileWithFeedback().

Refactored GetOrInitVersionFile to delegate to an internal getOrInitVersionFileWith that accepts a *semver.VersionManager, so tests inject mocks directly without touching global state.

Also use test-race as a dependency of the install justfile recipe so race conditions are caught locally.

Related Issue

  • None

Notes for Reviewers

  • None

@indaco indaco merged commit 9f8a5ca into main Mar 19, 2026
7 checks passed
@indaco indaco deleted the fix/clix-test-race branch March 19, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant