Summary
Stack trace output from `console.trace`, uncaught errors, and `new Error().stack` uses a different frame format than Node and is missing or differently-formatted source-position info.
Repro
```ts
function inner() { console.trace("here"); }
function outer() { inner(); }
outer();
```
Observed (v0.5.1019)
Perry-style frame lines (typically `` without `file://` URLs, line:col missing or off, sometimes mangled symbol names from the lowered IR).
Expected (`node --experimental-strip-types`)
```
Trace: here
at inner (file:///…/test.ts:1:21)
at outer (file:///…/test.ts:2:21)
at file:///…/test.ts:3:1
…node internals…
```
Why this is categorical
Per CLAUDE.md "Known categorical gaps" list, Perry's stack format is a known limitation. Producing parity requires retaining source-position info through the lowering pipeline (parse → HIR → transform → codegen) and reconstructing a JS-shaped frame from native frame info:
- A source-map / position table preserved per HIR node and rewritten through transform passes that synthesize nodes (closure conversion, async lowering).
- A frame walker that maps native return addresses back to TS source locations.
- A formatter that emits `at (file://::)` shaped lines for non-native frames.
Disposition
This is the one part of the old #1276 bundle that is genuinely categorical rather than a localized bug. Suggested label: a new `gap-categorical` label to mirror the `known_failures.json` category, alongside the existing parity gap probes for lookbehind regex and lone-surrogate handling.
Surfaced by
CI parity gate on tag `v0.5.1019` (run 26236443275), via `test_gap_console_methods.ts`. Split from old #1276 which bundled this with two unrelated console bugs.
Summary
Stack trace output from `console.trace`, uncaught errors, and `new Error().stack` uses a different frame format than Node and is missing or differently-formatted source-position info.
Repro
```ts
function inner() { console.trace("here"); }
function outer() { inner(); }
outer();
```
Observed (v0.5.1019)
Perry-style frame lines (typically `` without `file://` URLs, line:col missing or off, sometimes mangled symbol names from the lowered IR).
Expected (`node --experimental-strip-types`)
```
Trace: here
at inner (file:///…/test.ts:1:21)
at outer (file:///…/test.ts:2:21)
at file:///…/test.ts:3:1
…node internals…
```
Why this is categorical
Per CLAUDE.md "Known categorical gaps" list, Perry's stack format is a known limitation. Producing parity requires retaining source-position info through the lowering pipeline (parse → HIR → transform → codegen) and reconstructing a JS-shaped frame from native frame info:
Disposition
This is the one part of the old #1276 bundle that is genuinely categorical rather than a localized bug. Suggested label: a new `gap-categorical` label to mirror the `known_failures.json` category, alongside the existing parity gap probes for lookbehind regex and lone-surrogate handling.
Surfaced by
CI parity gate on tag `v0.5.1019` (run 26236443275), via `test_gap_console_methods.ts`. Split from old #1276 which bundled this with two unrelated console bugs.