diff --git a/crates/idunn-daemon/src/main.rs b/crates/idunn-daemon/src/main.rs index 568ed02..739f9ce 100644 --- a/crates/idunn-daemon/src/main.rs +++ b/crates/idunn-daemon/src/main.rs @@ -937,11 +937,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 12: move Vili and remaining runtime daemons from compatibility probes to daemon-published RUDP state, with Raven Muninn scheduled-task action repair queued as a background-only ops invariant." + "Phase 12: move Vili and remaining runtime daemons from compatibility probes to daemon-published RUDP state; Raven Muninn scheduled-task actions are now verified background-only, while Vili Raven refresh remains the next shared-host deployment cut." .to_string(), next_target: next_target.to_string(), cut_line: - "Muninn, Idunn, Odin, Stonks, Weksa, VoidBot, Nightwing Gjallar, Mimir Eve dashboard, Nightwing Eve dashboard, and Nightwing Eve browser reference now exercise daemon-owned RUDP health. Vili has an in-process RUDP health publisher with local Idunn acceptance proof, but live Raven deployment and GameCult\\Vili restart remain blocked while Raven SSH is unreachable. Live Raven also still needs GameCult-Muninn, GameCult-Muninn-Activate, and GameCult-Muninn-VideoProof task actions repaired to execute wscript.exe hidden launchers directly." + "Muninn, Idunn, Odin, Stonks, Weksa, VoidBot, Nightwing Gjallar, Mimir Eve dashboard, Nightwing Eve dashboard, and Nightwing Eve browser reference now exercise daemon-owned RUDP health. Vili has an in-process RUDP health publisher with local Idunn acceptance proof, but live Raven deployment and GameCult\\Vili restart remain blocked until the Raven Vili task is refreshed and verified. Live Raven Muninn task actions have been repaired and verified to execute wscript.exe hidden launchers directly for GameCult-Muninn, GameCult-Muninn-Activate, and GameCult-Muninn-VideoProof." .to_string(), verification_layer: "CultMesh keepalive store records plus live Idunn decision cycles, not process exit codes or chat summaries." @@ -1222,7 +1222,7 @@ fn daemon_surgery_plan(target: &DaemonTarget, updated_at: &str) -> IdunnDaemonSu status = "partial-rudp-health-live"; owner = "Muninn Rust runtime plus Raven background-only launcher surface"; current_mechanism = - "Muninn can publish daemon health over CultNet/RUDP, and Odin has a repair actuator that registers Raven scheduled tasks with wscript.exe hidden launcher actions. Live Raven still has reported raw .cmd task actions for GameCult-Muninn, GameCult-Muninn-Activate, and GameCult-Muninn-VideoProof until the repair can be applied on the host." + "Muninn can publish daemon health over CultNet/RUDP. Live Raven scheduled tasks GameCult-Muninn, GameCult-Muninn-Activate, and GameCult-Muninn-VideoProof have been repaired and verified to execute wscript.exe //B //Nologo hidden launcher actions directly; .cmd wrappers are manual compatibility trampolines only." .to_string(); intended_authority = "Muninn publishes telemetry and daemon health over CultNet/RUDP; Raven Task Scheduler owns only background launch of hidden WScript/PowerShell launchers and never visible .cmd trampoline execution." @@ -1231,16 +1231,12 @@ fn daemon_surgery_plan(target: &DaemonTarget, updated_at: &str) -> IdunnDaemonSu "Cut raw .cmd scheduled-task actions on Raven. .cmd files may remain manual compatibility trampolines only when Task Scheduler executes the hidden VBS launcher directly." .to_string(); steps = vec![ - "Apply scripts/repair-raven-muninn-task-actions.ps1 when Raven SSH is reachable.".to_string(), - "Verify GameCult-Muninn action executes wscript.exe with start-muninn-serve-hidden.vbs arguments.".to_string(), - "Verify GameCult-Muninn-Activate action executes wscript.exe with activate-raven-av-srt-hidden.vbs arguments.".to_string(), - "Verify GameCult-Muninn-VideoProof action executes wscript.exe with muninn-raven-video-to-starfire-obs-hidden.vbs arguments.".to_string(), + "Keep scripts/repair-raven-muninn-task-actions.ps1 using sftp plus a tiny remote runner so Windows command-line length does not block future hidden-task repair.".to_string(), + "Keep GameCult-Muninn action executing wscript.exe with start-muninn-serve-hidden.vbs arguments.".to_string(), + "Keep GameCult-Muninn-Activate action executing wscript.exe with activate-raven-av-srt-hidden.vbs arguments.".to_string(), + "Keep GameCult-Muninn-VideoProof action executing wscript.exe with muninn-raven-video-to-starfire-obs-hidden.vbs arguments.".to_string(), "Keep Raven health/restart actuators background-only; no visible terminals or interactive windows on the shared host.".to_string(), ]; - blockers.push( - "Raven SSH currently times out, so the prepared task-action repair cannot be applied live." - .to_string(), - ); } "starfire-muninn" | "nightwing-muninn" => { owner = "Muninn Rust runtime"; @@ -2332,7 +2328,8 @@ mod tests { ); assert!(plan.cut_line.contains("GameCult-Muninn-Activate")); assert!(plan.cut_line.contains("GameCult-Muninn-VideoProof")); - assert!(plan.cut_line.contains("Raven SSH is unreachable")); + assert!(plan.cut_line.contains("Muninn task actions")); + assert!(plan.cut_line.contains("verified")); assert!(plan.verification_layer.contains("CultMesh keepalive store")); assert!( plan.invariants @@ -2359,8 +2356,9 @@ mod tests { assert!( raven_plan .current_mechanism - .contains("raw .cmd task actions") + .contains("repaired and verified") ); + assert!(raven_plan.current_mechanism.contains("wscript.exe")); assert!( raven_plan .cut_line @@ -2369,12 +2367,7 @@ mod tests { assert!(raven_plan.steps.iter().any( |step| step.contains("GameCult-Muninn-VideoProof") && step.contains("wscript.exe") )); - assert!( - raven_plan - .blockers - .iter() - .any(|blocker| blocker.contains("Raven SSH currently times out")) - ); + assert!(raven_plan.blockers.is_empty()); let weksa_plan = daemon_surgery_plan(&weksa, "unix:100"); assert_eq!( diff --git a/scripts/activate-muninn-raven-av-srt.ps1 b/scripts/activate-muninn-raven-av-srt.ps1 index df15100..2eb9cea 100644 --- a/scripts/activate-muninn-raven-av-srt.ps1 +++ b/scripts/activate-muninn-raven-av-srt.ps1 @@ -76,6 +76,31 @@ Register-ScheduledTask -TaskName "GameCult-Muninn-Activate" -Action `$taskAction Start-ScheduledTask -TaskName "GameCult-Muninn-Activate" "@ -$encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($remoteScript)) -& ssh.exe -o BatchMode=yes -o ConnectTimeout=10 $RavenHost "powershell.exe -NoProfile -NonInteractive -EncodedCommand $encoded" +$uploadId = [guid]::NewGuid().ToString("N") +$localRemoteScript = Join-Path $env:TEMP "odin-raven-muninn-activate-$uploadId.ps1" +$localSftpBatch = Join-Path $env:TEMP "odin-raven-muninn-activate-$uploadId.sftp" +$remoteSftpPath = "C:/Windows/Temp/odin-raven-muninn-activate-$uploadId.ps1" +$remotePsPath = "C:\Windows\Temp\odin-raven-muninn-activate-$uploadId.ps1" +try { + Set-Content -LiteralPath $localRemoteScript -Encoding ASCII -Value $remoteScript + Set-Content -LiteralPath $localSftpBatch -Encoding ASCII -Value "put ""$localRemoteScript"" ""$remoteSftpPath""" + & sftp.exe -b $localSftpBatch $RavenHost + if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE + } + $remoteRunner = @" +`$ErrorActionPreference = "Stop" +try { + & "$remotePsPath" + `$code = `$LASTEXITCODE +} finally { + Remove-Item -LiteralPath "$remotePsPath" -Force -ErrorAction SilentlyContinue +} +exit `$code +"@ + $encodedRunner = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($remoteRunner)) + & ssh.exe -o BatchMode=yes -o ConnectTimeout=10 $RavenHost "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -EncodedCommand $encodedRunner" +} finally { + Remove-Item -LiteralPath $localRemoteScript, $localSftpBatch -Force -ErrorAction SilentlyContinue +} exit $LASTEXITCODE diff --git a/scripts/repair-raven-muninn-task-actions.ps1 b/scripts/repair-raven-muninn-task-actions.ps1 index c537a72..5ebdd1f 100644 --- a/scripts/repair-raven-muninn-task-actions.ps1 +++ b/scripts/repair-raven-muninn-task-actions.ps1 @@ -95,6 +95,31 @@ if (Test-Path -LiteralPath `$videoProofVbs) { } "@ -$encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($remoteScript)) -& ssh.exe -o BatchMode=yes -o ConnectTimeout=10 $RavenHost "powershell.exe -NoProfile -NonInteractive -EncodedCommand $encoded" +$uploadId = [guid]::NewGuid().ToString("N") +$localRemoteScript = Join-Path $env:TEMP "odin-raven-muninn-task-repair-$uploadId.ps1" +$localSftpBatch = Join-Path $env:TEMP "odin-raven-muninn-task-repair-$uploadId.sftp" +$remoteSftpPath = "C:/Windows/Temp/odin-raven-muninn-task-repair-$uploadId.ps1" +$remotePsPath = "C:\Windows\Temp\odin-raven-muninn-task-repair-$uploadId.ps1" +try { + Set-Content -LiteralPath $localRemoteScript -Encoding ASCII -Value $remoteScript + Set-Content -LiteralPath $localSftpBatch -Encoding ASCII -Value "put ""$localRemoteScript"" ""$remoteSftpPath""" + & sftp.exe -b $localSftpBatch $RavenHost + if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE + } + $remoteRunner = @" +`$ErrorActionPreference = "Stop" +try { + & "$remotePsPath" + `$code = `$LASTEXITCODE +} finally { + Remove-Item -LiteralPath "$remotePsPath" -Force -ErrorAction SilentlyContinue +} +exit `$code +"@ + $encodedRunner = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($remoteRunner)) + & ssh.exe -o BatchMode=yes -o ConnectTimeout=10 $RavenHost "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -EncodedCommand $encodedRunner" +} finally { + Remove-Item -LiteralPath $localRemoteScript, $localSftpBatch -Force -ErrorAction SilentlyContinue +} exit $LASTEXITCODE diff --git a/scripts/restart-muninn.ps1 b/scripts/restart-muninn.ps1 index 4f106b5..6fdd197 100644 --- a/scripts/restart-muninn.ps1 +++ b/scripts/restart-muninn.ps1 @@ -122,8 +122,33 @@ Assert-HiddenVbsTask -TaskName "GameCult-Muninn-VideoProof" -VbsPath `$videoProo Start-ScheduledTask -TaskName "GameCult-Muninn" "@ -$encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($remoteScript)) -& ssh.exe -o BatchMode=yes -o ConnectTimeout=10 $RavenHost "powershell.exe -NoProfile -NonInteractive -EncodedCommand $encoded" +$uploadId = [guid]::NewGuid().ToString("N") +$localRemoteScript = Join-Path $env:TEMP "odin-raven-muninn-restart-$uploadId.ps1" +$localSftpBatch = Join-Path $env:TEMP "odin-raven-muninn-restart-$uploadId.sftp" +$remoteSftpPath = "C:/Windows/Temp/odin-raven-muninn-restart-$uploadId.ps1" +$remotePsPath = "C:\Windows\Temp\odin-raven-muninn-restart-$uploadId.ps1" +try { + Set-Content -LiteralPath $localRemoteScript -Encoding ASCII -Value $remoteScript + Set-Content -LiteralPath $localSftpBatch -Encoding ASCII -Value "put ""$localRemoteScript"" ""$remoteSftpPath""" + & sftp.exe -b $localSftpBatch $RavenHost + if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE + } + $remoteRunner = @" +`$ErrorActionPreference = "Stop" +try { + & "$remotePsPath" + `$code = `$LASTEXITCODE +} finally { + Remove-Item -LiteralPath "$remotePsPath" -Force -ErrorAction SilentlyContinue +} +exit `$code +"@ + $encodedRunner = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($remoteRunner)) + & ssh.exe -o BatchMode=yes -o ConnectTimeout=10 $RavenHost "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -EncodedCommand $encodedRunner" +} finally { + Remove-Item -LiteralPath $localRemoteScript, $localSftpBatch -Force -ErrorAction SilentlyContinue +} $restartExit = $LASTEXITCODE if ($restartExit -eq 0) { Start-Sleep -Seconds 2 diff --git a/src/Idunn/README.md b/src/Idunn/README.md index 7a033d2..3848be2 100644 --- a/src/Idunn/README.md +++ b/src/Idunn/README.md @@ -208,15 +208,18 @@ containing provider advertisement, market snapshot, Eve surface, command boundary, and transport profile records; Odin local discovery can ingest that store as provider truth. StreamPixels now publishes a service-owned CultCache boundary store with provider advertisement, command boundary, transport profile, -and Idunn health summary; Odin local discovery can ingest that store, but -StreamPixels still owes CultNet/RUDP health publication and Yggdrasil deployment -before SSH/systemd/HTTP probes are only debug witnesses. Raven Muninn task -actions are also an explicit ops -invariant: Task Scheduler must execute `wscript.exe //B //Nologo` hidden -launcher actions directly for `GameCult-Muninn`, `GameCult-Muninn-Activate`, -and `GameCult-Muninn-VideoProof`, never raw `.cmd` wrappers. After those live -cuts, continue daemon-by-daemon until compatibility HTTP, TCP, WebSocket, and -command probes are fallback witnesses only. +and Idunn health summary; Odin local discovery can ingest that store, and local +Idunn has accepted StreamPixels daemon health over CultNet/RUDP. Yggdrasil +deployment remains owed before SSH/systemd/HTTP probes are only debug +witnesses. Raven Muninn task actions are also an explicit ops invariant: Task +Scheduler must execute `wscript.exe //B //Nologo` hidden launcher actions +directly for `GameCult-Muninn`, `GameCult-Muninn-Activate`, and +`GameCult-Muninn-VideoProof`, never raw `.cmd` wrappers. Those three live Raven +tasks have been repaired and verified. The repair actuator now uploads its +Raven PowerShell body with `sftp` and runs a tiny cleanup wrapper, so the +hidden-task repair does not hit Windows command-line limits before it can run. +After those live cuts, continue daemon-by-daemon until compatibility HTTP, TCP, +WebSocket, and command probes are fallback witnesses only. Rust no longer gets to claim the transport is imaginary: `vendor/cultnet-rs` includes the canonical CNR0 `cultnet.transport.rudp.v0`