gauge-complete P4b: AggregateHeatSink 0xBBE -> HeatSink/AmbientTemperature bound (last config NULL cleared)

The 0xBBE heat-sink BANK was built as a plain HeatSink, so the numeric-R
cockpit gauge binding HeatSink/AmbientTemperature (L4GAUGE.CFG:4552) had
no publisher -> the LAST unresolved config attribute.

Reconstruct AggregateHeatSink : HeatSink (ctor @4ae8d0, own GUID 0x50e590),
byte-exact + static_assert-locked (heatSinkCount@0x1D0, ambientTemperature
@0x1D4=300, helper@0x1D8 0xC link node, sizeof 0x1E4 == factory alloc @9993).
Publish HeatSinkCount + AmbientTemperature via a dense-prefix attribute table
chained to HeatSink::NextAttributeID (shared HeatSink table unchanged, so
CoolantMass/CoolantCapacity keep resolving). Move CreateHeatSinkBankSubsystem
into heatfamily_reslice.cpp (needs the class def) and build the real class at
factory case 0xBBE; mech.cpp unchanged.

DELIBERATE DEVIATION (documented in the class): keep the base HeatSinkSimulation
the HeatSink ctor installs; do NOT reimplement the authentic Performance @4ae73c
-- it derefs a raw self+0xE0 -> [+0x158] that does not map in our compiled layout
(AV/NaN, and runs for EVERY mech), and ambientTemperature is a frozen constant so
the gauge reads 300 either way. Authentic relaxation model deferred.

