taskplane 0.24.29 → 0.24.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2521,10 +2521,12 @@ export async function executeOrchBatch(
2521
2521
  const segmentState = segmentStateByTask.get(taskId);
2522
2522
  if (!task || !segmentState) continue;
2523
2523
 
2524
- const activeSegmentId = task.activeSegmentId;
2524
+ // Use the completing segment ID from the task outcome, not task.activeSegmentId
2525
+ // which may already be null (advanced by pre-wave loop for next wave).
2526
+ const outcome = allTaskOutcomes.find((candidate) => candidate.taskId === taskId);
2527
+ const activeSegmentId = outcome?.segmentId ?? task.activeSegmentId;
2525
2528
  if (activeSegmentId) {
2526
2529
  segmentState.statusBySegmentId.set(activeSegmentId, "succeeded");
2527
- const outcome = allTaskOutcomes.find((candidate) => candidate.taskId === taskId);
2528
2530
  upsertTerminalSegmentRecord(batchState, task, segmentState, activeSegmentId, "succeeded", outcome, laneByTaskId.get(taskId));
2529
2531
 
2530
2532
  const workerAgentId = resolveTaskWorkerAgentId(taskId, allTaskOutcomes, laneByTaskId);
@@ -2672,11 +2674,11 @@ export async function executeOrchBatch(
2672
2674
  const task = discovery.pending.get(taskId);
2673
2675
  const segmentState = segmentStateByTask.get(taskId);
2674
2676
  if (!task || !segmentState) continue;
2675
- const activeSegmentId = task.activeSegmentId;
2677
+ const failOutcome = allTaskOutcomes.find((candidate) => candidate.taskId === taskId);
2678
+ const activeSegmentId = failOutcome?.segmentId ?? task.activeSegmentId;
2676
2679
  if (activeSegmentId) {
2677
2680
  segmentState.statusBySegmentId.set(activeSegmentId, "failed");
2678
- const outcome = allTaskOutcomes.find((candidate) => candidate.taskId === taskId);
2679
- upsertTerminalSegmentRecord(batchState, task, segmentState, activeSegmentId, "failed", outcome, laneByTaskId.get(taskId));
2681
+ upsertTerminalSegmentRecord(batchState, task, segmentState, activeSegmentId, "failed", failOutcome, laneByTaskId.get(taskId));
2680
2682
 
2681
2683
  const workerAgentId = resolveTaskWorkerAgentId(taskId, allTaskOutcomes, laneByTaskId);
2682
2684
  if (workerAgentId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskplane",
3
- "version": "0.24.29",
3
+ "version": "0.24.30",
4
4
  "description": "AI agent orchestration for pi — parallel task execution with checkpoint discipline",
5
5
  "keywords": [
6
6
  "pi-package",