Repository navigation
fix(compiler): bound nesting with positioned resource diagnostics - #73
Merged
Merged
Conversation
This was referenced Nov 1, 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.
Why does this change belong in Nano?
The 100-parenthesis source in #64 exhausted Python's stack in compilation and editor diagnostics. Flat operator chains could also produce unsafe trees for recursive compiler passes.
What changed?
Source entrypoints now enforce deterministic syntax-scope and expression-depth limits of 32 before downstream recursion. Unary runs parse iteratively.
NanoResourceLimitErrorpreserves the offending source position and exposes stableRESOURCE_LIMIT,resource, andlimitfields. Trusted hosts can lower the frozenCompilerLimitsceiling explicitly; raising it is rejected.Source bytes, token count, and total emitted nodes remain unbudgeted in this focused fix. Counting rules, host configuration, limits of the policy, and reproducible depth-boundary timing/memory measurements are documented in
docs/compiler-limits.md. There is no global worst-case performance claim for unlimited source width.Validation
python scripts/check_contribution.py --all: 55 entries ready for review.643cf5f: 1510 passed, 7 skipped on Python 3.11.9 (300.47s).Python 3.13 could not run locally because the WindowsApps launcher is access-denied; the repository CI matrix covers Python 3.10–3.13.
Boundary check
Fixes #64. Review/merge remains manual under roadmap #67; an open PR is not issue closure.
Verified integration disposition
This exact source head
643cf5f698c5f95609bc84374e055dd2b8656c68is an ancestor of actual integration commitcb6ea884d63dcaa8cc0e7c0b952bb88784e8219f, delivered by #82 tomain. The source is included; no duplicate patch or separate source-PR merge is needed.The human explicitly authorized the three integration PRs Nano82/ATLAS188/Predator460 to use reviewed passing LOCAL evidence in place of the earlier self-hosted gate. The waiver is recorded verbatim in those merged integration PR bodies; it is not a passing CI claim or a separate waiver-based admin merge of this source PR. Cloud41322926091 remains FAILED STARTUP with zero jobs/check runs. Local source pins, commands, counts, skips, review limitations, merged trees and actual target branches are recorded there and in the captain evidence bundle.
This source PR is retired as included/superseded by that actual integration. Issue #61 remains open for incomplete service-wire acceptance; other issue closure requires its own acceptance audit. Branches are preserved. No formal GitHub approval, production activation, runner/security/credential change or provider execution occurred.