Verified: [attr] HeatSink/AmbientTemperature OK; all 50 config attribute
bindings resolve (0 NULL); no every-mech crash; combat TARGET DESTROYED,
FIRED #41+, un-regressed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-07 20:10:11 -05:00
co-authored by Claude Opus 4.8
parent 12c4254aae
commit 16f5f545ce
42 changed files with 492 additions and 59 deletions
+36
View File
@@ -0,0 +1,36 @@
param([long]$Hwnd, [string]$Out = "w.png")
Add-Type -AssemblyName System.Drawing
Add-Type @"
using System; using System.Runtime.InteropServices;
public class P {
[DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out RC r);
[DllImport("user32.dll")] public static extern bool PrintWindow(IntPtr h, IntPtr hdc, uint f);
[DllImport("user32.dll")] public static extern IntPtr GetWindowDC(IntPtr h);
[DllImport("user32.dll")] public static extern int ReleaseDC(IntPtr h, IntPtr dc);
[DllImport("user32.dll")] public static extern bool BringWindowToTop(IntPtr h);
[DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr h);
[DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr h, int c);
public struct RC { public int L,T,R,B; }
}
"@
$h = [IntPtr]$Hwnd
[void][P]::ShowWindow($h, 9) # SW_RESTORE
[void][P]::BringWindowToTop($h)
[void][P]::SetForegroundWindow($h)
Start-Sleep -Milliseconds 400
$r = New-Object P+RC; [void][P]::GetWindowRect($h, [ref]$r)
$w = $r.R - $r.L; $ht = $r.B - $r.T
if ($w -le 0 -or $ht -le 0) { Write-Host "bad rect"; exit 1 }
$bmp = New-Object System.Drawing.Bitmap $w, $ht
$g = [System.Drawing.Graphics]::FromImage($bmp)
$hdc = $g.GetHdc()
# PW_RENDERFULLCONTENT = 2 (captures DWM-composited content incl. many D3D windows)
$ok = [P]::PrintWindow($h, $hdc, 2)
$g.ReleaseHdc($hdc)
if (-not $ok) {
# fallback: screen copy of the (now foreground) window rect
$g.CopyFromScreen($r.L, $r.T, 0, 0, (New-Object System.Drawing.Size($w, $ht)))
}
$bmp.Save($Out, [System.Drawing.Imaging.ImageFormat]::Png)
$g.Dispose(); $bmp.Dispose()
Write-Host "saved $Out (${w}x${ht}) printwindow=$ok"
+6
View File
@@ -0,0 +1,6 @@
import sys
from PIL import Image
im=Image.open(sys.argv[1])
box=tuple(int(x) for x in sys.argv[3:7])
c=im.crop(box); c=c.resize((c.width*2,c.height*2),Image.NEAREST)
c.save(sys.argv[2]); print("saved",sys.argv[2],c.size)
+4
View File
@@ -0,0 +1,4 @@
import sys
from PIL import Image
im=Image.open(sys.argv[1]); box=tuple(int(x) for x in sys.argv[3:7])
c=im.crop(box); c=c.resize((c.width*5,c.height*5),Image.NEAREST); c.save(sys.argv[2]); print("saved",c.size)
+27
View File
@@ -0,0 +1,27 @@
import json, sys
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
want = sys.argv[1] if len(sys.argv)>1 else 'aggregate'
p=r"C:\Users\epilectrik\.claude\projects\C--git-bt411\09bf24bb-f92d-423a-b815-1eb662736f58\subagents\workflows\wf_1f336584-654\journal.jsonl"
for line in open(p,encoding='utf-8'):
try: o=json.loads(line)
except: continue
if o.get('type')!='result': continue
r=o.get('result')
if not isinstance(r,dict) or 'cluster' not in r: continue
if want.lower() not in r.get('cluster','').lower(): continue
print('CLUSTER:', r.get('cluster'))
print('CONF:', r.get('confidence'))
for it in (r.get('items') or []):
print('\n'+'='*66)
print('ITEM:', it.get('item'))
if it.get('classLayout'): print('\n--- LAYOUT ---\n', it.get('classLayout'))
if it.get('methodDescription'): print('\n--- METHODDESC/REG ---\n', it.get('methodDescription'))
if it.get('attributeTable'): print('\n--- ATTR TABLE ---\n', it.get('attributeTable'))
if it.get('factoryWiring'): print('\n--- FACTORY ---\n', it.get('factoryWiring'))
for f in (it.get('functions') or []):
print('\n--- FN:', f.get('name'), '@', f.get('address'), '---')
print(f.get('cpp'))
if it.get('checklist'):
print('\n--- CHECKLIST ---')
for x in it.get('checklist'): print(' -', x)
print('\nOPEN:', r.get('openQuestions'))
+22
View File
@@ -0,0 +1,22 @@
import json, sys
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
want = sys.argv[1] if len(sys.argv)>1 else 'LeakGauge'
p=r"C:\Users\epilectrik\.claude\projects\C--git-bt411\09bf24bb-f92d-423a-b815-1eb662736f58\subagents\workflows\wf_93c95bcc-09a\journal.jsonl"
for line in open(p,encoding='utf-8'):
try: o=json.loads(line)
except: continue
if o.get('type')!='result': continue
r=o.get('result')
if not isinstance(r,dict) or 'widget' not in r: continue
if want.lower() not in (r.get('widget','')+r.get('configKeyword','')).lower(): continue
print('WIDGET:', r.get('widget'))
print('\n===== methodDescription + registration =====\n', r.get('methodDescription'))
print('\n===== classLayout =====\n', r.get('classLayout'))
print('\n===== attributeTableAdditions =====\n', r.get('attributeTableAdditions'))
for f in (r.get('functions') or []):
print('\n===== FN:', f.get('name'), '@', f.get('address'), '=====')
print(f.get('cpp'))
print('\n===== forceSafeChecklist =====')
for x in (r.get('forceSafeChecklist') or []): print(' -', x)
print('\n===== integrationNotes =====\n', r.get('integrationNotes'))
break
+23
View File
@@ -0,0 +1,23 @@
Add-Type @"
using System; using System.Runtime.InteropServices; using System.Text;
public class E {
[DllImport("user32.dll")] public static extern bool EnumWindows(D cb, IntPtr p);
[DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);
[DllImport("user32.dll")] public static extern int GetWindowText(IntPtr h, StringBuilder s, int n);
[DllImport("user32.dll")] public static extern uint GetWindowThreadProcessId(IntPtr h, out uint pid);
public delegate bool D(IntPtr h, IntPtr p);
}
"@
$rows=@()
$cb=[E+D]{ param($h,$p)
if([E]::IsWindowVisible($h)){
$sb=New-Object System.Text.StringBuilder 256
[void][E]::GetWindowText($h,$sb,256)
$t=$sb.ToString()
$wp=0; [void][E]::GetWindowThreadProcessId($h,[ref]$wp)
$pn=""; try{$pn=(Get-Process -Id $wp -EA Stop).ProcessName}catch{}
$script:rows+=[pscustomobject]@{Hwnd=[long]$h;Ppid=$wp;Proc=$pn;Title=$t}
}; return $true
}
[void][E]::EnumWindows($cb,[IntPtr]::Zero)
$rows | Where-Object {$_.Proc -like "*btl4*"} | Format-Table -Auto | Out-String | Write-Host
Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

