Skip to content

feat: split ProcessLauncher by platform, add testingFramework, infinite loop filter and SPM timeout#52

Merged
ericodx merged 25 commits intomainfrom
split-xcode-and-spm-process-laucher
Apr 5, 2026
Merged

feat: split ProcessLauncher by platform, add testingFramework, infinite loop filter and SPM timeout#52
ericodx merged 25 commits intomainfrom
split-xcode-and-spm-process-laucher

Conversation

@ericodx
Copy link
Copy Markdown
Owner

@ericodx ericodx commented Apr 4, 2026

Summary

  • Launcher separation: Split generic ProcessLauncher into XcodeProcessLauncher (v1.0.0 behavior, no child kill) and SPMProcessLauncher (aggressive child cleanup via kill(-pid, SIGKILL) + killEscapedChildren). Selection at composition root by ProjectType.
  • Simulator slot fix: Restore pool.release(slot) before ResultParser.parse() in TestExecutionStage and IncompatibleMutantExecutor.
  • Testing framework config: Add testingFramework option (xctest | swift-testing). XCTest + Xcode forces concurrency=1 to prevent parallel simulator interference.
  • Auto-detection: init command detects framework by scanning test file imports (import XCTest vs import Testing).
  • SPM timeout: Split default timeout by platform — 120s for Xcode, 30s for SPM — to limit CPU waste from infinite loops.
  • Infinite loop prevention: Add InfiniteLoopFilter that skips ArithmeticOperatorReplacement and RemoveSideEffects mutations inside while/repeat-while loop bodies. Follows the existing SuppressionFilter pattern.
  • Debug cleanup: Remove all [xmr] debug prints from execution stages.

Type of Change

  • feat: A new feature has been added.
  • fix: A bug has been fixed.
  • refactor: A code change that neither fixes a bug nor adds a feature.
  • test: Addition or correction of tests.

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 4, 2026
@ericodx ericodx changed the title Split xcode and spm process laucher feat: split ProcessLauncher by platform and add testingFramework support Apr 5, 2026
@ericodx ericodx added feature New feature or request fix Something wasn't working refactor Code change that neither fixes a bug nor adds a feature test Addition or correction of tests labels Apr 5, 2026
@ericodx ericodx changed the title feat: split ProcessLauncher by platform and add testingFramework support feat: split ProcessLauncher by platform, add testingFramework, infinite loop filter and SPM timeout Apr 5, 2026
@ericodx ericodx added the performance Changes that improve execution speed or resource usage label Apr 5, 2026
@ericodx ericodx merged commit 368d71d into main Apr 5, 2026
1 check passed
@ericodx ericodx deleted the split-xcode-and-spm-process-laucher branch April 5, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request fix Something wasn't working performance Changes that improve execution speed or resource usage refactor Code change that neither fixes a bug nor adds a feature test Addition or correction of tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant