Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3682c68338
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ 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". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 815b72da2b
ℹ️ 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 (fallbackData === undefined || !isPlainObject(fallbackData)) { | ||
| return { valid: false }; |
There was a problem hiding this comment.
Reject prototype-backed fallback fields
When fallback.create returns an object whose custom prototype has a null prototype and supplies a typed field—for example, Object.create(Object.assign(Object.create(null), { message: 'x' })) as { message: string }—isPlainObject accepts it, but createFallbackVariant copies only the payload's own keys. The decoder therefore reports success with no message property even though its return type exposes message: string. This is fresh evidence beyond the prior non-enumerable-own-property case: reject accepted payloads with custom prototypes or otherwise preserve the inherited fields represented by the payload type.
Useful? React with 👍 / 👎.
Summary
Add explicit fallback variants for discriminated union.
Description
Adds
discriminatedUnionWithFallback<T>(), a decoder-style companion todiscriminatedUnion.ParseResult, making transformed fallback output distinct from a guard result.undefined.