+24
View File
@@ -0,0 +1,24 @@
import json, sys
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
p=r"C:\Users\epilectrik\.claude\projects\C--git-bt411\09bf24bb-f92d-423a-b815-1eb662736f58\subagents\workflows\wf_1f336584-654\journal.jsonl"
for line in open(p,encoding='utf-8'):
try: o=json.loads(line)
except: continue
if o.get('type')!='result': continue
r=o.get('result')
if not isinstance(r,dict): continue
if 'order' in r and 'verdict' in r:
print('#'*70); print('SYNTHESIS PLAN'); print('#'*70)
print('\n[verdict]', r.get('verdict'))
for k in ['order','turnkey','reconstruction','deep','dependencies','traps']:
v=r.get(k)
if not v: continue
print('\n['+k+']')
for i,x in enumerate(v): print(' %d. %s'%(i+1,x))
if 'cluster' in r:
print('\n'+'='*70); print('CLUSTER:', r.get('cluster','')[:80], '| conf:', (r.get('confidence','') or '')[:120])
for it in (r.get('items') or []):
print(' ITEM:', (it.get('item','') or '')[:150])
if it.get('risk'): print(' risk:', it.get('risk','')[:200])
for f in (it.get('functions') or []):
print(' fn:', f.get('name','?'), '@', (f.get('address','') or '')[:30], '(%d chars)'%len(f.get('cpp','') or ''))
+27
View File
@@ -0,0 +1,27 @@
import json, sys
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
p=r"C:\Users\epilectrik\.claude\projects\C--git-bt411\09bf24bb-f92d-423a-b815-1eb662736f58\subagents\workflows\wf_1d6c4013-9c7\journal.jsonl"
for line in open(p,encoding='utf-8'):
try: o=json.loads(line)
except: continue
if o.get('type')!='result': continue
r=o.get('result')
if not isinstance(r,dict): continue
if 'steps' in r and 'verdict' in r:
print('#'*70); print('SYNTHESIS PLAN'); print('#'*70)
print('\n[verdict]', r.get('verdict'))
for k in ['steps','handlerFixes','rankWiring','soloBehavior','traps']:
v=r.get(k)
if v is None: continue
if isinstance(v,list):
print('\n['+k+']')
for i,x in enumerate(v): print(' %d. %s'%(i+1,x))
else:
print('\n['+k+'] '+str(v))
if 'piece' in r and ('death' in r.get('piece','').lower() or 'hook' in r.get('piece','').lower()):
print('\n'+'='*70); print('PIECE:', r.get('piece')[:90])
for f in (r.get('findings') or []): print(' - '+f)
print(' HOOKS:')
for h in (r.get('hookPoints') or []): print(' * '+h)
print(' already:', (r.get('alreadyReconstructed') or '')[:400])
print(' open:', (r.get('openQuestions') or '')[:400])
+26
View File
@@ -0,0 +1,26 @@
import json
p=r"C:\Users\epilectrik\.claude\projects\C--git-bt411\09bf24bb-f92d-423a-b815-1eb662736f58\subagents\workflows\wf_043cfccd-2ed\journal.jsonl"
for line in open(p,encoding='utf-8'):
try: o=json.loads(line)
except: continue
if o.get('type')!='result': continue
r=o.get('result')
if not isinstance(r,dict): continue
if 'implementationOrder' in r or 'mechanicalFixes' in r:
print('=== COVERAGE VERDICT ===')
for k in ['verdict','mechanicalFixes','deepFixes','namingBugs','implementationOrder','authenticallyStatic','gaps']:
v=r.get(k)
if v is None: continue
if isinstance(v,list):
print('\n['+k+']')
for i,x in enumerate(v): print(' %d. %s'%(i+1,x))
else:
print('\n['+k+'] '+str(v))
if 'tempMovesWhenFiring' in r:
print('\n\n=== HEATMODEL VERDICT ===')
for k,v in r.items():
if isinstance(v,list):
print('\n['+k+']')
for x in v: print(' - '+str(x))
else:
print('\n['+k+'] '+str(v))
+27
View File
@@ -0,0 +1,27 @@
import json, sys
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
p=r"C:\Users\epilectrik\.claude\projects\C--git-bt411\09bf24bb-f92d-423a-b815-1eb662736f58\subagents\workflows\wf_93c95bcc-09a\journal.jsonl"
for line in open(p,encoding='utf-8'):
try: o=json.loads(line)
except: continue
if o.get('type')!='result': continue
r=o.get('result')
if not isinstance(r,dict): continue
if 'widget' in r:
print('\n'+'='*70)
print('WIDGET:', r.get('widget'), '| keyword:', r.get('configKeyword'))
print('confidence:', (r.get('confidence') or '')[:400])
fns=r.get('functions') or []
print('functions:', ', '.join(f.get('name','?')+'@'+(f.get('address','?')[:20]) for f in fns))
print('attrTableAdditions:', (r.get('attributeTableAdditions') or 'none')[:500])
sd=r.get('stubbedDependencies') or []
print('stubbedDeps:', json.dumps(sd)[:600])
print('integrationNotes:', (r.get('integrationNotes') or '')[:600])
if 'verdict' in r and 'implementationOrder' in r:
print('\n'+'#'*70)
print('VERIFY VERDICT:', (r.get('verdict') or '')[:800])
for k in ['implementationOrder','blockers','forceTrapRisks','perWidgetVerdict']:
v=r.get(k)
if not v: continue
print('\n['+k+']')
for i,x in enumerate(v): print(' %d. %s'%(i+1,str(x)[:400]))
Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

