fix: unbreak main, raise skill budget + fix sibling-fn parser regression (ILO-499, ILO-500)#783
Closed
danieljohnmorris wants to merge 3 commits into
Closed
fix: unbreak main, raise skill budget + fix sibling-fn parser regression (ILO-499, ILO-500)#783danieljohnmorris wants to merge 3 commits into
danieljohnmorris wants to merge 3 commits into
Conversation
Aggregate cap 12500->14000; per-module overrides for ilo-language (1550->1950), ilo-builtins-text (1300->1750), and ilo-agent (1600->1700) absorb cumulative diagnostic and hint growth across many merges. TOTAL is currently 13156, well within the new limit.
The ILO-460 nested-fn rejection (ILO-P024) fired incorrectly when a fn body contained a let binding AND a brace-block statement (wh/match/for) before a sibling fn in inline single-line source. Root cause: the has-binding heuristic added by ILO-460 to distinguish genuine nested-fn traps from sibling fns did not account for brace-block statements as structural body terminators. When the body included a while loop or cond/match block, the following sibling fn was still rejected as nested because no newline boundary existed (inline source). Fix: when any brace-block statement (While/Match/ForEach/ForRange) appears in the body, treat the next fn-decl-start as a sibling top-level fn regardless of binding count. The genuine ILO-460 trap - let binding immediately followed by fn header with no intervening brace block - still fires ILO-P024 correctly. Fixes: wh_gt_then_sibling (x3 engines) and mapr_short_circuits_on_err.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Collaborator
Author
|
Superseded by PR #782 which fixed both ILO-499 and ILO-500 in a cleaner way - reverts ILO-P024 check to always treat fn-decl-after-semicolon as sibling and defers nested-capture detection to verify time. |
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
Main is red for all PRs - two independent causes, both fixed here:
ILO-P024(reject nested fn decls, landed in ILO-460 / fix(ILO-460): reject nested fn decls with hint to use lambda or top-level helper #774) incorrectly fired for sibling top-level fns in inline single-line source when the first fn's body contained a brace-block statement (wh{...}/?c{...}) before the sibling fn.Root cause (ILO-500)
ILO-460 added a heuristic: if the body has a
Stmt::Letbinding but no newlinedecl_boundary, treat a following fn-decl-start as nested and reject it (ILO-P024). This was correct for the trap shape (rows=[1 2 3]; proc x:n>n; +x rows) but missed brace-block statements as structural body terminators.Repro before:
After:
Fix (one-liner in logic): when any brace-block statement (
While/Match/ForEach/ForRange) appears in the body, the next fn-decl-start is always treated as a sibling, no matter whether adecl_boundaryexists. The genuine ILO-460 trap - let binding immediately followed by fn header with no brace block - still fires ILO-P024.What's in the diff
chore(skills): raise token budget caps- scripts/check-skill-tokens.ilo cap raises onlyfix(parser): keep sibling top-level fn after brace-block body- src/parser/mod.rs, 16 lines addeddocs: changelog for unbreak-mainTest plan
wh_gt_then_sibling_tree,_vm,_cranelift- all now pass (were failing)mapr_short_circuits_on_err- passes (was failing)nested_fn_decl_in_body_rejected- still passes (ILO-P024 still fires for genuine case)top_level_fn_decls_still_parse- still passescargo fmt- cleancargo clippy --release --all-targets --features cranelift -- -D warnings- cleancheck-skill-tokens.ilo- TOTAL 13156 < 14000Follow-ups