Skip to content

AsyncLocalStorage: enterWith / exit aren't implemented — listener never runs #1423

Description

@proggeramlug

Summary

AsyncLocalStorage.enterWith(...) and AsyncLocalStorage.exit(...) silently no-op; the test that exercises them crashes / exits mid-output:

```
Node: …7 trailing lines covering enterWith + exit semantics
Perry: stops after 'outer post: outer' (line 10) — never reaches enterWith/exit assertions
```

Repro

```
./target/release/perry test-files/test_async_local_storage_context.ts
```

Node output (last 7 lines) is what Perry is missing:

```
enterWith store: entered
exit clears primary: undefined
exit keeps other: other-mutated
exit restores primary: exit-outer
exit preserves other mutation: other-mutated
primary store: primary
secondary store: secondary
```

Suspected root cause

als.enterWith({...}) reaches a not-implemented codepath that exits the process / Promise without producing further console.log output.

This is sibling work to #788 / #789 (AsyncLocalStorage tracking across await/microtasks/timers + real async_hooks.createHook), and likely fixed as part of those tracker issues. Treat this issue as the narrow .enterWith / .exit slice and link it back to #788 once that lands.

Disposition for v0.5.1025

test_async_local_storage_context skip-listed in test-parity/known_failures.json under category bug-open with this issue number. Flips to PASS when .enterWith / .exit semantics land.

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