Repository navigation
FIX: bound scenario progress paging when the cursor does not advance - #3223
Merged
Roman Lutz (romanlutz) merged 5 commits intoOct 16, 2026
Merged
Roman Lutz (romanlutz) merged 5 commits into
Roman Lutz (romanlutz) merged 5 commits into
Conversation
The progress hook refetched the same page forever when the backend answered has_more without an advancing next_cursor. Track the cursors seen in a cycle, cap the page count, and fall through to the regular poll re arm so a stuck cursor costs one request per interval instead of an endless loop, mirroring the guard fetchAllPages already uses. Fixes microsoft#3222 Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
…dget Restore the original useScenarioRunProgress tests that the new file had replaced, keeping the new cursor cases alongside them. When the page budget runs out while pages remain, schedule another bounded cycle from the saved cursor instead of falling through to the terminal check, so the tail of a long finished run still loads. Each cycle gets a fresh seen cursor set so continuation is not blocked by the previous cycle. Follow-up to the review on microsoft#3223. Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
The missing or repeated cursor branch fell through to the terminal check, which stopped polling a finished run forever even though more pages remained. Schedule the next bounded poll from that branch too, so a finished run only stops after a page without has_more, and a cursor that recovers on a later response resumes draining in the same cycle. Follow-up to the review on microsoft#3223. Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
Roman Lutz (romanlutz)
approved these changes
Oct 16, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 340b434f-94b7-4ea0-ac05-d57af330160d
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 16, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #3222
useScenarioRunProgresspaged results with a recursive fetch that had no guard against a cursor that does not advance. When the backend answeredhas_morewhilenext_cursorwas missing or equal to the cursor just sent, the hook refetched the identical page forever, a tight request loop that never let the UI recover.The hook now tracks the cursors already seen within a fetch cycle, caps the page count, and when the cursor does not advance it stops paging and falls through to the regular poll re arm, so a stuck cursor costs one request per interval. This mirrors the guard
fetchAllPagesalready documents and uses for the same failure mode. An advancing cursor still pages through normally.Tests and Documentation
Added
useScenarioRunProgress.test.tsxwith two tests: a stuck cursor yields exactly one request per poll interval (on main the same scenario crashes the jest process with a JavaScript heap out of memory, which is the loop demonstrating itself), and an advancing cursor is followed across pages. ScenarioRunPage and scenarioRunProgress suites still pass (70 tests) andtsc --noEmitis clean.No documentation change needed, so I did not run JupyText.