[APPS][Connections Part 7] Add reusable module graph walker#364
Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intoMay 13, 2026
Merged
Conversation
This was referenced May 13, 2026
Collaborator
Author
Collaborator
Author
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
ce6fdd3 to
4780d00
Compare
156e956 to
48e0a11
Compare
sarenji
approved these changes
May 13, 2026
| ): ParsedModuleRecord { | ||
| return { | ||
| id, | ||
| ast: parseAst('export const value = true;') as Program, |
Contributor
There was a problem hiding this comment.
Non-blocker, is it possible to use ensureProgram here? Or no?
48e0a11 to
36b022a
Compare
Base automatically changed from
sdkennedy2/reachable-module-graph-call-sites
to
master
May 13, 2026 20:41
223970c
into
master
8 of 9 checks passed
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
Split the reusable module graph traversal helper out from the connection ID extraction PR so reviewers can evaluate the graph-walking behavior independently.
Changes
This PR adds
walkModuleGraph, a small backend AST parsing helper that walks collected app-local module records from a backend entry module. The helper owns reachability mechanics only: it visits each reachable collected module once, follows parseable app-local static dependencies, and fails closed when the collected graph is incomplete or contains unsupported local dependency facts.For example, a later connection ID consumer can use the helper to collect IDs from every reachable module without reimplementing graph traversal:
The helper deliberately does not know about action-catalog calls, connection ID values, Vite collectors, manifests, or dev-server execution. Those behaviors remain in the next PR in the stack.
QA Instructions
Added focused unit coverage for reachability traversal, cycle handling, dependency skip rules, and fail-closed graph gaps. Also ran the apps plugin typecheck and scoped lint coverage for the new helper.
Blast Radius
This adds a reusable internal helper under
backend/ast-parsing. It is not wired into production or dev execution until the next PR consumes it.Documentation