docs: clarify health check contracts in spec (#407)
Heimdall Gitea / CI policy (pull_request) Successful in 2s
Heimdall Gitea / Detect CI scope (pull_request) Successful in 5s
Heimdall Gitea / Build and tests (pull_request) Skipped
Heimdall Gitea / Build and scan server image (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Skipped
Heimdall Gitea / Build and scan NVIDIA Agent image (pull_request) Skipped
Heimdall Gitea / Publish versioned installer release (pull_request) Skipped

This commit is contained in:
arnaud.dartois committed 2026-11-13 12:38:09 +01:00
1 parent 32d68595d5
commit b558841397
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -238,7 +238,7 @@ restent à mesurer; aucune capacité chiffrée n'est annoncée ici.
- Serilog (structure logging)
- OpenTelemetry ready
- Sentry SDK compatible GlitchTip
- Healthchecks (API, Agent, DB, RustFS, Broker IA, Ollama)
- Health checks Central : `/healthz` est la liveness du processus, `/readyz` vérifie PostgreSQL et le stockage actif, et `/health/live` vérifie PostgreSQL plus le backend IA configuré (CodeProject.AI ou Ollama; l'absence de backend IA est valide). Côté Agent, `/healthz` agrège `agent_health` et `live`, tandis que `/health/live` expose la dégradation du pipeline IA. Aucun health check Central distinct du broker distant n'est enregistré; voir [`HealthController`](../src/Heimdall.Web/Controllers/HealthController.cs), [`AiHealthCheck`](../src/Heimdall.Infrastructure/HealthChecks/AiHealthCheck.cs) et [`Agent Program`](../src/Heimdall.Agent/Program.cs).
- Tests : xUnit + Shouldly + NSubstitute + bUnit + Testcontainers
---
+1
View File
@@ -8,6 +8,7 @@ description: Keep Heimdall container health probes aligned with the HTTP methods
Use this workflow when changing `Dockerfile` health checks, Central Compose health checks, or Web health endpoint routing.
- Central and Agent containers probe `/healthz` on port 8080 (the development Agent may bind its host-mapped port). ASP.NET maps this route for `GET`; a `HEAD` request returns 405 and marks a live server unhealthy.
- When documenting health status, compare each summary with the registered check names/tags and endpoint filters in Web and Agent. Web `/healthz` is liveness, `/readyz` checks the `ready` PostgreSQL and selected-storage dependencies, and `/health/live` selects the `live` PostgreSQL and optional configured AI backend check. Agent `/healthz` runs its registered health checks; `/health/live` selects only the Agent pipeline-degradation check. Do not claim a Central broker health check unless one is registered.
- In the Alpine image, use BusyBox `wget` with `-O /dev/null` to issue a GET and discard the body. Do not use `--spider`, because BusyBox implements it as HEAD.
- Apply this to both `docker/Dockerfile`/Central Compose and `docker/Dockerfile.agent`/Agent development Compose. Keep the image and Compose probes consistent, with bounded timeout/retries and no published health endpoint required.
- For acceptance, build the changed Central or Agent image from source under a project-unique tag in a unique Compose project with a generated `.env`, synthetic credentials, a loopback-only unused port, and project-scoped volumes/network. Install an EXIT cleanup trap before build/start. Verify a GET health probe succeeds and an equivalent HEAD receives the endpoint's 405; then confirm the changed service reports healthy. In cleanup remove only that project with `down --volumes --remove-orphans`, verify no labeled containers/volumes/networks remain, remove and inspect each exact local image tag even on failure, and retain shared base images. Preserve the test exit status and report cleanup failures.