Skip to content

Fix CI sandbox race condition with --no-parallel#62

Merged
ericodx merged 1 commit intomainfrom
fix-ci
Apr 8, 2026
Merged

Fix CI sandbox race condition with --no-parallel#62
ericodx merged 1 commit intomainfrom
fix-ci

Conversation

@ericodx
Copy link
Copy Markdown
Owner

@ericodx ericodx commented Apr 8, 2026

Summary

  • Add --no-parallel to swift test in both CI workflows (main-analysis.yml and pull-request-analysis.yml) to prevent sandbox race condition
  • MainIntegrationTests launches the real binary, which calls SandboxCleaner.removeOrphaned() at startup — deleting all xmr-* directories in $TMPDIR. When tests run in parallel, this removes sandboxes that other tests (fallbackBuildSuccessExecutesTests) are actively using, causing "file doesn't exist" errors for .xctestrun files

Type of Change

  • feat: A new feature has been added.
  • fix: A bug has been fixed.
  • perf: A code change that improves performance.
  • refactor: A code change that neither fixes a bug nor adds a feature.
  • test: Addition or correction of tests.
  • docs: Changes only to the documentation.
  • ci: Changes related to continuous integration and deployment scripts.
  • build: Changes that affect the build system or external dependencies.
  • deps: Dependency version upgrades with no logic changes.
  • chore: Other changes that do not fit into the previous categories.
  • revert: Reverts a previous commit.

Invariants Checklist

  • Original project is never modified — all mutations happen inside an isolated sandbox
  • xcodebuild build-for-testing runs exactly once for all schematizable mutants
  • No mutant results are lost or duplicated
  • Mutant positions (file, line, column) are accurate in all reported results
  • A cancelled task never leaves a simulator slot permanently acquired from the pool
  • schematizedContent never contains the __swiftMutationTestingID global declaration
  • Swift 6 Strict Concurrency compatible
  • Pipeline stages remain stateless pure transformations

Pipeline Impact

Which stages are affected?

  • SandboxFactory
  • BuildStage
  • SimulatorPool
  • TestExecutionStage
  • IncompatibleMutantExecutor
  • PerFileBuildFallback
  • CacheStore
  • Reporters (Text / JSON / HTML / Sonar)
  • CLI / Configuration
  • Models / RunnerInput contract
  • None

Testing

  • Unit tests added or updated
  • Tests use mock ProcessLaunching — no real xcodebuild, xcrun simctl, or xcresulttool
  • Tests use FileHelpers for any filesystem interaction (temp directories only)
  • Snapshot tests added or updated (if reporter output format changed)
  • Integration tests added or updated and tagged separately (if pipeline or CLI behavior changed)
  • All tests pass locally (swift test)

@ericodx ericodx self-assigned this Apr 8, 2026
@ericodx ericodx changed the title fix: add --no-parallel to CI workflows to prevent sandbox race condition Fix CI sandbox race condition with --no-parallel Apr 8, 2026
@ericodx ericodx added fix Something wasn't working ci Changes to CI/CD configuration labels Apr 8, 2026
@ericodx ericodx merged commit 77575b8 into main Apr 8, 2026
1 check passed
@ericodx ericodx deleted the fix-ci branch April 8, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Changes to CI/CD configuration fix Something wasn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant