Wall #13 of the pi TUI bring-up (gate 3, tracker #6564). Surfaced after eliminating the #6693 TypeBox perf cliff (by setting useAcceleration: false in the bundle — a 40s→7.5s speedup that made this reachable). This is a distinct, perry-specific correctness bug.
Symptom
pi-native-noaccel (the accel-off bundle compiled by perry), bare interactive TUI under a PTY, clean HOME with fd pre-placed, crashes ~7.5s into init:
[terminal setup escapes]
pi exiting due to uncaughtException:
TypeError: Cannot read properties of undefined (reading 'get')
Pi's uncaught handler prints only the message (no stack in output; no crash log written).
Perry-specific (the key fact)
Node renders the full 23,733-byte onboarding screen on the exact same accel-off bundle (verified). So something is undefined under perry that is defined under node at TUI init — a real divergence, not an app bug. (The same crash also occurs on the accel-ON build, just after ~40s of TypeBox grind; turning acceleration off only removed the grind, exposing this faster.)
Where (init region)
Occurs during main() → after initTheme (themes load fine now that assets are in place) → somewhere in agent/session/registry init, on a .get( call whose receiver is undefined. Candidate .get shapes at pi init: a Map/registry lookup, SettingsManager.get*, a provider/model catalog .get, or an extension registry. Needs a debug build + lldb to pin the exact JS frame.
Repro (fast now)
Blocks gate 3 (rendering TUI). Independent of #6692 (fd-download pipeline) and #6693 (TypeBox perf).
Wall #13 of the pi TUI bring-up (gate 3, tracker #6564). Surfaced after eliminating the #6693 TypeBox perf cliff (by setting
useAcceleration: falsein the bundle — a 40s→7.5s speedup that made this reachable). This is a distinct, perry-specific correctness bug.Symptom
pi-native-noaccel(the accel-off bundle compiled by perry), bare interactive TUI under a PTY, clean HOME withfdpre-placed, crashes ~7.5s into init:Pi's uncaught handler prints only the message (no stack in output; no crash log written).
Perry-specific (the key fact)
Node renders the full 23,733-byte onboarding screen on the exact same accel-off bundle (verified). So something is
undefinedunder perry that is defined under node at TUI init — a real divergence, not an app bug. (The same crash also occurs on the accel-ON build, just after ~40s of TypeBox grind; turning acceleration off only removed the grind, exposing this faster.)Where (init region)
Occurs during
main()→ afterinitTheme(themes load fine now that assets are in place) → somewhere in agent/session/registry init, on a.get(call whose receiver is undefined. Candidate.getshapes at pi init: a Map/registry lookup,SettingsManager.get*, a provider/model catalog.get, or an extension registry. Needs a debug build + lldb to pin the exact JS frame.Repro (fast now)
secret-tests/pi-target/dist/pi-native-noaccel(accel-off, perry-compiled, ~7.5s to crash). Source bundle:pi-target/dist/pi-noaccel.mjs(readable, unminified). Old accel-on binarypi-nativehits the same crash after ~40s.scratchpad/pty_cap.py(forkpty + timed capture;HOME=<clean+fd> python3 pty_cap.py label out.raw 12 -- ./pi-native-noaccel). Clean+fd HOME: copyscratchpad/pi-home/.pi/agent/bin/fdinto a fresh$HOME/.pi/agent/bin/.node pi-noaccel.mjsunder the same harness/HOME.CARGO_PROFILE_RELEASE_STRIP=none … cargo buildperry, recompile the bundle with--debug-symbols/--keep-intermediates, lldb breakpoint on the throw path (js_throw/typeerror), walk up to the JS frame — the technique used for hir: class-expression capture snapshot stale for vars assigned after the class — semver Comparator TypeError kills pi-native at init #6604/runtime: async catch's mutation of a shared object not visible at state-commit → pi one-shot exits 0 not 1 (GATE 2a rc divergence) — pi wall #10 #6672. The 7.5s repro makes iteration fast.Blocks gate 3 (rendering TUI). Independent of #6692 (fd-download pipeline) and #6693 (TypeBox perf).