Skip to content

Register the active run for headless exec so signals finalize it - #781

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-7332-headless-exec-leaves-run-state-stale-after-process-signal
Sep 5, 2026
Merged

Register the active run for headless exec so signals finalize it#781
TheGreatAxios merged 1 commit into
mainfrom
cl-7332-headless-exec-leaves-run-state-stale-after-process-signal

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Headless corbits exec registers the process-global active run after a successful running persist, so SIGINT, SIGTERM, and SIGHUP finalize run.json as failed with finishedAt and terminated by <signal>.
  • Terminal persist goes through finalizeRunState. An in-flight running persist does not resurrect the handle after the run has finished.

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • bun run check exits 0 (6162 pass, 0 fail)

Fixes CL-7332

@linear-code

linear-code Bot commented Sep 4, 2026

Copy link
Copy Markdown

CL-7332

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critic · Comment

Headless exec registers the active run after a successful running persist and terminalizes through finalizeRunState.

No findings.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greybeard · Comment

Exec persist is the owning layer for registering the active-run handle. Process signal handlers in index.ts already finalize a registered run; a second exec-specific handler would duplicate that path.

No findings.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Approve

Headless exec registers the active run so process signals finalize run.json.

No findings.

GitHub forbids self-approve on this PR; verdict is approve as a comment.

Process signal handlers already finalize the registered run. Headless
exec wrote running to run.json but never registered, so a supervisor
stop left the session looking live.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7332-headless-exec-leaves-run-state-stale-after-process-signal branch from 857ca69 to 259553b Compare September 5, 2026 05:38
@TheGreatAxios
TheGreatAxios merged commit a1221e8 into main Sep 5, 2026
5 checks passed
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