Skip to content

fix(shell): a busy Work graph no longer kills the command it skipped - #6445

Open
Hmbown wants to merge 1 commit into
mainfrom
fix/shell-busy-work-graph
Open

Hmbown wants to merge 1 commit into
mainfrom
fix/shell-busy-work-graph

Conversation

@Hmbown

@Hmbown Hmbown commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Refs #6435. When the To-do/Plan lock was busy, ShellSpawnIntentGuard
logged "registration skipped; running without a bound operation" and
dropped its copy of the lifecycle, but the spawn path kept its own
clone, published the new shell to the never-registered operation,
treated that failure as fatal, killed the child and reported "Shell
execution failed: operation binding shell: is not registered". The
reporter's logs show 563 such misses.

The lifecycle used after spawn now comes from the guard, so an unbound
spawn stays unbound, in both the background and interactive paths. The
spawn-time publication is best-effort like every other lifecycle
observation: a graph write that fails after the child started must not
kill it. The try-lock spin that triggers the skip is unchanged; it now
only costs Work-graph bookkeeping for that command, never the command.

Evidence: new busy_work_graph_still_runs_the_command holds the To-do
lock and runs a foreground and a background command with a lifecycle;
against the previous code it fails (0 passed, 1 failed: the background
child is killed on the missing binding), with the fix 154 passed,
0 failed across the busy_work_graph and shell:: selections. TUI
all-target/all-feature Clippy with CI flags and fmt passed; blocking
call budget unchanged.

🤖 Generated with Claude Code

Refs #6435. When the To-do/Plan lock was busy, ShellSpawnIntentGuard
logged "registration skipped; running without a bound operation" and
dropped its copy of the lifecycle, but the spawn path kept its own
clone, published the new shell to the never-registered operation,
treated that failure as fatal, killed the child and reported "Shell
execution failed: operation binding shell:<id> is not registered". The
reporter's logs show 563 such misses.

The lifecycle used after spawn now comes from the guard, so an unbound
spawn stays unbound, in both the background and interactive paths. The
spawn-time publication is best-effort like every other lifecycle
observation: a graph write that fails after the child started must not
kill it. The try-lock spin that triggers the skip is unchanged; it now
only costs Work-graph bookkeeping for that command, never the command.

Evidence: new busy_work_graph_still_runs_the_command holds the To-do
lock and runs a foreground and a background command with a lifecycle;
against the previous code it fails (0 passed, 1 failed: the background
child is killed on the missing binding), with the fix 154 passed,
0 failed across the busy_work_graph and shell:: selections. TUI
all-target/all-feature Clippy with CI flags and fmt passed; blocking
call budget unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 23, 2026 16:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
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.

2 participants