Repository navigation
Closed
Labels
enhancementNew feature, sensor, or structural signaturelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: highCore feature broken, but workarounds existscope:infraCI, tooling, churn/factory, docs infrastructuretestingUnit, integration, and E2E pipeline verification
Description
Problem
The mainframe answer keys (tests/cobol_mainframe/answer_key/*.json) record each unit as name, kind and start line only. They have no end line and no intra-program edges: which paragraph PERFORMs or GO TOs which, and from which line. Program-level calls, copybooks, records, dead and so on are scored, but a unit's extent and the edges between units are not.
So a whole class of engine bug scores as correct. #4301 / #4283 hid for months in two keyed corpora:
- In CBSA, 553 code lines and 39 PERFORM edges sat outside every unit.
- In CardDemo, 11
RETURN-TO-*paragraphs were cut to their header line.
Every unit name and start line was right, so the key passed. #4302 (main-line code before the first paragraph belongs to no unit) is the same class and is also invisible to the key today.
Proposal
- Key format: each unit gains
end(last line, inclusive). Each unit also gainsperforms/go_to(or a singleedgeslist of{verb, target, line}), plus the main-line entry code before the first header (COBOL engine: statements between PROCEDURE DIVISION and the first paragraph belong to no unit, so the program's main-line PERFORM/CALL edges are never recorded #4302). - Drafting: derive the new fields with the key's existing drafting path, then verify them the way the current fields were verified (
verification, cross-checked against the forge). Don't copy them from the engine. - Scoring:
cobol_answer_key.py scoreaddsunit extents(exact-match rate on start and end, plus a lines-outside-any-unit count) andintra-program edges(precision and recall). Report them in the ground-truth ledger like the existing fields. - Corpora: the 7 keyed corpora (zopeneditor, CBSA, CardDemo, GenApp, zECS, DSF, DBB mortgage).
Acceptance criteria
- The key schema has unit
endand per-unit edges, documented inanswer_key/README.md. - All 7 keys are re-drafted and verified with the new fields.
- The score reports unit extents and intra-program edges; ledger entries for every mismatch, each with an owning cause.
- Run against the commit before COBOL/PL/I units run to the next header, not the last GOBACK/EXIT/RETURN (#4301, #4283) #4315 (
c136f46b), the score flags the COBOL/PL/I engine: a paragraph ends at its last line-leading GOBACK/EXIT/RETURN, even a conditional one, so the code after it loses its PERFORM/CALL edges (root cause of #4283) #4301 shapes (UPDCUST, CRECUST, BANKDATA, CardDemoRETURN-TO-*), proving the gap is closed.
Related
- COBOL/PL/I engine: a paragraph ends at its last line-leading GOBACK/EXIT/RETURN, even a conditional one, so the code after it loses its PERFORM/CALL edges (root cause of #4283) #4301 / COBOL engine: UPDCUST records no PERFORM edges #4283 (fixed by COBOL/PL/I units run to the next header, not the last GOBACK/EXIT/RETURN (#4301, #4283) #4315), whose acceptance criterion 4 this carries.
- COBOL engine: statements between PROCEDURE DIVISION and the first paragraph belong to no unit, so the program's main-line PERFORM/CALL edges are never recorded #4302, COBOL engine: inline PERFORM forms produce phantom callees (
TEST,FOREVER,WS-NofWS-N TIMES,3,END-IFafterEXIT PERFORM) #4305. - Epic: estate-crucible -- a synthetic mainframe estate whose answer key is generated with it #4317 (estate-crucible): the synthetic answer key covers extents and edges from the start; this issue brings the real-repo keys level with it.
Found while fixing #4301 (2026-10-04).
Metadata
Metadata
Assignees
Labels
enhancementNew feature, sensor, or structural signaturelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: highCore feature broken, but workarounds existscope:infraCI, tooling, churn/factory, docs infrastructuretestingUnit, integration, and E2E pipeline verification
Activity
Answer keys: score unit extents and intra-program PERFORM / GO TO edg…
Ground-truth ledger: ratchet out 182 unit-extent entries #4334 fixed (#…