Files
Heimdall/skills/agent-update-acceptance/SKILL.md
T
arnaud.dartois 636154572b
Heimdall Gitea / Detect CI scope (push) Successful in 6s
Heimdall Gitea / Build and tests (push) Successful in 19m19s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and scan server image (push) Successful in 6m13s
Heimdall Gitea / Build and scan agent image (push) Successful in 14m44s
Heimdall Gitea / Publish Docker Hub latest tags (push) Successful in 1m48s
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Successful in 19m9s
Heimdall Gitea / CI policy (push) Successful in 10s
Complete remaining Heimdall features and acceptance
Merge pull request #138

Co-authored-by: Arnaud Dartois <admin@tordais.cc>
2026-11-06 11:14:49 +01:00

3.2 KiB

name, description
name description
heimdall-agent-update-acceptance Validate Heimdall native Agent install, signed update, startup health, and rollback behavior.

Native Agent update acceptance

Use this skill when changing install/install-agent.sh, install/install-agent.ps1, install/agent-supervisor.py, or install/agent-update-supervisor.ps1.

Linux rollback simulation

  • Run python3 -m unittest discover -s scripts/ci -p 'test_*.py' -k supervisor_rolls_back_failed_startup_to_previous_release.
  • The test creates two synthetic release directories and a current link to the candidate, writes a pending-update marker, and injects a fake dotnet executable that exits immediately with failure.
  • Verify the supervisor returns 75, atomically points current back at the prior release, removes pending-update.json, and reports that the previous release was restored. The fixture must live in TemporaryDirectory and leave no files behind.
  • This covers only the startup-failure rollback branch. It does not validate HTTP update discovery, signed archive verification, a 60-second healthy startup window, systemd, Windows service behavior, or a real Agent host.

Local and host acceptance boundary

  • Keep HEIMDALL_SOURCE_BASE_URL limited to Heimdall-owned installer assets; vendor runtimes and dependencies must use their official distribution channels.
  • For updates, exercise both successful and rejected signatures before installation. Preserve the previous release until the candidate has reported the expected version and stayed healthy for the configured stability interval.
  • Use a temporary install root and fake runtime for local failure/rollback tests. Never point these tests at /usr/local, a real systemd service, production credentials, or an installed Agent state directory.
  • Report Linux and Windows real-host install/update/rollback as open until each OS has been exercised with a real service and the expected signing configuration.

Central installer asset delivery

  • Heimdall.Web.csproj publishes the Linux/Windows Agent installers and their supervisors under wwwroot/install/; Program.ConfigureMiddleware serves them through ASP.NET Core static files.
  • ASP.NET Core's default MIME table does not recognize .py. Add .py to a FileExtensionContentTypeProvider explicitly or /install/agent-supervisor.py returns 404 despite being present in wwwroot.
  • For changes to these assets or static-file configuration, build Central from the current source in a disposable Compose project and GET /install/install-agent.sh and /install/agent-supervisor.py. Require HTTP 200 and byte-for-byte equality with their source files. Also require /healthz healthy.
  • Follow skills/compose-disposable-recipe/SKILL.md: use generated credentials, isolated ports/project volumes/network, a unique Central image tag, and an EXIT trap installed before build. Verify all project containers, volumes, and networks are gone and remove/verify absence of the exact local image tag. Keep shared base images.
  • A successful local acceptance proves the source-built Central serves the files; it does not prove a deployed Central image has been rebuilt or restarted. Confirm deployed endpoints separately before calling an incident resolved.