Skip to content

cobol: '066600DDEBUG-LINE-TEST-05-A' name mangling survives the fixed-format func_start fixes — a 4th extraction path #2480

Description

@squid-protocol

Follow-up from the cobol func_start fixes in #2481 (three fixed-format FPs from the v1.2.0 corpus).

Residual

One occurrence still mangles:

  • language-crucible/data/cobol/che-che4z_nist_ccvs85/DB1034.2.cbl:665
    066600DDEBUG-LINE-TEST-05-A. (col 7 = D debug indicator) → GitGalaxy reports the function name as 066600DDEBUG-LINE-TEST-05-A instead of DEBUG-LINE-TEST-05-A.

The sibling debug-line paragraphs in the same file (063900DDEBUG-LINE-TEST-03A at :638, and 064100DDEBUG-LINE-TEST-03-A in DB1024.2.cbl:640) are correctly extracted after #2481. This one is not.

What's confirmed

  • func_start in isolation is correct: func_start.finditer(full_file_text) gives group(1) == 'DEBUG-LINE-TEST-05-A' for this line.
  • _slice_by_labels (Mode A) no longer has the BOOST_/TEST → match.group(0) fallback (removed in fix(cobol): three fixed-format func_start false positives from the v1.2.0 corpus #2481).
  • _extract_name('DEBUG-LINE-TEST-05-A') returns 'DEBUG-LINE-TEST-05-A' (correct).
  • Yet galaxyscope on DB1034.2.cbl still emits 066600DDEBUG-LINE-TEST-05-A — i.e. match.group(0) — for this one line.

So a fourth code path (a rescan/fallback, or a route other than _slice_by_labels for this file/segment) is producing match.group(0) as the name. Candidates not yet ruled out: the _[Truncated]-remnant _slice_by_labels re-scan (detector.py:1977), or _slice_by_keywords.

Distinguishing feature of the failing line

Line 665 is immediately preceded by *-column-7 comment lines (663–664) and immediately followed by more D-column-7 debug lines (666–667) then a * comment (668). The greedy Mode-A body for this paragraph spans those comment lines to the next real paragraph (DEBUG-LINE-TEST-05-C at :671). The correctly-extracted siblings have an inline body on the same line or a plain-column-7 next line.

Repro

cp language-crucible/data/cobol/che-che4z_nist_ccvs85/DB1034.2.cbl /tmp/x/
galaxyscope /tmp/x --db-only --output /tmp/x
sqlite3 /tmp/x/*.db "SELECT func_name FROM function_data WHERE func_name LIKE '%DDEBUG%'"
# -> 066600DDEBUG-LINE-TEST-05-A   (expected: DEBUG-LINE-TEST-05-A)

Rare (1 occurrence in ~10,140 cobol functions), but tracked at priority: high per the repo convention that COBOL/JCL extraction bugs are high priority.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: highCore feature broken, but workarounds existthreat: false-positiveAccuracy tuning: Engine incorrectly flagged safe code

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions