[APPS][Connections Part 1] Add internal AST traversal helper#350
Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit intomasterfrom May 8, 2026
Merged
Conversation
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
f002135 to
f9a0de7
Compare
f9a0de7 to
d681de3
Compare
This was referenced May 8, 2026
yoannmoinet
approved these changes
May 8, 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.

Motivation
The inline backend connection ID extractor needs an ESTree traversal helper, but using zimmerframe directly requires a temporary package patch and Jest shim because its current package exports do not support the repo's CommonJS integrity/test path. acorn-walk avoids that export issue but uses Acorn AST types, which forces casts around ESTree nodes.
Changes
Adds a small internal
walkAsthelper underpackages/plugins/apps/src/backend/ast-parsing/for inspect-only ESTree traversal. The helper walks all ESTree-shaped node types generically by scanning enumerable object properties and arrays for objects with a stringtypefield, so it does not need a hardcoded visitor-key table. This works in a similar way toestree-walkerandzimmerframe.The API supports a universal
_visitor, specialized node-type visitors, and shared traversal state. It deliberately omits transformation features such as node replacement, immutable parent cloning, manualvisit, ancestor paths,stop, and child-specific state threading because the current extractor only needs read-only traversal.Example usage:
QA Instructions
Tests should pass.
Blast Radius
This PR only adds a new internal helper and tests. No existing production code consumes it yet, so runtime behavior is unchanged.
Documentation