You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
zig + dart: globals rule anchors ^[ \t]* so function-local var/const count as globals (+150% on the rosetta corpus) #2651
Found by the #2560 rosetta classification sweep (zig #2607; ledger entry indented-declaration-globals already validates the shape for zig+dart, upstream_issue was null until now).
Cause
zig's (and dart's) globals rule anchors on ^[ \t]* — any line-start indentation — rather than true top-level scope. Function-local declarations therefore count as globals: zig corpus b.zig's 2 function-local vars and c.zig's function-local const all count alongside a.zig's 2 genuine top-level consts → globals 5 vs 2 planted (+150%).
Fix shape
Anchor top-levelness for real (column-0 only, or not-inside-a-function via the existing function-slice spans), for both zig and dart in one PR — the ledger entry names both as sharing the unanchored shape. Audit other brace-family languages' globals rules for the same ^[ \t]* anchor while there. Golden-master re-bless expected (globals counts drop wherever real repos declare locals with the same keywords).
Cause-key indented-declaration-globals; found via keyword-rosetta classification.
Activity
fix(core-engine): Rosetta sweep batch 2 — nine slicer/regex/DAG fixes…
fix(core-engine): Rosetta batch 3 wave 1 — five registry-regex fixes …
fix(core-engine): scheme globals decided by enclosing form, not inden…