Publish Raven Muninn health without visible task popups

This commit is contained in:
Meta Vens 2026-06-16 01:27:45 +01:00
commit 38f3c779c3
5 changed files with 57 additions and 39 deletions

View file

@ -636,9 +636,9 @@ fn swarm_surgery_plan(
targets: &[DaemonTarget],
updated_at: &str,
) -> IdunnSwarmSurgeryPlanRecord {
let has_raven_muninn = targets.iter().any(|target| target.daemon_id == "muninn");
let next_target = if has_raven_muninn {
"muninn"
let has_odin = targets.iter().any(|target| target.daemon_id == "odin");
let next_target = if has_odin {
"odin"
} else if let Some(target) = targets.iter().find(|target| target.enabled) {
target.daemon_id.as_str()
} else {
@ -670,11 +670,11 @@ fn swarm_surgery_plan(
"5. Delete or demote compatibility probes once every target has daemon-owned publication and advertised lifecycle authority.".to_string(),
],
current_phase:
"Phase 4: extend daemon-published RUDP health from Starfire and Nightwing Muninn to the Raven Muninn lane."
"Phase 5: move Odin's own provider health from compatibility command evidence to daemon-published RUDP state."
.to_string(),
next_target: next_target.to_string(),
cut_line:
"Starfire and Nightwing Muninn now publish daemon-owned RUDP health. Raven Muninn still needs the same route before its SSH command probe can be demoted."
"All Muninn lanes now publish daemon-owned RUDP health. Odin remains the next critical provider-health cut before its local command probe can be demoted."
.to_string(),
verification_layer:
"CultMesh keepalive store records plus live Idunn decision cycles, not process exit codes or chat summaries."
@ -1686,7 +1686,7 @@ mod tests {
}
#[test]
fn swarm_surgery_plan_names_raven_muninn_after_starfire_and_nightwing_cuts() {
fn swarm_surgery_plan_names_odin_after_muninn_cuts() {
let starfire_muninn = DaemonTarget {
daemon_id: "starfire-muninn".to_string(),
verse_id: "starfire.local".to_string(),
@ -1749,9 +1749,9 @@ mod tests {
assert_eq!(plan.plan_id, "swarm-surgery:starfire-local");
assert_eq!(plan.status, "active-transport-migration");
assert_eq!(plan.next_target, "muninn");
assert!(plan.current_phase.contains("Raven Muninn"));
assert!(plan.cut_line.contains("Raven Muninn"));
assert_eq!(plan.next_target, "odin");
assert!(plan.current_phase.contains("Odin"));
assert!(plan.cut_line.contains("All Muninn lanes"));
assert!(plan.verification_layer.contains("CultMesh keepalive store"));
assert!(
plan.invariants

View file

@ -199,6 +199,11 @@ idunn.rudp_health_ingress.v1
screen/audio streams as part of keepalive. Raven A/V over SRT is an explicit
activation path through `activate-muninn-raven-av-srt.ps1`, not daemon
startup behavior.
- Raven is an operator-consented shared machine. Idunn restart and health
actuators for Raven must be background-only and must not open visible
terminals or interactive windows on that host. The Raven Muninn restart path
uses a hidden WScript/PowerShell trampoline; replacing it with an interactive
console launch violates the ops contract.
- Nightwing Gjallar deployment freshness and visible composition health are now
part of Idunn's ops role. `health-nightwing-gjallar.ps1` verifies
`gjallar.service` liveness, the remote deployment manifest at
@ -255,16 +260,16 @@ The local swarm mode owns:
Yggdrasil checks.
Current plan surface: `idunn.swarm_surgery_plan.v1` for profile
`starfire-local` treats Starfire Muninn and Nightwing Muninn as completed Rust
cuts. Muninn's `--health` mode publishes `idunn.daemon_health` over RUDP;
Starfire publishes to local Idunn, and Nightwing publishes over WireGuard to
`10.77.0.2:17870` using the `nightwing-muninn` daemon id and
`muninn.cultnet-rudp-remote-telemetry-and-move-hid` contract. Live Idunn cycles
accept both records before command-probe fallback. The plan's current phase now
points at the Raven `muninn` lane.
`starfire-local` treats the Muninn Rust lanes as completed cuts. Muninn's
`--health` mode publishes `idunn.daemon_health` over RUDP; Starfire publishes to
local Idunn, while Nightwing and Raven publish over WireGuard to
`10.77.0.2:17870` using their target daemon ids and health contracts. Live Idunn
cycles accept those records before command-probe fallback. The plan's current
phase now points at Odin's own provider-health lane.
Next: prove Idunn consumes Raven `muninn` daemon-published health, then continue
runtime-by-runtime until compatibility probes can be deleted or demoted.
Next: make Odin publish its own provider health over daemon-owned RUDP state,
then continue runtime-by-runtime until compatibility probes can be deleted or
demoted.
No ad hoc JSON manifest, HTTP endpoint, TCP socket, or WebSocket bridge may
become the live state owner. Debug projections are fine when they name the

View file

@ -198,9 +198,13 @@ missing or the Quest is unavailable, Muninn publishes `muninn.quest_access` as
Raven runs Muninn from `C:\Meta\Odin\Muninn`. `scripts/restart-muninn.ps1`
recreates the `GameCult-Muninn` scheduled task and writes
`start-muninn-serve.cmd` as a short trampoline into
`start-muninn-serve.ps1`; the PowerShell launcher starts `muninn.exe` with
`start-muninn-serve-hidden.vbs`, which launches `start-muninn-serve.ps1` with
`wscript.exe //B //Nologo`. The PowerShell launcher starts `muninn.exe` with
`-WindowStyle Hidden` and redirects logs under `C:\Meta\Odin\logs\muninn`.
The `.cmd` file must not be the long-lived foreground process.
Raven is an operator-consented host: Muninn operations on Raven must be
background-only and must not create visible terminal windows. The `.cmd` file
must not be the long-lived foreground process, and no restart/health path may
flash an interactive console on Raven.
Nightwing Muninn is kept alive by the single Idunn supervisor through the
`nightwing-muninn` daemon target. Idunn learns that target through Odin's typed

View file

@ -2,13 +2,14 @@ param(
[string] $RavenHost = "raven",
[string] $MuninnExe = "C:\Meta\Odin\Muninn\muninn.exe",
[string] $StorePath = "C:\Meta\Odin\state\muninn.telemetry.cc",
[string] $LocalStorePath = "C:\Meta\Odin\state\muninn.telemetry.cc"
[string] $IdunnRudpHealth = "10.77.0.2:17870"
)
$ErrorActionPreference = "Stop"
$remoteScript = @"
`$ErrorActionPreference = "Stop"
`$ProgressPreference = "SilentlyContinue"
if (-not (Test-Path -LiteralPath "$MuninnExe")) {
throw "Muninn executable not found at $MuninnExe"
}
@ -18,18 +19,16 @@ if (-not (Test-Path -LiteralPath "$MuninnExe")) {
if (`$null -eq `$process) {
throw "Muninn serve process is not running"
}
& "$MuninnExe" --health --store "$StorePath"
`$healthArgs = @(
"--health",
"--store", "$StorePath",
"--idunn-rudp-health", "$IdunnRudpHealth",
"--idunn-daemon", "muninn",
"--idunn-health-contract", "muninn.cultnet-rudp-remote-telemetry-health"
)
& "$MuninnExe" @healthArgs
"@
$encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($remoteScript))
& ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $RavenHost "powershell.exe -NoProfile -EncodedCommand $encoded"
$healthExit = $LASTEXITCODE
if ($healthExit -eq 0) {
$localParent = Split-Path -Parent $LocalStorePath
if (-not [string]::IsNullOrWhiteSpace($localParent)) {
New-Item -ItemType Directory -Force -Path $localParent | Out-Null
}
$remoteStore = "$RavenHost`:$StorePath"
& scp.exe $remoteStore "$LocalStorePath" | Out-Null
}
exit $healthExit
& ssh.exe -o BatchMode=yes -o ConnectTimeout=5 $RavenHost "powershell.exe -NoProfile -NonInteractive -EncodedCommand $encoded"
exit $LASTEXITCODE

View file

@ -2,14 +2,14 @@ param(
[string] $RavenHost = "raven",
[string] $MuninnExe = "C:\Meta\Odin\Muninn\muninn.exe",
[string] $StorePath = "C:\Meta\Odin\state\muninn.telemetry.cc",
[string] $LogRoot = "C:\Meta\Odin\logs\muninn",
[string] $LocalStorePath = "C:\Meta\Odin\state\muninn.telemetry.cc"
[string] $LogRoot = "C:\Meta\Odin\logs\muninn"
)
$ErrorActionPreference = "Stop"
$remoteScript = @"
`$ErrorActionPreference = "Stop"
`$ProgressPreference = "SilentlyContinue"
if (-not (Test-Path -LiteralPath "$MuninnExe")) {
throw "Muninn executable not found at $MuninnExe"
}
@ -23,30 +23,40 @@ New-Item -ItemType Directory -Force -Path (Split-Path -Parent "$StorePath") | Ou
`$muninnDir = Split-Path -Parent "$MuninnExe"
`$launcher = Join-Path `$muninnDir "start-muninn-serve.cmd"
`$psLauncher = Join-Path `$muninnDir "start-muninn-serve.ps1"
`$vbsLauncher = Join-Path `$muninnDir "start-muninn-serve-hidden.vbs"
`$pidPath = Join-Path "$LogRoot" "muninn-serve.pid"
`$psLines = @(
'`$ErrorActionPreference = "Stop"',
'`$ProgressPreference = "SilentlyContinue"',
'`$process = Start-Process -FilePath "$MuninnExe" -ArgumentList @("serve", "--store", "$StorePath", "--log-root", "$LogRoot", "--host", "raven", "--interval-seconds", "15") -WindowStyle Hidden -PassThru -RedirectStandardOutput "$LogRoot\muninn-serve.out.log" -RedirectStandardError "$LogRoot\muninn-serve.err.log"',
'`$process.Id | Set-Content -Encoding ASCII -LiteralPath "$LogRoot\muninn-serve.pid"'
)
Set-Content -LiteralPath `$psLauncher -Value `$psLines -Encoding ASCII
`$vbsLines = @(
'Set fso = CreateObject("Scripting.FileSystemObject")',
'scriptDir = fso.GetParentFolderName(WScript.ScriptFullName)',
'psLauncher = fso.BuildPath(scriptDir, "start-muninn-serve.ps1")',
'Set shell = CreateObject("WScript.Shell")',
'shell.Run "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -WindowStyle Hidden -File """ & psLauncher & """", 0, False'
)
Set-Content -LiteralPath `$vbsLauncher -Value `$vbsLines -Encoding ASCII
`$lines = @(
"@echo off",
"cd /d ""`$muninnDir""",
"powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File ""`$psLauncher"""
"wscript.exe //B //Nologo ""`$vbsLauncher"""
)
Set-Content -LiteralPath `$launcher -Value `$lines -Encoding ASCII
cmd /c "schtasks /Delete /TN GameCult-Muninn /F 2>NUL"
cmd /c schtasks /Create /TN GameCult-Muninn /SC ONCE /ST 23:59 /TR `$launcher /RL HIGHEST /F
cmd /c schtasks /Create /TN GameCult-Muninn /SC ONCE /ST 23:59 /TR `$launcher /RL LIMITED /F
cmd /c schtasks /Run /TN GameCult-Muninn
"@
$encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($remoteScript))
& ssh.exe -o BatchMode=yes -o ConnectTimeout=10 $RavenHost "powershell.exe -NoProfile -EncodedCommand $encoded"
& ssh.exe -o BatchMode=yes -o ConnectTimeout=10 $RavenHost "powershell.exe -NoProfile -NonInteractive -EncodedCommand $encoded"
$restartExit = $LASTEXITCODE
if ($restartExit -eq 0) {
Start-Sleep -Seconds 2
$healthScript = Join-Path $PSScriptRoot "health-muninn.ps1"
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File $healthScript -RavenHost $RavenHost -MuninnExe $MuninnExe -StorePath $StorePath -LocalStorePath $LocalStorePath
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File $healthScript -RavenHost $RavenHost -MuninnExe $MuninnExe -StorePath $StorePath
}
exit $restartExit