Skip to content

fix: bound on-failure restart attempts#319

Open
danielbaustin wants to merge 1 commit into
FedericoPonzi:masterfrom
danielbaustin:codex/318-bounded-on-failure-restarts
Open

fix: bound on-failure restart attempts#319
danielbaustin wants to merge 1 commit into
FedericoPonzi:masterfrom
danielbaustin:codex/318-bounded-on-failure-restarts

Conversation

@danielbaustin

Copy link
Copy Markdown

Fixes #318.

Summary

  • count every unsuccessful on-failure exit toward a positive configured restart budget
  • preserve attempts = 0 as the existing unbounded default
  • stop resetting on-failure attempts during Started transitions while preserving reset behavior for other strategies
  • transition to FinishedFailed after the configured retries are exhausted

With attempts = 3, Horust now performs the initial launch plus three retries, then exits with its documented failed-service status instead of continuing indefinitely.

Validation

  • cargo fmt --all -- --check
  • cargo test -p horust (all unit and integration sections passed; one existing ignored test)
  • cargo test -p horust --test section_restart (5 passed)
  • cargo clippy -p horust --lib --bins

The repository-wide all-target clippy command still reports pre-existing unused_io_amount findings in healthcheck test code and an existing dead-code warning in tests/utils; this patch does not touch those surfaces.

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.

restart.attempts does not bound repeated post-start crashes

1 participant