Skip to content

After a hold release on resume, batch-state keeps the task 'held' and marks the not-yet-started lane successor 'running' (dashboard mis-attributes telemetry) #651

Description

@HenryLach

Report

penster batch 20260911T234647 (0.30.6 + Stage 2 build), field report on #627, item A. After a post-hold-timeout orch_resume(force=true) released TP-2104's hold and relaunched its worker:

  • batch-state.json: TP-2104 status=held, exitReason="Hold timeout … the hold remains open"; TP-2105 status=running, exitReason="Lane held — awaiting ruling on an earlier task".
  • Lane snapshot .pi/runtime/<batch>/lanes/lane-1.json: taskId / worker.status=running, tool calls advancing — correct.
  • Dashboard: TP-2104 shows held with no activity; TP-2105 shows running with the relaunched TP-2104 worker's telemetry (53 tool calls, 17 %, $5.30) while its description says "Not Started", progress 0/25. Screenshot on Cap-ruling hold: runtime must block .DONE and merge while an operator ruling is pending (.PENDING-RULING) #627.

Analysis (to verify)

Two separate defects:

  1. Status projection after release. The held task's persisted status is only re-projected at the next task-transition persist; hold-released (a strict hold-store write) does not flip the task record from heldrunning. Expected: the hold-store update() for a release should also project the bound task (and segment) status to running/pending in the same strict write, or resume's re-execution should upsert the outcome as running before spawning.
  2. Successor mis-attribution. The successor on the same serial lane was persisted as running on resume. Suspects: the laneHeld pending outcome (execution.ts lane loop: status: (pauseSignal.paused || laneHeld) && !shouldSkipRemaining ? "pending" : "skipped" with exitReason "Lane held — awaiting ruling on an earlier task") being re-mapped to running by resume reconciliation (reconcileTaskStates precedence 2 "session alive → reconnect/running" matches the lane's shared sessionName), and the dashboard keying telemetry on the lane's currentTaskId while the badge keys on batch-state.json. Expected: a not-yet-started successor stays pending; the lane's telemetry attaches to the task named in the lane snapshot.

Acceptance

  • Behavioural test: held task → ruling → resume → after relaunch, persisted statuses are TP-A running, TP-B pending; dashboard /api/state (or the projection helper it uses) attributes lane-1 telemetry to TP-A.
  • hold-released strict write projects the task/segment status in the same persist.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions