Repository navigation
fix(plugin): fall back on Python AST recursion errors - #1094
Merged
mldangelo-oai merged 1 commit intoSep 30, 2026
Merged
Conversation
mldangelo-oai
approved these changes
Sep 30, 2026
Collaborator
There was a problem hiding this comment.
Thank you for catching this and adding regression coverage with a real Python expression. I verified all three new cases on Python 3.12: they pass with this change and fail when the added RecursionError catch is removed.
The tests cover both preview entry points, the source and simple-outline fallbacks, and the byte limit. The CLI case also checks that the affected file stays in the rank input and processing continues to the next file. Reusing the existing fallback keeps this fix small and focused.
CI is green too, including all required platform checks, the portable source checks, and the full Python suite (1,223 passed, 8 skipped). Looks good to merge!
Merged
3 tasks done
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.
Summary
Ran into this one late: a long enough Python expression makes
ast.parse()throwRecursionError, even well under the 64 KiB preview limit. Nothing caught it, so rank-input generation just died instead of falling back to a source preview.Changes
RecursionErrorwith the other parse errors so it uses the existing fallback.Testing
Tests pass.
Risk and rollout
Small. Only previews that hit
RecursionErrorbehave differently, and they now use the fallback we already had.Public disclosure review