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
lua: api bare-return overmatch + orphan-conversion double-credit compound to +110% api exposure #2657
Found by the #2560 rosetta classification sweep (lua #2584) — together these drive the worst single deviation in the whole sweep (risk_api_exposure +110%).
Mechanism 1: api-bare-return-overmatch
lua's api rule has a bare return <ident> alternative meant for lua's module-export idiom (return M at file end) — but it fires on ordinary function returns anywhere. Same defect pattern as powershell's api keyword collision (filed separately): the export heuristic's alternative is under-scoped.
Mechanism 2: api-orphan-conversion-no-dedup
The Contextual Baseline Fix (galaxyscope.py; raw values now recorded per #2536) adds orphan→api credit without deduplicating against functions the raw api regex already counted — for lua's shape this compounds up to 3x per function (a function counted by the bare-return overmatch AND converted as an orphan).
Fix shape
Scope the bare-return alternative to module-position returns (end-of-file / top-level, e.g. anchored to column-0 return \w+\s*$ near EOF) or drop it in favor of counting M.name = style exports.
Activity
fix(core-engine): Rosetta sweep batch 2 — nine slicer/regex/DAG fixes…