PC 1 helper scripts: a probe dev line answered in helper.log proves the helper up when its heartbeat file stays stale (the 02:45Z restore answered with helper.alive stale past 60 s)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-08 02:47:46 +00:00
parent 44b79bcb1c
commit a71c31d552
4 changed files with 36 additions and 8 deletions

View file

@ -48,8 +48,15 @@ function HelperReset() {
Start-Sleep -Seconds 2
try { Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop } catch { $t = "$_" -replace '\s+', ' '; "RESULT helper start refused: $t"; if ($t -match '800710E0') { 'RESULT helper STOP: the scheduler refused the elevated instance (0x800710E0); nothing escalates' }; return $false }
$t = 0
while ($t -lt 60) { Start-Sleep -Seconds 1; $t++; if ((HelperAliveAge) -le 4) { "RESULT helper fresh after $t s (helper.alive within 4 s; started over an empty cmd.txt)"; return $true } }
'RESULT helper STOP: helper.alive never freshened within 60 s of the start; nothing escalates'
while ($t -lt 20) { Start-Sleep -Seconds 1; $t++; if ((HelperAliveAge) -le 4) { "RESULT helper fresh after $t s (helper.alive within 4 s; started over an empty cmd.txt)"; return $true } }
# the 0.3.20 helper's heartbeat file does not freshen on every run (the 02:45Z restore: stale past 60 s, the rgc answered at once), so a
# probe dev line answered in helper.log is the proof when the heartbeat is not
$s0 = HelperSeqBase
$mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count }
Set-Content -LiteralPath $cmdFile -Value "$s0 dev $idx`n" -NoNewline -Encoding ascii
$t2 = 0
while ($t2 -lt 20) { Start-Sleep -Seconds 1; $t2++; $new = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue); if ($new.Count -gt $mark -and ($new[$mark..($new.Count - 1)] | Where-Object { $_ -match "\b$s0 dev " })) { "RESULT helper up after $($t + $t2) s (the heartbeat stale, the probe dev line $s0 answered in helper.log)"; return $true } }
'RESULT helper STOP: no heartbeat within 20 s and no answer to a probe dev line within 20 more; nothing escalates'
return $false
}
function HelperSeqBase() { $m = 0; foreach ($f in @($cmdFile, $helperLog)) { if (Test-Path $f) { foreach ($l in (Get-Content -LiteralPath $f -ErrorAction SilentlyContinue)) { if ($l -match '(?:^|\s)(\d{1,6}) (?:dev|pl|lgc|rgc|lmc|rmc|nvidia-smi|reregister)\b') { $v = [int]$Matches[1]; if ($v -gt $m) { $m = $v } } } } }; return $m + 100 }

View file

@ -41,8 +41,15 @@ function HelperReset() {
Start-Sleep -Seconds 2
try { Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop } catch { $t = "$_" -replace '\s+', ' '; "RESULT helper start refused: $t"; if ($t -match '800710E0') { 'RESULT helper STOP: the scheduler refused the elevated instance (0x800710E0); nothing escalates' }; return $false }
$t = 0
while ($t -lt 60) { Start-Sleep -Seconds 1; $t++; if ((HelperAliveAge) -le 4) { "RESULT helper fresh after $t s (helper.alive within 4 s; started over an empty cmd.txt)"; return $true } }
'RESULT helper STOP: helper.alive never freshened within 60 s of the start; nothing escalates'
while ($t -lt 20) { Start-Sleep -Seconds 1; $t++; if ((HelperAliveAge) -le 4) { "RESULT helper fresh after $t s (helper.alive within 4 s; started over an empty cmd.txt)"; return $true } }
# the 0.3.20 helper's heartbeat file does not freshen on every run (the 02:45Z restore: stale past 60 s, the rgc answered at once), so a
# probe dev line answered in helper.log is the proof when the heartbeat is not
$s0 = HelperSeqBase
$mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count }
Set-Content -LiteralPath $cmdFile -Value "$s0 dev $idx`n" -NoNewline -Encoding ascii
$t2 = 0
while ($t2 -lt 20) { Start-Sleep -Seconds 1; $t2++; $new = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue); if ($new.Count -gt $mark -and ($new[$mark..($new.Count - 1)] | Where-Object { $_ -match "\b$s0 dev " })) { "RESULT helper up after $($t + $t2) s (the heartbeat stale, the probe dev line $s0 answered in helper.log)"; return $true } }
'RESULT helper STOP: no heartbeat within 20 s and no answer to a probe dev line within 20 more; nothing escalates'
return $false
}
function HelperSeqBase() { $m = 0; foreach ($f in @($cmdFile, $helperLog)) { if (Test-Path $f) { foreach ($l in (Get-Content -LiteralPath $f -ErrorAction SilentlyContinue)) { if ($l -match '(?:^|\s)(\d{1,6}) (?:dev|pl|lgc|rgc|lmc|rmc|nvidia-smi|reregister)\b') { $v = [int]$Matches[1]; if ($v -gt $m) { $m = $v } } } } }; return $m + 100 }

