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
python/embedded_python: doc rule counts each docstring twice (open and close delimiters both match, no pairing) #2658
Found by the #2560 rosetta classification sweep (python #2593, embedded_python #2573): both record doc = 2 per single planted docstring.
Cause
The python-family doc rule counts delimiter occurrences with no open/close pairing — one docstring's opening """ and closing """ each match, so every triple-quoted docstring counts twice. (This is the same "one construct, two markers" family as the javadoc /** @param */ corpus finding, but here it's structural: EVERY docstring double-counts regardless of content, so it can't be authored around corpus-side.)
Fix shape
Pair symmetric delimiters in the doc-rule match loop (count """/''' occurrences // 2, or match the full """...""" span non-greedily as one hit — mind ReDoS bounds per the 12 engine rules). Applies to python and embedded_python (shared/duplicated rule — check which). Golden-master re-bless: python-family doc counts roughly halve corpus-wide.
Cause-key doc-delimiter-double-count; 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 2 — doc-comment pairing, rule …