Title: DO NOT MERGE: test-only AST ownership disposal prototype by youknowdot · Pull Request #9880 · RustPython/RustPython · GitHub
Open Graph Title: DO NOT MERGE: test-only AST ownership disposal prototype by youknowdot · Pull Request #9880 · RustPython/RustPython
X Title: DO NOT MERGE: test-only AST ownership disposal prototype by youknowdot · Pull Request #9880 · RustPython/RustPython
Description: DO NOT MERGE: test-only prototype, not a runtime fix Publish the unfinished AST-disposal investigation for review and continued work. This does not fix the Windows _pyrepl stack overflow or change production parser/compiler/VM behavior. The module is compiled only under cfg(test). Prototype Explicit ownership worklist instead of recursively destroying AST edges. Handles the pinned Ruff AST's 45 recursive-capable runtime_* field declarations in addition to semantic Transformer edges. Treats recursive ConstantValue::Tuple and Frozenset payloads as owned work items. Includes directly related small-stack tests for actual Ruff normal/recovered parses, synthetic runtime list/constant chains, and format-spec chains. Does not reuse the rejected shortcut that treats a successful Python recursion-limit check as a native-stack safety certificate. This reconstruction deliberately uses the simple iterative algorithm, not the prior bounded-chunk optimization. Older experimental timing is not validation of this reconstructed source. Unfinished / merge blockers No production ownership guard or integration into compiler, AST conversion, tokenizer, or WASM entry paths. Ownership must remain protected across early returns, transfers, and preprocessing subtree replacements, not just root destruction. Field coverage needs independent review and a robust maintenance strategy when Ruff's schema changes. The tests do not dynamically exercise every field or arbitrary runtime AST. Panic/unwind behavior has not been established. No same-baseline full-VM performance measurement. Worklist allocation and per-node dispatch may regress normal workloads; no performance claim is made. Windows, workspace tests, C-API tests, and workspace Clippy remain pending. Verification Current reconstruction compiled with rustc 1.99.0 --edition=2024 --test against existing debug rlibs for the pinned Ruff dependency. All three standalone module tests passed, zero ignored, on Linux (1.44 seconds). Each test runs its body on a 256 KiB thread stack. cargo fmt --all, git diff --check, and normal commit hooks passed (merge-conflict check, rustfmt, cspell; unrelated file hooks skipped). This direct-module check is not cargo test for the compiler/workspace. Full integration, Windows, C-API, workspace Clippy and performance remain unrun. Prior-environment test results are not counted as current verification. AI assistance: OpenAI Codex generated/reconstructed this prototype and its tests, performed the local checks, and drafted this description under the maintainer's instruction to publish unfinished work as an explicitly non-mergeable draft.
Open Graph Description: DO NOT MERGE: test-only prototype, not a runtime fix Publish the unfinished AST-disposal investigation for review and continued work. This does not fix the Windows _pyrepl stack overflow or change ...
X Description: DO NOT MERGE: test-only prototype, not a runtime fix Publish the unfinished AST-disposal investigation for review and continued work. This does not fix the Windows _pyrepl stack overflow or change ...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9880
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:ec08de8e-7f18-e03a-210d-b7c4f3ea3b83 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C180:ADA9D:34E1069:43D5B2B:6B01D7F2 |
| html-safe-nonce | 4e8340b40251ee401cc10e672babc8347c3b1c12d7cba3818c37250618d62753 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTgwOkFEQTlEOjM0RTEwNjk6NDNENUIyQjo2QjAxRDdGMiIsInZpc2l0b3JfaWQiOiI3Mzg0MzM0NTcyMjczNjUzNzQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a36ba0ee7bc076c12b990d167c41dce206b7572fd688b29460a57bf60ea9ade4 |
| hovercard-subject-tag | pull_request:5337461349 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9880/files |
| twitter:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| og:image:alt | DO NOT MERGE: test-only prototype, not a runtime fix Publish the unfinished AST-disposal investigation for review and continued work. This does not fix the Windows _pyrepl stack overflow or change ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width