Found while fixing #4026 (PR #4028). The COBOL function-start rule in gitgalaxy/standards/language_standards/languages/cobol.py (~line 272) excludes every word matching END-[A-Z...]+ as a scope terminator. A paragraph whose name starts with END- is legal, so it is not a unit to the engine.
Evidence (pinned corpus)
cics-genapp has a real paragraph End-Program. in Area A, reached by fall-through from MAINLINE and by PERFORM END-PROGRAM, in 5 programs:
| program |
line |
| base/src/lgipdb01.cbl |
312 |
| base/src/lgucdb01.cbl |
142 |
| base/src/lgucus01.cbl |
119 |
| base/src/lgupdb01.cbl |
215 |
| base/src/lgupol01.cbl |
146 |
#4028 fixes the same rule in cobol_graveyard_finder (the forge) and in the answer-key reader, and corrects the GENAPP key. The ground-truth ledger then shows the engine missing these 5 units (engine | units | … | END-PROGRAM | fn); #4028 ledgers them against this issue.
opensourcecobol4j jp-compat 029–033 (END-IPROC1., END-OPROC1.) has the same shape.
Fix
Exclude only the reserved END- scope terminators (END-IF, END-PERFORM, END-EVALUATE, END-READ, END-EXEC, … the full reserved list, as #4028 does for the finder), not every END- name. This changes galaxyscope's output on these files, so it needs a golden-master re-bless (crucible_check.py --update) with the moves explained, and then ground_truth_ledger.py update to ratchet the 5 rows away.
🤖 Generated with Claude Code
Found while fixing #4026 (PR #4028). The COBOL function-start rule in
gitgalaxy/standards/language_standards/languages/cobol.py(~line 272) excludes every word matchingEND-[A-Z...]+as a scope terminator. A paragraph whose name starts withEND-is legal, so it is not a unit to the engine.Evidence (pinned corpus)
cics-genapp has a real paragraph
End-Program.in Area A, reached by fall-through from MAINLINE and byPERFORM END-PROGRAM, in 5 programs:#4028 fixes the same rule in
cobol_graveyard_finder(the forge) and in the answer-key reader, and corrects the GENAPP key. The ground-truth ledger then shows the engine missing these 5 units (engine | units | … | END-PROGRAM | fn); #4028 ledgers them against this issue.opensourcecobol4j jp-compat 029–033 (
END-IPROC1.,END-OPROC1.) has the same shape.Fix
Exclude only the reserved END- scope terminators (END-IF, END-PERFORM, END-EVALUATE, END-READ, END-EXEC, … the full reserved list, as #4028 does for the finder), not every
END-name. This changes galaxyscope's output on these files, so it needs a golden-master re-bless (crucible_check.py --update) with the moves explained, and thenground_truth_ledger.py updateto ratchet the 5 rows away.🤖 Generated with Claude Code