Repository navigation
Conversation
Signed-off-by: Afloat <ShuffleMonkey@163.com>
|
Thanks @Afloat16 for this contribution. I prepared and verified a signed-off merge against main at Please enable Allow edits from maintainers in the PR sidebar so I can push the prepared merge. You can also merge main into this branch and keep the script lint parser recursion entry as a separate bullet under |
Signed-off-by: Afloat <ShuffleMonkey@163.com>
Head branch was pushed to by a user without write access
|
Merged current main in signed-off commit Validation of this exact merged source passed 36 passed, 0 failed, whole-repository lint, OSS-boundary checks, wheel/sdist builds and final clean-source checks. The description now distinguishes these new focused results from the earlier complete-suite results. Fresh upstream workflows still await maintainer approval. The requested main sync is ready for your final review. |
Keep both sides of the changelog conflict and retain the contribution's implementation and regression coverage. Signed-off-by: Afloat <ShuffleMonkey@163.com>
chrisknvidia
left a comment
There was a problem hiding this comment.
I reproduced this on main: a skill with a.py, b.py (10,000-term addition chain, about 80 KB) and c.py makes validate --checks lint die with RecursionError: maximum recursion depth exceeded during ast construction, exit 1 and no report at all. At this head the same run exits 0 with nine lint advisories: the usual four for a.py and c.py plus one MEDIUM parser_limit for b.py, and the JSON report carries it. The six new tests fail on main's source and the whole module passes at head (36 passed).
The narrow except is the right one. On 3.12 and 3.13 ast.parse raises RecursionError during AST construction; on 3.14 the same shapes parse (the limit there is the real C stack, so it only trips around 100k terms in the main thread or at 5k in a small-stack thread) and when it does trip it is still a RecursionError ("Stack overflow ... during compilation"). Over-nested parentheses are a SyntaxError ("too many nested parentheses") and already return silently, so nothing new is swallowed and unexpected exceptions still propagate, which the third test pins.
Two small notes inline, neither blocking. I also timed hostile inputs: the deep scripts fail in milliseconds on 3.12 and 3.13, and on 3.14 the 10,000-term inputs parse fine and lint in well under 100 ms, so there is no slow path for a crafted script. CHANGELOG entry is under Unreleased / Fixed and the only conflict with main is CHANGELOG.md, so it needs one more merge before it can go in.
Signed-off-by: Afloat <ShuffleMonkey@163.com>
|
Updated in All 36 script-lint tests pass, together with lint and changed-file formatting. The CHANGELOG conflict is resolved against current main with both entries retained. Could you approve the new workflows and re-review the follow-up? |
Retain the pull request contribution and current upstream changes. Resolve the CHANGELOG conflict by preserving both sets of entries. Signed-off-by: Afloat <ShuffleMonkey@163.com>
Preserve the published 1.3.0 history and the new stable-CI release note, and place this pull request's change under Unreleased. Keep the reviewed source and test changes. Signed-off-by: Afloat <ShuffleMonkey@163.com>
Keep the published 1.3.1 release history and this pull request's change under Unreleased. The reviewed source and test changes are unchanged. Signed-off-by: Afloat <ShuffleMonkey@163.com>
Integrate main 9747bc1 while retaining the original contribution and its regression coverage. Keep the release note as a separate Unreleased Fixed bullet and preserve all main entries. Signed-off-by: Afloat <ShuffleMonkey@163.com>
|
@Afloat16 Please resolve merge conflicts and provide permission for me to merge your PR. |
Keep the contribution under Unreleased and retain the complete published release history. Signed-off-by: Afloat <ShuffleMonkey@163.com>
Current integration update — 2026-12-01
Source:
c1913a1783dd3f180813dc2556ac26ceead79f3e; integrated main:108fab86c5c0a8e1548289c036f0977a8c934bf3(1.3.1 release preparation).Resolved the CHANGELOG conflict by preserving the complete published 1.3.1 history and keeping this PR's entry under Unreleased. All PR-specific source and regression-test blobs are identical to previous head
efe7edc26fe223aa2fdafb2dbf62eab72336bbb2. The merge preserves both parents and carries the required DCO sign-off.Validation for this merge: whitespace checks, released-history preservation, and exact source/test blob comparisons passed. GitHub now reports the PR as conflict-free. Current-source integration checks await maintainer workflow approval; the earlier test results below retain their original revision scope.
Previous integration update (main ad4a12f)
Source:
efe7edc26fe223aa2fdafb2dbf62eab72336bbb2; integrated main:ad4a12f0e17fe42e8f6839e41b6799ab8990bcf3. Resolved the CHANGELOG conflicts after the 1.3.0 release and stable-CI update. The released history and new upstream entry are preserved, with this PR’s change under Unreleased. The PR-specific source and regression-test files are unchanged from the previous head.Focused validation: 36 passed, on tree
445f8ad55a566d8baeb1182238b3a2b9f0c5c2babefore the final CI-only main update. That final update changes only CI files and CHANGELOG; the tested runtime and regression files are unchanged. The updated CI modules passed 240 tests on the final #905 integration tree, and those CI blobs are identical in all 11 refreshed branches. Repository Ruff and whitespace checks passed.Current-head upstream workflows require maintainer approval. Earlier results below apply to their recorded revisions.
Original contribution and validation before this integration update
Current review follow-up (2026-11-30)
Current source: 8a37e96, including main d218ef8. The changelog conflict is resolved with both entries preserved. The healthy-script regression now checks that the required
flat_scriptandmissing_shebangfindings are present, without coupling this parser-limit regression to the entire advisory inventory. The Python-version-sensitive parse oracle is unchanged.Current-source verification: 36 passed in
tests/validators/test_script_lint.py;make lint, changed-file Ruff formatting and whitespace checks passed. The new upstream CI run and companion workflows are awaiting approval. Earlier verification below applies to its named source.Current source and main refresh — 2026-11-30
Current source:
12cf60dd436681b05e405690097c735d66ce418a, including main8b057485209ae956f4d520b8132bbe5c004f5988in a signed-off merge. Both sides’ changelog entries are retained, and the original contribution implementation and regression files are unchanged.Validation of this source completed with 36 passed, 0 failed, plus whole-repository lint, the OSS-boundary scan, wheel/sdist builds and final source/tree/lockfile checks on Ubuntu 24.04 / Python 3.12 with the locked full extras.
These are focused checks on the current main merge. Earlier results below retain their stated source revisions. Upstream workflow approval and final maintainer review remain pending.
Earlier main refresh and validation — 2026-11-29
Current source:
39d1e3113ca098bab52d3e7e2f85a34988fd0833. The signed-off merge includes mainda729c85676fc965ff81e710af89953126b44041. The only manual conflict resolution was inCHANGELOG.md: the script lint parser recursion entry remains a separate bullet under Unreleased → Fixed, and all main entries are preserved. The original contribution changes and regression coverage remain intact.At this exact source, focused contribution and integration validation completed with 36 passed, 0 failed. Whole-repository
make lint, OSS-boundary checks,make build(wheel and sdist), and final source/tree/lockfile checks also passed on Ubuntu 24.04 with Python 3.12 and the locked full extras.These are focused checks on the new main merge. The earlier complete-suite results below retain their stated source revisions.
Summary
An approximately 50–80 KB generated Python script with a 10,000-term attribute or addition chain can exceed the Python AST constructor's recursion limit. The exception leaves
ast.parsebefore a tree exists, aborting advisory lint and discarding findings for healthy files in the same skill or folder.Report a
parser_limitadvisory for that file and continue linting the remaining scripts. The finding names the affected path and explains that the Python parser could not inspect it. The parser limit itself, syntax-error handling, and advisory severity policy remain unchanged; unexpected parser exceptions still propagate.This is distinct from #760, which made traversal of successfully parsed ASTs iterative and explicitly left parser-error handling unchanged.
Verification
make lintequivalent, changed-file Ruff formatting, andgit diff --checkpass.make buildpasses, producing the wheel and source distribution.5b4e14636b8d43c6e90bb13803e7cc44d5c55b6d:make lint,make test, andmake build. Ubuntu 24.04, Python 3.12, Node 22, and the locked full project extras; pytest reported 45,546 passed, 338 existing skips, 19 existing deselections. No assertions or default test-selection rules were changed.Checklist
make lint.make test.make build.Release Impact
CHANGELOG.md.