Repository navigation
Clean up automation process groups on ordinary completion - #6507
Merged
Merged
Conversation
3 tasks done
Quitting bb, or reloading, disabling, or updating the automations plugin, left running scripts and their process groups alive, while the next start marked those runs interrupted and let the schedule start another copy. Script runs now go through a per-plugin run scope. Its dispose hook sends SIGTERM to each running script's process group, escalates to SIGKILL after one second, and waits for the runs to be recorded as skipped with an interrupted reason before the plugin database closes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚨 SLOP COP 🚨 ·
new-issue-autopilotHuman comments
What was wrong
The automations script runner cleared its timers at process close but only killed remaining process-group members after timeout or output overflow. Ordinary successful or failed completion therefore left unreferenced workers alive. Reproduction and root-cause report: reproduced twice on clean trusted main checkouts at
0950d00f962029433790f9fed432c7061051a32e.What changed
origin/main: 61 total text lines (56 additions + 5 deletions), 3 files, all within automations; no binaries.How you verified
pnpm exec turbo run test --filter=bb-plugin-automations -- src/automations.test.ts -t 'script process containment': 3 passed, including existing timeout cleanup.pnpm exec turbo run test --filter=bb-plugin-automations: 142 passed across 12 files.pnpm exec turbo run lint typecheck --filter=bb-plugin-automations: passed; lint reports four existing React-effect warnings in unchanged UI code.pnpm exec oxfmt --check plugins/automations/src/automations.test.ts plugins/automations/src/script-runner.ts plugins/automations/skills/automations/references/script-runtime.md: passed.git diff --check: passed. Diff reviewed for scope, lifecycle correctness, and binary/generated changes.diagnosticsCLI coverage; that unrelated map was not changed.Fixes #6505