Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: debd649bf5
ℹ️ 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".
| if (sharedCardApiModule) { | ||
| shimSharedCardApi(loader, sharedCardApiModule); | ||
| return sharedCardApiModule; | ||
| } |
There was a problem hiding this comment.
Keep card-api module loader-scoped
Returning a previously imported sharedCardApiModule for every new Loader makes later adapters execute card-api code with the first loader's import.meta.loader, because card-api closes over that value (myLoader() in packages/base/card-api.gts) and uses it for runtime imports (for example in createFromSerialized / override loading). In multi-realm tests, this can resolve modules through the wrong loader and miss per-loader shims established in prepareInstances, leading to incorrect or failed card deserialization in subsequent adapters.
Useful? React with 👍 / 👎.
Preview deployments |
Host Test Results 1 files ±0 1 suites ±0 1h 26m 1s ⏱️ - 16m 41s For more details on these errors, see this check. Results for commit debd649. ± Comparison against base commit f3482af. |
Summary
https://cardstack.com/base/card-apionce per test run inTestRealmAdapteropenFileand harden loader-shim behavior for in-flight imports