Skip to content

Wait for a service while it makes progress, and for one already on its way - #34

Merged
donislawdev merged 1 commit into
mainfrom
fix/stability-package-c
Sep 30, 2026
Merged

donislawdev merged 1 commit into
mainfrom
fix/stability-package-c

Conversation

@donislawdev

Copy link
Copy Markdown
Owner

Package C of the stability review: waiting that does not abandon a service half way.

What changes for a person

  • The step limit counts time without progress. --timeout and "Wait up to" on the plan sheet now give up on a step once the limit has passed since the service last reported progress, not since the step began. A restart of a service that takes longer than the limit to stop ends with the service running instead of stopped.
  • An entry already on its way is waited for. A stop asked of a service already stopping sends nothing and waits. A start asked of a service still stopping waits for it to stop and then asks. An entry that never leaves the opposite pending state is never asked, and the step says so.
  • A start the service does not survive fails at once, with the service's exit code in errorCode and its own code (for 1066) in the error text, instead of timing out after the whole limit.
  • The second Ctrl+C takes effect while a step is being waited for. An interruption skips a forward step not asked yet. Steps that put things back keep waiting.
  • Two new plan warnings: starting a disabled entry (disabledCannotStart) and starting a paused one (pausedCannotStart).
  • The note about the manager taking longer than --timeout to answer is read off the time of the answer alone.
  • The window's reason for offering Force stop no longer names a number of seconds that could be wrong, and the line under a waiting step says the limit is about progress.

Contract

  • The meaning of --timeout (README, site and docs mirrors updated).
  • Two warning kinds, added.
  • errorCode on a failed start carries the service's exit code. No new fields. An abandoned step reports timedOut.

Checked

  • Core, command line, window (plan sheet, sentences, text guards), architecture, site and the integration tests that run anywhere - the classes this touches, all green.
  • 41 mutation entries proved: 19 new, 6 re-anchored, the rest the neighbours in the runner. One neighbour was missed at first and its test was made to reach the fault.
  • On this machine, reading only: the exit codes read through the service manager matched sc query on 800 of 800 entries, and bws start on a disabled service shows the new warning. A restart of Spooler ran through the new path with both steps succeeding.

Not checked

  • A real service that takes longer than the limit to stop, and a real service failing at start - the throwaway machine did not answer. Both are covered on the fake manager only, including the manager refusing a request to an entry still on its way.
  • The window on a live run.

🤖 Generated with Claude Code

…s way

The step limit (--timeout, and "Wait up to" on the plan sheet) now counts
time without progress - the check point rising or the state changing -
rather than time since the step began. A restart of a service that took
longer than the limit to stop used to give up on the stop, ask a service
still stopping to start, be refused, and leave it stopped.

Before a stop or a start is asked for, an entry already on its way is
waited for: a stop to an entry already stopping sends nothing and waits,
a start to one still stopping waits for it to stop and then asks. An
entry that never leaves the opposite pending state is never asked, and
the step fails in its own words with nothing sent. Ending a process is
left out of this, because it exists for the entry stuck stopping.

A start after which the service falls back to Stopped fails at once,
with the service's exit code as errorCode and its service-specific code
in the error text only, instead of timing out after the whole limit.
ServiceProgress carries dwWin32ExitCode and dwServiceSpecificExitCode.

The second Ctrl+C now ends the watching of a step in flight (reported as
timed out), and an interruption skips a forward step that has not been
asked yet. Steps that put things back keep waiting.

Plans starting a disabled or a paused entry warn that Windows will refuse
the start (disabledCannotStart, pausedCannotStart). The note about the
manager outrunning --timeout is read off the time of its answer alone.
The window no longer names a number of seconds in the reason for offering
Force stop, and the waiting line says the limit is about progress.

The warning describers moved into PlanText.Warnings.cs and
PlanWords.Warnings.cs, where the size ratchet pointed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 29, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Advanced

Run ID: e90457f5-d8ba-499b-97a5-5dd9cd471af6


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@donislawdev
donislawdev merged commit b8408d1 into main Sep 30, 2026
8 checks passed
@donislawdev
donislawdev deleted the fix/stability-package-c branch September 30, 2026 05:58
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