Fix flaky TestWorkflowEngine_ParallelExecution on CI#4333
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4333 +/- ##
==========================================
- Coverage 69.08% 68.90% -0.18%
==========================================
Files 478 478
Lines 48432 48484 +52
==========================================
- Hits 33457 33410 -47
- Misses 12314 12338 +24
- Partials 2661 2736 +75 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The test asserted that parallel workflow execution completes within 200ms, but CI runners (especially with -race) have unpredictable scheduling delays causing intermittent failures (e.g. 218ms). Replace the tight wall-clock threshold with the maxConcurrent atomic counter as the primary parallelism proof, which directly measures whether steps ran concurrently regardless of machine speed. Keep a generous 2s sanity ceiling that only fires if the scheduler is fundamentally broken. The existing sequence-number ordering assertions already cover dependency-graph correctness. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
df81624 to
e3a1dd6
Compare
yrobla
approved these changes
Mar 24, 2026
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.
Summary
TestWorkflowEngine_ParallelExecutionintermittently fails on CI because it asserts parallel workflow execution completes within 200ms. CI runners (especially with-race) have variable scheduling overhead, causing spurious failures (e.g. 218ms on this run).maxConcurrentatomic counter as the primary parallelism proof, which directly measures whether steps ran concurrently regardless of machine speed. Keep a generous 2s sanity ceiling and the existing sequence-number ordering assertions for dependency-graph correctness.Type of change
Test plan
Verified the package compiles cleanly with
go buildandgo vet. The-racetest runner is unavailable in the sandbox (no GCC), but the change is a test-only assertion adjustment — no production code affected.Does this introduce a user-facing change?
No
Generated with Claude Code