Add run boundary effect diagnostics#205
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1988a3f703
ℹ️ 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".
| : [UnhandledEffects<E, RuntimeEffects>] extends [never] | ||
| ? unknown |
There was a problem hiding this comment.
Accept generics constrained to runtime effects
The new RunBoundary check rejects valid wrapper functions where E is already constrained to runtime effects (for example, <E extends Async | HandlerCapture<string> | Interrupt>(program: Fx<E, A>) => runTask(program)). With the current [Exclude<E, RuntimeEffects>] extends [never] condition, TypeScript does not reduce the generic case, so callers are forced to add unsafe casts (as now done in NodeRuntime.ts), which regresses API ergonomics and weakens compile-time guarantees for downstream users.
Useful? React with 👍 / 👎.
Summary
Validation
Manual check