View file

@ -52,8 +52,15 @@ function HelperReset() {
Start-Sleep -Seconds 2
try { Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop } catch { $t = "$_" -replace '\s+', ' '; "RESULT helper start refused: $t"; if ($t -match '800710E0') { 'RESULT helper STOP: the scheduler refused the elevated instance (0x800710E0); nothing escalates' }; return $false }
$t = 0
while ($t -lt 60) { Start-Sleep -Seconds 1; $t++; if ((HelperAliveAge) -le 4) { "RESULT helper fresh after $t s (helper.alive within 4 s; started over an empty cmd.txt)"; return $true } }
'RESULT helper STOP: helper.alive never freshened within 60 s of the start; nothing escalates'
while ($t -lt 20) { Start-Sleep -Seconds 1; $t++; if ((HelperAliveAge) -le 4) { "RESULT helper fresh after $t s (helper.alive within 4 s; started over an empty cmd.txt)"; return $true } }
# the 0.3.20 helper's heartbeat file does not freshen on every run (the 02:45Z restore: stale past 60 s, the rgc answered at once), so a
# probe dev line answered in helper.log is the proof when the heartbeat is not
$s0 = HelperSeqBase
$mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count }
Set-Content -LiteralPath $cmdFile -Value "$s0 dev $idx`n" -NoNewline -Encoding ascii
$t2 = 0
while ($t2 -lt 20) { Start-Sleep -Seconds 1; $t2++; $new = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue); if ($new.Count -gt $mark -and ($new[$mark..($new.Count - 1)] | Where-Object { $_ -match "\b$s0 dev " })) { "RESULT helper up after $($t + $t2) s (the heartbeat stale, the probe dev line $s0 answered in helper.log)"; return $true } }
'RESULT helper STOP: no heartbeat within 20 s and no answer to a probe dev line within 20 more; nothing escalates'
return $false
}
function HelperSeqBase() { $m = 0; foreach ($f in @($cmdFile, $helperLog)) { if (Test-Path $f) { foreach ($l in (Get-Content -LiteralPath $f -ErrorAction SilentlyContinue)) { if ($l -match '(?:^|\s)(\d{1,6}) (?:dev|pl|lgc|rgc|lmc|rmc|nvidia-smi|reregister)\b') { $v = [int]$Matches[1]; if ($v -gt $m) { $m = $v } } } } }; return $m + 100 }

View file

@ -141,8 +141,15 @@ function HelperReset() {
Start-Sleep -Seconds 2
try { Start-ScheduledTask -TaskName 'Igneum Power Helper' -ErrorAction Stop } catch { $t = "$_" -replace '\s+', ' '; "RESULT helper start refused: $t"; if ($t -match '800710E0') { 'RESULT helper STOP: the scheduler refused the elevated instance (0x800710E0); nothing escalates' }; return $false }
$t = 0
while ($t -lt 60) { Start-Sleep -Seconds 1; $t++; if ((HelperAliveAge) -le 4) { "RESULT helper fresh after $t s (helper.alive within 4 s; started over an empty cmd.txt)"; return $true } }
'RESULT helper STOP: helper.alive never freshened within 60 s of the start; nothing escalates'
while ($t -lt 20) { Start-Sleep -Seconds 1; $t++; if ((HelperAliveAge) -le 4) { "RESULT helper fresh after $t s (helper.alive within 4 s; started over an empty cmd.txt)"; return $true } }
# the 0.3.20 helper's heartbeat file does not freshen on every run (the 02:45Z restore: stale past 60 s, the rgc answered at once), so a
# probe dev line answered in helper.log is the proof when the heartbeat is not
$s0 = HelperSeqBase
$mark = 0; if (Test-Path $helperLog) { $mark = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue).Count }
Set-Content -LiteralPath $cmdFile -Value "$s0 dev $idx`n" -NoNewline -Encoding ascii
$t2 = 0
while ($t2 -lt 20) { Start-Sleep -Seconds 1; $t2++; $new = @(Get-Content -LiteralPath $helperLog -ErrorAction SilentlyContinue); if ($new.Count -gt $mark -and ($new[$mark..($new.Count - 1)] | Where-Object { $_ -match "\b$s0 dev " })) { "RESULT helper up after $($t + $t2) s (the heartbeat stale, the probe dev line $s0 answered in helper.log)"; return $true } }
'RESULT helper STOP: no heartbeat within 20 s and no answer to a probe dev line within 20 more; nothing escalates'
return $false
}
function HelperSeqBase() {