+53
View File
@@ -0,0 +1,53 @@
# Capture a window (by title substring) or the full virtual screen to a PNG.
# Usage: powershell -File shot.ps1 <out.png> [titleSubstring]
param([string]$Out = "shot.png", [string]$Title = "")
Add-Type -AssemblyName System.Windows.Forms, System.Drawing
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class W {
[DllImport("user32.dll")] public static extern bool GetWindowRect(IntPtr h, out R r);
[DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr h);
[DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr h);
[DllImport("user32.dll")] public static extern int GetWindowText(IntPtr h, System.Text.StringBuilder s, int n);
[DllImport("user32.dll")] public static extern bool EnumWindows(EnumProc cb, IntPtr p);
public delegate bool EnumProc(IntPtr h, IntPtr p);
public struct R { public int L, T, Rr, B; }
}
"@
function Cap($rect, $path) {
$w = $rect.Rr - $rect.L; $h = $rect.B - $rect.T
if ($w -le 0 -or $h -le 0) { return $false }
$bmp = New-Object System.Drawing.Bitmap $w, $h
$g = [System.Drawing.Graphics]::FromImage($bmp)
$g.CopyFromScreen($rect.L, $rect.T, 0, 0, (New-Object System.Drawing.Size($w, $h)))
$bmp.Save($path, [System.Drawing.Imaging.ImageFormat]::Png)
$g.Dispose(); $bmp.Dispose(); return $true
}
if ($Title -ne "") {
$found = @()
$cb = [W+EnumProc]{ param($h,$p)
if ([W]::IsWindowVisible($h)) {
$sb = New-Object System.Text.StringBuilder 256
[void][W]::GetWindowText($h, $sb, 256)
$t = $sb.ToString()
if ($t -like "*$Title*") { $script:found += @{H=$h; T=$t} }
}
return $true
}
[void][W]::EnumWindows($cb, [IntPtr]::Zero)
Write-Host "Matched windows:"; $found | ForEach-Object { Write-Host " '$($_.T)'" }
$i = 0
foreach ($f in $found) {
$r = New-Object W+R; [void][W]::GetWindowRect($f.H, [ref]$r)
[void][W]::SetForegroundWindow($f.H); Start-Sleep -Milliseconds 250
$p = $Out -replace '\.png$', "_$i.png"
if (Cap $r $p) { Write-Host "saved $p ($($r.Rr-$r.L)x$($r.B-$r.T)) '$($f.T)'" }
$i++
}
} else {
$vs = [System.Windows.Forms.SystemInformation]::VirtualScreen
$r = New-Object W+R; $r.L=$vs.Left; $r.T=$vs.Top; $r.Rr=$vs.Right; $r.B=$vs.Bottom
[void](Cap $r $Out); Write-Host "saved $Out (full screen $($vs.Width)x$($vs.Height))"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB