Route agent deployments through Idunn

This commit is contained in:
Meta Vens 2026-06-17 00:16:07 +01:00
commit d9b5d49988
14 changed files with 67 additions and 0 deletions

View file

@ -49,6 +49,9 @@ Idunn brings them up after reboots or crashes, watches health, and escalates
operator-needed failures through Bifrost's CultMesh bridge. VoidBot owner-DM
delivery is a demoted compatibility actuator, not the owner; the command belongs
in Bifrost's Verse. Odin sees the daemons; Idunn keeps the apples from rotting.
Agents do not deploy daemons directly. They configure Idunn's target catalog,
release targets, migration commands, and command boundaries so Idunn can run
the shared rollout primitive and leave typed witnesses behind.
Local package surfaces:

View file

@ -2405,6 +2405,8 @@ fn run_shell(command: &str, timeout_seconds: u64) -> Result<std::process::Output
};
let child = process
.env("IDUNN_ACTUATOR", "1")
.env("IDUNN_COMMAND_AUTHORITY", "idunn-daemon")
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.spawn()

View file

@ -33,6 +33,9 @@ escalation, and continuity witness state.
restarts behind Odin refresh logic. Individual daemons should not carry
independent crash-recovery loops once Idunn owns their lifecycle path; they
publish health, surfaces, state witnesses, and command boundaries instead.
Agents are also forbidden deploy writers: they configure Idunn release
targets, command boundaries, migration commands, and rollout policy, then let
Idunn actuate and witness deployment. They do not run deploy scripts by hand.
- Shared paths: manual operator deploy/restart, scheduled deploy/restart,
degraded-health repair, boot rehydration, and future remote worker recovery
must pass through the same Idunn command primitive.
@ -249,6 +252,10 @@ idunn.rudp_health_ingress.v1
`idunn.state_migration_result.v1`, stops the deployment, records a failed
rollout/deployment result, and alarms instead of trying to repair state
behind the daemon's back.
- Deploy scripts are Idunn actuators, not agent tools. They refuse to run
unless Idunn invokes them with `IDUNN_ACTUATOR=1`. Agent work is to update the
target catalog, release target, command boundary, migration plan, and daemon
publication surfaces so Idunn can run the shared command primitive.
- Zero downtime is a declared rollout capability, not a slogan. If a daemon
lacks hot reload, blue/green routing, rolling instances, or another named
in-place swap mechanism, Idunn records `restart-required` and verifies the

View file

@ -1,2 +1,6 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo This deployment wrapper is an Idunn actuator. Configure Idunn; do not deploy manually.
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\deploy-nightwing-gjallar.ps1

View file

