Skip to content

fix(services): isolate command health failures - #340

Merged
codeforester merged 4 commits into
mainfrom
bug/332-20261006-keep-service-health-aggregation-intact-after-command-launch
Oct 6, 2026
Merged

codeforester merged 4 commits into
mainfrom
bug/332-20261006-keep-service-health-aggregation-intact-after-command-launch

Conversation

@codeforester

Copy link
Copy Markdown
Collaborator

Summary

Keep service-health aggregation running when a command check cannot launch or emits non-UTF-8 output. Command probes now use byte-preserving capture and convert execution failures into per-service diagnostics so later services remain visible.

Fixes #332

Validation

  • bats tests/services_test.bats --filter 'health isolates'
  • git diff --check

The regression fixture covers an executable without a shebang, invalid UTF-8 output, a required failure, an optional failure, and a later service that must still be reported.

@codeforester
codeforester force-pushed the bug/331-20261006-reject-process-health-checks-without-a-process-lifecycle-con branch from 189715c to 3a91c63 Compare October 6, 2026 02:38
@codeforester
codeforester force-pushed the bug/332-20261006-keep-service-health-aggregation-intact-after-command-launch branch from af8cc64 to 5e91f7d Compare October 6, 2026 02:38
@codeforester
codeforester force-pushed the bug/331-20261006-reject-process-health-checks-without-a-process-lifecycle-con branch from 3a91c63 to 71f288f Compare October 6, 2026 12:54
@codeforester
codeforester force-pushed the bug/332-20261006-keep-service-health-aggregation-intact-after-command-launch branch from 5e91f7d to 27996ba Compare October 6, 2026 12:55

@codeforester codeforester left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 27996ba against #332 (stacked on #339). No findings. Two good hardening changes for command health checks: text=False means a check whose output isn't valid UTF-8 can no longer raise UnicodeDecodeError and abort the whole status aggregation, and catching OSError (not just FileNotFoundError/PermissionError) covers ENOEXEC, ENOTDIR, E2BIG and similar launch failures. Each now becomes a failed CheckResult, which is exactly #332's "keep aggregation intact". The output was never used, so bytes are fine. Ready in stack order once CI finishes (one job was still running).

@codeforester
codeforester force-pushed the bug/331-20261006-reject-process-health-checks-without-a-process-lifecycle-con branch from 71f288f to 87f20fc Compare October 6, 2026 13:25
@codeforester
codeforester force-pushed the bug/332-20261006-keep-service-health-aggregation-intact-after-command-launch branch from 27996ba to c614c0b Compare October 6, 2026 13:25
Base automatically changed from bug/331-20261006-reject-process-health-checks-without-a-process-lifecycle-con to main October 6, 2026 14:27
@codeforester
codeforester merged commit abc5aed into main Oct 6, 2026
8 checks passed
@codeforester
codeforester deleted the bug/332-20261006-keep-service-health-aggregation-intact-after-command-launch branch October 6, 2026 14:28
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.

Keep service health aggregation intact after command launch and decoding failures

1 participant