Give back only what a run took down, and plan a restart of a stopped service as its start - #36
Merged
Merged
Conversation
…service as its start A step putting a service back was carried out whatever had happened before it. Stop pressed before the first step of a restart started a service that was not running, an interrupted restart of a selection started services it never stopped, and a dependent stopped by somebody else after the preview was started again. Such a step is now skipped with the new reason nothingToPutBack unless the run itself stopped the entry or ended the process it lived in, counted the same way the way back counts it. A restart of a service that is not running is planned as a start, the way Restart-Service treats it, with the new warning restartOnlyStarts. A disabled service that is not running now gets the warning a start of it gets, where the restart used to be refused with a sentence about stopping it. The warnings about the start in a plan moved to a switch of their own in both interfaces, so the warning switches grew thinner rather than reaching their complexity ceiling. Stability report W-5, package D. 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 a person
bws restart, and the preview says so with one step and the warning "is not running, so restarting it only starts it". This is whatRestart-Servicedoes. A disabled service that is not running gets the warning a start of it gets instead of a refusal worded about stopping it.Machine readable output (additive)
skippedBecausehas a fifth value,nothingToPutBack. UnlikeprocessStaysit counts againstcompleted, because the entry is not where the plan wanted it at the end.restartOnlyStarts, with an emptyrelated.nothingToPutBackwhere it reportedalreadyThere, and a restart whose service was stopped by somebody else after the preview leaves it stopped and exits with 3.How it is built
PlanRunner.Unneededskips a restore unlessNetEffect.TookDownsays the run took the entry down - the same tally the way back uses, plus an ending Windows answered by starting the entry again at once.PlanBuilder.AsPlannedplans a restart of an entry read as stopped as a start. The plan keeps the restart as its action, so the equivalent command is stillbws restart NAME.PlanText.Starting.cs,PlanWords.Starting.cs), so the warning switches grew thinner rather than reaching their complexity ceiling.Checked
RestartOfStoppedTests(4),PutBackTests(7, each asserting what the manager was asked),PutBackOutputTests(2). Two existing assertions inPlanRunnerTestschanged with the rule.PlanConfirmationGuards, which fail the same way onmainwhen run without the rest of the window project (an existing test-order dependence, not this change).--dry-run): a stopped service shows one start step and the warning, a stopped disabled one is no longer refused, a running one is unchanged.Not checked: a real run on a throwaway machine, and the window on screen.
🤖 Generated with Claude Code