feat: Replace sync normalized-data with async flow (API-432)#48
feat: Replace sync normalized-data with async flow (API-432)#48hilnius wants to merge 2 commits into
Conversation
Opt into async corrections on dictate CONFIG, handle server refinements in the note UI, and bump API version to 2026-07-01. Co-authored-by: Cursor <cursoragent@cursor.com>
Showcase the recommended integration pattern for generate-normalized-data-async with a shared pollUntilSucceeded helper: poll after 10 seconds, stop after 5 minutes
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, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b4b53c5. Configure here.
| if (job.status === "FAILED") { | ||
| throw new Error(`Async job ${job.id} failed.`); | ||
| } | ||
| } |
There was a problem hiding this comment.
Timeout check precedes fetch, causing premature timeout
Medium Severity
In the polling loop, the deadline check on line 23 runs before fetchJob() on line 27. This means on the final iteration, the function throws a timeout error without making one last fetch. The effective timeout is timeoutMs - intervalMs (e.g. ~4 min 50 s instead of 5 min). A job that succeeds during the last sleep interval is never seen, producing a false timeout. Moving the deadline check after the fetch-and-status-check block fixes this.
Reviewed by Cursor Bugbot for commit b4b53c5. Configure here.


Showcase the recommended integration pattern for generate-normalized-data-async with a shared pollUntilSucceeded helper: poll after 10 seconds, stop after 5 minutes