[APPS][Connections Part 14] Use static string values for imported connection IDs#377
Open
sdkennedy2 wants to merge 2 commits into
Conversation
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
e1d6fb2 to
6287251
Compare
eced601 to
5cf3f1f
Compare
6287251 to
91fc379
Compare
5cf3f1f to
94d1c0c
Compare
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
Backend connection ID extraction already walks reachable app-local modules, but it only supported inline and same-module values. Real apps often keep connection IDs in shared modules and import them into backend helpers. This PR wires the generic static string resolver into module-graph connection ID extraction so those imported values can be analyzed conservatively.
Changes
Module-graph extraction now uses each reachable
ParsedModuleRecorddirectly instead of reparsing through the same-file-only extraction path. For each action-catalog call, the connection ID adapter passes the fullconnectionIdexpression to:Resolved strings are added to the conservative backend-file allowlist. Unsupported results fail closed using the existing connection ID error path while preserving the generic unsupported reason and message for diagnostics.
This broadens supported connection ID shapes to imported constants, imported static templates, imported const chains, imported object roots, nested static object paths, local export aliases, named re-exports, import/export relays, and unambiguous star exports. Default imports, namespace imports, ambiguous star exports, missing exports, mutable or reassigned bindings, cycles, and dynamic expressions remain unsupported and fail closed.
QA Instructions
Review
extract-connection-ids-from-module-graph.test.tsfor the imported constant, const-chain, object-path, re-export, star-export, and unsupported-case coverage. The stack remains conservative: unsupported imported or dynamic forms throw instead of silently omitting a possible connection ID.Blast Radius
This affects backend manifest connection ID extraction for reachable app-local backend modules. It does not change module collection, graph walking, upload plumbing, dev middleware, or the manifest schema.
Documentation