Health Checks - #31
Merged
adeutscher merged 36 commits intoAug 7, 2026
Merged
Conversation
Expose loader started/finished and shutdown state so livez/readyz implementations can share readiness rules across host shapes. Co-authored-by: Cursor <cursoragent@cursor.com>
Run the worker via BackgroundService and expose /livez, /healthz, and /readyz at the host edge using IWorkerReadiness, keeping Core free of AspNetCore. Co-authored-by: Cursor <cursoragent@cursor.com>
Serve /livez, /healthz, and /readyz from a Generic Host IHostedService using System.Net.HttpListener and DI-resolved IWorkerReadiness, removing AspNetCore health checks from the executable host. Co-authored-by: Cursor <cursoragent@cursor.com>
This was
linked to
issues
Aug 7, 2026
Closed
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.
Implement a health-check system, re-organization
HEALTH__ENABLED=false), then the JobWorker shall host a basic HTTP listener that supports 3 pages:/live, which shall always return an HTTP 200/health, which shall return an HTTP 200 if there has not been a serious exception caught in theCoreproject within the configured time period (default: 60 seconds, configured byHEALTH__RECENT_INCIDENT_THRESHOLD_SECONDS). If there has been a recent exception, then an HTTP 503 shall be returned./statistics, which shall return a JSON containing basic lifetime statistics on the worker instance.IHostcreated by aHostApplicationBuilderin the main project, as opposed to directly invokingIHandler.RunAsyncRedShirt.Example.JobWorker.HealthCheckapplication that is bundled into the container. Its only purpose is to ping the/healthendpoint and confirm an HTTP 200. A usage example of this is present intest/local/docker-compose.yaml.Core.Logicimplementations to not access Core directly by placing minimally-necessary items in a newRedShirt.Example.JobWorker.Commonproject that is referenced by bothCoreandCore.LogicIJobLogicRunnershall now return an object (containing a value of theJobResultenum as a property), in case of future expansion.Brokenjobs toInvalidData, in order to be more indicative.