Skip to content

runtime: TUI init throws 'Cannot read properties of undefined (reading get)' where node renders — pi wall #13 (gate 3) #6699

Description

@proggeramlug

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed defect or regressionparityCompatibility gap with Node.js, ECMAScript, or the supported ecosystem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions