Refuse to end a process under running dependants and ask the entry before its neighbours - #33
Merged
Merged
Conversation
…fore its neighbours A forced stop no longer ends a process that something outside the plan still runs on. The plan refuses while entries depending on the target, or on an entry sharing its process, are running and not stopped by the plan. An unreadable answer about a neighbour's dependants is a casualty list known to be short, and refused like the target's own. kill --force --dependents is refused before anything is read, and the core throws on that shape: skipping the courtesy skipped the cascade's stops too, so the preview promised dependants stopped and the run ended the process under them. The steps now run cascade, the entry itself, its neighbours, then the ending. A cascade step that does not arrive holds the neighbours and the ending. A neighbour refusing its stop holds nothing back, since it dies with the process either way. A neighbour is asked only while the entry is still held by the process the plan named - otherwise it is skipped as processStays, a fourth skip reason, and the run still counts as completed. The forced preview names critical entries arriving with the cascade, a neighbour that does not accept a stop, and a disabled neighbour a forced restart could not bring back. The ending step carries the neighbours it takes with it, so the way back names them even under --force - a forced restart with --force used to hand back "stop it" for a neighbour running before and after. The equivalent command of kill carries --dependents, and the window offers no forced stop under error 1051 or 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What changes for somebody using the tool
bws kill NAMEand the window's Force stop refuse while services depending on the entry, or on anything sharing its process, are running outside the plan. The sentence names them.--dependentsstill stops the entry's own dependents as part of the plan.bws kill NAME --force --dependentsis refused (exit code 2) before the machine is read. Its preview listed the dependents as stopping while the run skipped their stops and ended the process under them."skippedBecause": "processStays"in the JSON of a run - a new value, nothing existing changed - and the run still counts as completed.--force. A forced restart with--forceno longer hands back "stop it" for a neighbour that was running before and after.killcarries--dependents, and the window offers no Force stop after error 1051 or 5.How it was checked
ForcedStopRefusalTests(11 cases),ForcedRunTests(8), one each inArgumentRefusalTests,EquivalentCommandTestsandForcedStopGuards(two cases). Existing forced stop tests moved to an entry nothing depends on, because they are about other properties and would otherwise meet the new refusal first.Not in this change
killon a throwaway machine. Everything here was checked against the service manager double.🤖 Generated with Claude Code