[APPS][Superseded] Trace imported connection ID values#365
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98a8c40d8f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| return sources.map((source, index) => { | ||
| const resolvedId = staticDependencies[index] ?? resolvedBySource.get(source) ?? source; | ||
| resolvedBySource.set(source, resolvedId); |
There was a problem hiding this comment.
Preserve dependency alignment when sources repeat
When a module imports/re-exports the same source more than once before another source, this index-based pairing shifts every later resolution because Rollup exposes importedIds/importedIdResolutions once per unique source. For example import './a'; import './a'; import { HTTP_ID } from './ids'; produces dependencies [a, ids], but this maps the second ./a to ids and leaves ./ids unresolved as the literal string, so imported connection IDs from ./ids fail as outside the collected graph. Reuse the cached resolution for a source before consuming the next dependency index, or build the mapping directly from Rollup's source order.
Useful? React with 👍 / 👎.
e08b6dc to
ec10389
Compare
98a8c40 to
eb5da50
Compare
eb5da50 to
94bb8e9
Compare
|
Closing this draft as superseded. The work is now split into smaller PRs starting with #371, followed by generic static definition resolution and then connection ID integration. |

Status
This draft PR is superseded and is being closed intentionally.
Why This Is Not The Direction
This branch proved that imported connection ID value tracing is possible, but it bundled too many concerns into one review:
connectionIdvaluesThat made the PR too large to review clearly and kept too much generic module graph logic inside connection ID-specific code.
Replacement Plan
Plan 014 now splits this work into smaller PRs:
ParsedModuleRecordwith domain-neutral module facts.This PR is kept only as historical context for the prototype implementation. It should not be reviewed or merged.
QA Instructions
None. This draft is closed in favor of the split implementation above.
Blast Radius
No runtime or package impact. The PR is closed without merging.