@ -3,6 +3,7 @@ param(
[string] $SshTarget = "nwroot",
[string] $RemoteDir = "/opt/gamecult/gjallar",
[string] $CultCachePath = "/var/lib/gamecult/gjallar/cultcache/gjallar.service.cc",
[string] $OdinCultNetRudp = "192.168.1.66:17871",
[string] $IdunnRudpHealth = "10.77.0.2:17870",
[string] $IdunnDaemon = "nightwing-gjallar",
[string] $IdunnHealthContract = "gjallar.cultnet-rudp-framebuffer-composition-health",
@ -12,6 +13,10 @@ param(
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1") {
throw "This deployment script is an Idunn actuator. Agents must configure Idunn release targets and let Idunn run deployment; do not invoke deploy scripts manually."
}
$sourceRef = "$UpstreamRemote/$UpstreamBranch"
$scratchRoot = Join-Path $GjallarRoot "scratch"
$releaseSource = Join-Path $scratchRoot "idunn-release-source"
@ -83,6 +88,7 @@ $cultCacheDir = if ($CultCachePath.LastIndexOf('/') -gt 0) { $CultCachePath.Subs
$dropIn = @"
[Service]
Environment=GJALLAR_CULTCACHE_PATH=$CultCachePath
Environment=GJALLAR_ODIN_CULTNET_RUDP=$OdinCultNetRudp
Environment=GJALLAR_IDUNN_RUDP_HEALTH=$IdunnRudpHealth
Environment=GJALLAR_IDUNN_DAEMON=$IdunnDaemon
Environment=GJALLAR_IDUNN_HEALTH_CONTRACT=$IdunnHealthContract

View file

@ -1,2 +1,6 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo This deployment wrapper is an Idunn actuator. Configure Idunn; do not deploy manually.
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\deploy-yggdrasil-heimdall.ps1

View file

@ -16,6 +16,10 @@ param(
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1") {
throw "This deployment script is an Idunn actuator. Agents must configure Idunn release targets and let Idunn run deployment; do not invoke deploy scripts manually."
}
foreach ($path in @($RepoRoot, $CultLibRoot, $DeployScript, $CheckScript)) {
if (-not (Test-Path -LiteralPath $path)) {
throw "Required path not found: $path"

View file

@ -1,2 +1,6 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo This deployment wrapper is an Idunn actuator. Configure Idunn; do not deploy manually.
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\deploy-yggdrasil-repixelizer.ps1

View file

@ -16,6 +16,10 @@ param(
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1") {
throw "This deployment script is an Idunn actuator. Agents must configure Idunn release targets and let Idunn run deployment; do not invoke deploy scripts manually."
}
foreach ($path in @($RepoRoot, $CultLibRoot, $DeployScript, $CheckScript)) {
if (-not (Test-Path -LiteralPath $path)) {
throw "Required path not found: $path"

View file

@ -14,6 +14,10 @@ param(
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1") {
throw "This deployment script is an Idunn actuator. Agents must configure Idunn release targets and let Idunn run deployment; do not invoke deploy scripts manually."
}
if (-not (Test-Path -LiteralPath $RepoRoot)) {
throw "Repo root not found: $RepoRoot"
}

View file

@ -1,2 +1,6 @@
@echo off
if not "%IDUNN_ACTUATOR%"=="1" (
echo This deployment wrapper is an Idunn actuator. Configure Idunn; do not deploy manually.
exit /b 1
)
powershell.exe -NoProfile -ExecutionPolicy Bypass -File E:\Projects\Odin\scripts\deploy-yggdrasil-streampixels.ps1

View file

@ -16,6 +16,10 @@ param(
$ErrorActionPreference = "Stop"
if ($env:IDUNN_ACTUATOR -ne "1") {
throw "This deployment script is an Idunn actuator. Agents must configure Idunn release targets and let Idunn run deployment; do not invoke deploy scripts manually."
}
foreach ($path in @($RepoRoot, $CultLibRoot, $DeployScript, $CheckScript)) {
if (-not (Test-Path -LiteralPath $path)) {
throw "Required path not found: $path"

View file

@ -8,6 +8,14 @@ $enforcedWithoutHealth = @($IdunnDeploymentTargets | Where-Object { $_.Status -i
$enforcedWithoutUpstream = @($IdunnDeploymentTargets | Where-Object { $_.Status -eq "enforced" -and ([string]::IsNullOrWhiteSpace($_.UpstreamRemote) -or [string]::IsNullOrWhiteSpace($_.UpstreamBranch)) })
$enforcedWithoutRollout = @($IdunnDeploymentTargets | Where-Object { $_.Status -eq "enforced" -and ([string]::IsNullOrWhiteSpace($_.RolloutStrategy) -or [string]::IsNullOrWhiteSpace($_.StateMigration) -or [string]::IsNullOrWhiteSpace($_.ZeroDowntime)) })
$blockedWithoutReason = @($IdunnDeploymentTargets | Where-Object { $_.Status -in @("blocked", "external-owned") -and [string]::IsNullOrWhiteSpace($_.Reason) })
$deployScriptsWithoutIdunnGuard = @(
$IdunnDeploymentTargets |
Where-Object { $_.Status -eq "enforced" -and -not [string]::IsNullOrWhiteSpace($_.Deploy) } |
Where-Object {
-not (Test-Path -LiteralPath $_.Deploy) -or
-not ((Get-Content -Raw -LiteralPath $_.Deploy) -match 'IDUNN_ACTUATOR')
}
)
$issues = @()
if ($unknown.Count) {
@ -25,6 +33,9 @@ if ($enforcedWithoutUpstream.Count) {
if ($enforcedWithoutRollout.Count) {
$issues += "enforced target missing rollout/migration/downtime contract: $($enforcedWithoutRollout.Id -join ', ')"
}
if ($deployScriptsWithoutIdunnGuard.Count) {
$issues += "enforced deploy script missing Idunn actuator guard: $($deployScriptsWithoutIdunnGuard.Id -join ', ')"
}
if ($blockedWithoutReason.Count) {
$issues += "blocked/external target missing reason: $($blockedWithoutReason.Id -join ', ')"
}

View file

@ -198,6 +198,12 @@ stops the rollout and raises an operator alarm. Zero downtime is recorded only
when the target declares a real in-place, blue/green, or rolling strategy;
otherwise Idunn says `restart-required` and verifies that path honestly.
Deploy scripts are Idunn actuators. Agents should configure the target catalog,
release target, command boundary, migration command, and daemon publication
surface, then let Idunn run the rollout. Direct script execution without
`IDUNN_ACTUATOR=1` fails on purpose; the little hand reaching for the deploy
button has been removed from the machine.
The daemon itself defaults to `127.0.0.1:17870`, but
`scripts/start-idunn-local.ps1` launches the local swarm with
`--rudp-health-bind 0.0.0.0:17870` so WireGuard peers such as Raven and