fix: Resolve edge AsyncLocalStorage from runtime builtins#1611
Merged
Luca Forstner (lforst) merged 4 commits intomainfrom Mar 19, 2026
Merged
fix: Resolve edge AsyncLocalStorage from runtime builtins#1611Luca Forstner (lforst) merged 4 commits intomainfrom
Luca Forstner (lforst) merged 4 commits intomainfrom
Conversation
Use process.getBuiltinModule('node:async_hooks') when workerd or edge-light do not expose AsyncLocalStorage globally, so traced child spans keep their active parent context. Add a minimal bootstrap regression test and flip the affected Cloudflare smoke scenarios to expect ALS to work.
Use normal property lookup for runtime AsyncLocalStorage resolution so accessor-backed or inherited values are still discovered. Reset the symbol-backed Braintrust state between bootstrap test cases to keep the regression test isolated.
Align the browser-named Cloudflare Worker smoke scenario docs with the actual test setup, which imports \ and asserts resolution to the \ build. Document the no-compat scenario's expected ALS limitation so the smoke expectations are easier to understand.
Abhijeet Prasad (AbhiPrasad)
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Authorized PR for CI taken from: #1567
All attributions go to Dillon Mulroy (@dmmulroy)