Skip to content

K2GO-451 fix(dashboard): rebuild status self-heals a crashed (dead-pid) running state - #634

Merged
luisguzman-adfa merged 2 commits into
mainfrom
fix/K2GO-451-rebuild-status-liveness
Oct 5, 2026
Merged

luisguzman-adfa merged 2 commits into
mainfrom
fix/K2GO-451-rebuild-status-liveness

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

A rebuild whose script is killed mid-build (box restart / power loss) cannot
write a terminal status, so /rebuild/status reported 'running' forever and a new
rebuild was refused with 409. The status read now checks pid liveness and heals
a dead-pid 'running' to 'error', clearing lock/phase/pid, so the app sees a
normal failure instead of polling a phantom.

The dead-pid check and state reset move into shared helpers used by both the
status read and the cancel handler (one source). dash-node 1.4.0.

Verified: tsc --noEmit clean. The heal reuses the exact dead-pid check the
cancel handler already runs in production (used it to recover a wedged box this
session).

…d) running state

A rebuild whose script is killed mid-build (box restart / power loss) cannot
write a terminal status, so /rebuild/status reported 'running' forever and a
new rebuild was refused with 409. The status read now checks pid liveness and
heals a dead-pid 'running' to 'error' (clearing lock/phase/pid). The dead-pid
check and state reset are shared with the cancel handler. dash-node 1.4.0.
… unit-test the decision

Review follow-up. The status read and the new-rebuild guard now both go through
readRebuildStatus(), which also heals a 'running' that has outlived a short
grace with no pid ever recorded (the script died before, or without, writing
one), not just a dead recorded pid. The heal decision moves to the pure,
unit-tested resolveRebuildState. A running within the grace (just started) is
left untouched.
@luisguzman-adfa
luisguzman-adfa merged commit bbc9542 into main Oct 5, 2026
4 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/K2GO-451-rebuild-status-liveness branch October 5, 2026 07:15
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