[APPS][Connections Part 3] Resolve same-module connection ID values#351
Draft
sdkennedy2 wants to merge 2 commits intomasterfrom
Draft
[APPS][Connections Part 3] Resolve same-module connection ID values#351sdkennedy2 wants to merge 2 commits intomasterfrom
sdkennedy2 wants to merge 2 commits intomasterfrom
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. |
6cea58a to
d7aca74
Compare
3c4e0e9 to
958f598
Compare
958f598 to
903a98b
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
This builds on the inline connection ID extractor in #349. Inline string literals are safe, but app authors commonly keep connection IDs in same-file constants or same-file connection maps. This PR lets backend manifest extraction support those static same-module patterns without crossing into imported module graph analysis.
Changes
Adds same-module static value resolution for supported
connectionIdforms:The resolver tracks bindings by
eslint-scopevariable identity, not raw name, so shadowing behavior stays aligned with #349. It supports top-levelconststring values, exported top-level consts, const-to-const chains, static template literals, static object member reads, and arbitrarily deep static object member chains such asCONNECTIONS.HTTP.PROD.US1.Nested object reads are resolved one static property hop at a time. Intermediate values must also be visibly static object literals or safe same-module const aliases; otherwise the extractor fails closed instead of guessing.
It fails closed for mutable bindings, imported bindings, unresolved identifiers, dynamic templates, computed/spread object cases, non-object intermediate member values, call expressions, binary expressions, environment reads, and const cycles.
Imported helper modules remain intentionally unsupported here; that belongs to the next module-graph PR.
QA Instructions
Added extractor tests, including nested static object-member reads and nested fail-closed cases.
Also validated before the split with
/Users/scott.kennedy/dd/test-action-catalog-appusing a backend function containing bothconnectionId: HTTP_CONNECTION_IDandconnectionId: CONNECTIONS.HTTP:DD_APPS_UPLOAD_ASSETS=1and published versionad4aef1e78e280ae./__dd/executeActionsucceeded formoduleGraphHttpProbe.200andok: true.Blast Radius
This affects Apps backend function discovery/upload/dev-server manifest generation for action-catalog connection allowlists. Runtime backend execution is unchanged. The new behavior is conservative: unsupported static analysis forms throw for known action-catalog calls rather than producing an incomplete allowlist.
Documentation