Co-authored-by: Arnaud Dartois <admin@tordais.cc>
1.9 KiB
name, description
| name | description |
|---|---|
| agent-startup-composition | Validate Heimdall Agent dependency-injection composition by starting its source-built container without a Central dependency. |
Agent startup composition
src/Heimdall.Agent/Program.cs constructs SnapshotPipelineServiceOptions in
the service-registration factory before registering the hosted service. Do not
register SnapshotPipelineService with the generic AddHostedService<T>()
unless every constructor dependency, including that options record, is
registered in DI. A missing dependency can prevent Host.StartAsync and leave
the Agent container unable to start.
Acceptance
Run bash skills/agent-startup-composition/acceptance.sh from the repository
root. The recipe builds only the CPU Agent image from the current checkout with
a unique local tag and starts it in a disposable Compose project with generated
site-token data and an internal-only network. Its Central URL points to the
Agent container's own unused loopback port; it cannot reach a deployment.
The recipe proves that:
- The Agent host starts and remains running with its production service
registrations, including
SnapshotPipelineService. /health/liveresponds successfully before registration with Central; the readiness endpoint/healthzis intentionally not used because it reports Unhealthy until Central registration succeeds.- Startup logs do not contain the missing
SnapshotPipelineServiceOptionsdependency or a host-start failure. - Cleanup removes the exact Compose project, generated state volume/network, and this recipe's one exact Agent image tag, then verifies their absence.
This checks DI and host startup only. It does not validate Central registration, camera discovery, model inference, a published Agent, or a deployed installation. The EXIT trap preserves the test result, attempts each cleanup independently, and reports cleanup failures. The Dockerfile's shared .NET base images remain.