Skip to content

Support parallel Crystalball evaluation - #1

Merged
kaiks merged 2 commits into
masterfrom
fix-parallel-rspec-support
Sep 2, 2026
Merged

kaiks merged 2 commits into
masterfrom
fix-parallel-rspec-support

Conversation

@kaiks

@kaiks kaiks commented Sep 2, 2026

Copy link
Copy Markdown

Summary

  • split one Crystalball prediction across parallel RSpec workers
  • keep all predicted locations for one spec file on the same worker
  • detect Knapsack and parallel_tests worker variables
  • allow explicit Crystalball worker configuration for other runners
  • prevent the evaluation feature setup from rebuilding its map

Problem

Each parallel worker received the complete prediction. In the end-to-end reproduction, a serial run selected 9 examples, but two workers ran 18 examples in total. This caused duplicate work and could cause test resource conflicts.

Verification

  • bundle exec rspec spec features (308 examples, 0 failures)
  • Ruby 3.2 focused unit and end-to-end tests (19 examples, 0 failures)
  • bundle exec rubocop (192 files, no offenses)
  • bundle exec yard --fail-on-warning
  • bundle exec rake build

Scope

This PR fixes prediction evaluation. Parallel map generation has a different problem: workers compact and write map fragments independently. That work should use a separate change.

@kaiks
kaiks merged commit 275bea8 into master Sep 2, 2026
10 checks passed
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