latest mux typescript sdk#232
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 77abe5a. Configure here.
| const token = | ||
| workflow === 'moderate' ? moderationHookToken(assetId) | ||
| : workflow === 'summarize' ? summarizeHookToken(assetId) | ||
| : askQuestionsHookToken(assetId); |
There was a problem hiding this comment.
Regex match groups unused; SDK data source may diverge
Medium Severity
The regex on line 116 captures workflow and status groups from the event type string, but those captured values are completely discarded. Instead, workflow and status are read from jobData.workflow and jobData.status (SDK typed data). The old code used the regex groups directly, guaranteeing the values matched 'moderate' | 'summarize' | 'ask_questions'. If the SDK's workflow property uses a different format (e.g., different casing or delimiters) than what appears in the event type string, the token selection would silently pick the wrong hook — specifically, any non-matching workflow value falls through to askQuestionsHookToken instead of moderationHookToken or summarizeHookToken. Since this is a pre-release alpha SDK, this coupling is fragile.
Reviewed by Cursor Bugbot for commit 77abe5a. Configure here.
cjpillsbury
left a comment
There was a problem hiding this comment.
A few areas that could be improved and the robot feedback is reasonable, but nothing that should block merging. 🚢 🇮🇹


Note
Medium Risk
Touches production webhook verification/parsing and workflow-resume routing; regressions could cause missed/failed workflow hook resumes despite being mostly an SDK migration.
Overview
Updates the vendored
@mux/mux-nodedependency to14.0.0-alpha.4and migrates Robots-related typings/usages to the newrobots-previewsurface across the workflow, moderation, and Slack notifier code.Refactors the Mux webhook handler to use
mux.webhooks.unwrap(...)(instead of manual JSON parse + signature verify), introduces explicit terminal Robots event typing, and adds safer dev-mode parsing plus clearer handling for caption track ready/errored events.Reviewed by Cursor Bugbot for commit 77abe5a. Bugbot is set up for automated code reviews on this repo. Configure here.