gnodet opened a new pull request, #14219: URL: https://github.com/apache/maven/pull/14219
## Summary - **Fix `BuildSuccess` wallTime/execTime swap**: the 3-arg constructor passed arguments to `BuildSummary` in the wrong order, reversing wall and exec times in build summaries for the concurrent builder - **Fix `PhasingExecutor.phase()` premature exit**: the completion condition (`completedCount - start < activeCount`) could exit while tasks were still spawning recursive work; simplified to `while (activeCount > 0)` - **Replace `Clock` class with step-based timing**: the shared mutable `Clock` had data races with concurrent V4 mojo steps (overlapping `start()`/`stop()` pairs corrupt `resumed`/`exec`). TEARDOWN now computes timing by scanning each step's `startTime`/`endTime` — no shared state - **Remove dead code**: global clock (started but never stopped), redundant write lock around `plan()`, `computeForkPlan` loop in `plan()` whose result was discarded - **Decompose `processStep`** (110 lines → 15): extracted `isCleanupAfterStep`, `shouldExecute`, `submitStepForExecution`, `logSkipReason`; unified two duplicated `executor.execute()` patterns into one - **Document merge invariant**: `BuildStep.predecessors` (HashSet) and `successors` (CopyOnWriteArraySet) must deduplicate by equals — `BuildPlan.merge()` relies on this to prevent orphaned step references that would cause deadlocks ## Test plan - [x] New test: `testMergePlanSegmentsDeduplicatesPredecessors` — verifies merge deduplication prevents orphaned predecessors - [x] New test: `phaseWaitsForRecursivelySpawnedTasks` — verifies `PhasingExecutor.phase()` waits for all recursive work - [x] All existing concurrent builder tests pass (71 tests in maven-core + 2 in maven-impl) 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
