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
fragile_debt/planned_debt match inside hyphenated code identifiers (HACK-LEVEL, PROBE-TODO) — debt rules are whole-text, not comment-anchored #2537
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingmetricsHeuristics, risk exposures, and topological math updatespriority: highCore feature broken, but workarounds existthreat: false-positiveAccuracy tuning: Engine incorrectly flagged safe code
Found by the #1096 control corpus (cobol reference folder): fragile_debt / planned_debt
are whole-text rules, not comment-anchored — and because - is a regex word boundary,
they match inside hyphenated code identifiers.
Evidence (verified via finditer + end-to-end scan, 2026-08-31)
data/cobol/c.cpy plants exactly one * HACK: comment and one * TODO: comment, plus a
reverse decoy data item 77 HACK-LEVEL PIC 9. (referenced once more via DISPLAY HACK-LEVEL.)
and a paragraph named PROBE-TODO.:
observed fragile_debt = 3 (the comment + both code occurrences of HACK-LEVEL)
observed planned_debt = 2 (the comment + the PROBE-TODO paragraph name)
Python's equivalent reverse decoy (HACK_LEVEL = level) is inert — but only by accident of
tokenization: _ is a word character so \bHACK\b can't match, while - is a boundary so
it can.
Why it matters
Real hyphenated-identifier ecosystems hit this constantly: COBOL data items like BUG-COUNT
or WS-FIX-FLAG, CSS classes like .bug-icon, Lisp-family symbols like fix-me. Every one
of them currently contributes tech-debt signal from ordinary code, inflating debt scoring in
exactly the legacy languages (COBOL/JCL) where debt measurement matters most.
Possible directions (needs a design decision, not proposing one unilaterally)
Anchor the debt rules to the comment surface (prism already separates it — the branch/io
family is stripped from comments today, so the plumbing exists).
Keep whole-text but require a following :/! or comment-marker context.
Per-language identifier-shape guards for hyphenated-word languages.
Batch-4 addendum from the corpus: scheme reproduces the leak — (define (probe-todo plan) ...) records planned_debt 2 (the TODO comment + the identifier), confirming the lisp-family exposure predicted in this issue. Corpus evidence: keyword-rosetta/data/scheme/c.scm + ledger cobol-hyphen-identifier-debt-leak.
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingmetricsHeuristics, risk exposures, and topological math updatespriority: highCore feature broken, but workarounds existthreat: false-positiveAccuracy tuning: Engine incorrectly flagged safe code
Activity
squid-protocol commentedon Aug 31, 2026
Batch-4 addendum from the corpus: scheme reproduces the leak —
(define (probe-todo plan) ...)records planned_debt 2 (the TODO comment + the identifier), confirming the lisp-family exposure predicted in this issue. Corpus evidence:keyword-rosetta/data/scheme/c.scm+ ledgercobol-hyphen-identifier-debt-leak.docs(language-status): cobol §10 rosetta consistency capstone (#2567 …
fix(standards): guard debt patterns against hyphenated identifiers (#…
Engine: COBOL rules ignore keywords inside hyphenated words; included…