You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 fix: validate mode at stats schema boundaries (#1248)
MuxMetadata.mode is typed as `string` (for future custom modes), but the
stats Zod schemas only accept `"plan" | "exec" | undefined`. The code
was casting mode without validation, which TypeScript allowed but Zod
rejected at runtime.
This caused ZodError spam on every stream delta event, since each delta
triggers `getSnapshot()` which parses the schema.
**Fix:** Validate mode before storing/emitting - treat unknown modes as
undefined for stats purposes.
---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking:
`high`_
0 commit comments