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
det translator: a COPY that finds only a program source splices that whole program into the includer (silent wrong records) #4460
bugUnintended behavior or logic failure in the enginedata-integrityIssues relating to RAM state or SQLite database fidelitylegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: highCore feature broken, but workarounds existscope:sweepCompletes a class the burned estates already touch (siblings); blocks no program
When no copybook answers a COPY, det.source.expand falls back to a program source of that name (PROGRAM_EXTS) and splices the whole program, IDENTIFICATION and DATA DIVISIONs included, into the including program. The including program then gets another program's records (and loses its own, after the spliced divisions), silently for the DATA DIVISION; the PROCEDURE DIVISION is refused later only by luck of the parse.
Evidence (origin/main e3ace8a, #4273 cross-check on estate-crucible v0.4.0)
apps/SHIP/cobol/SHPINQ.cbl:14COPY SHPRATE. → apps/SHIP/cobol/SHPRATE.cbl (a program). The translator's records: WS-RATE-PARM 0 bytes, then a DFHCOMMAREA taken from SHPRATE.cbl (60 bytes of CA-* fields), while SHPINQ's own 01 WS-RESP and 01 DFHCOMMAREA PIC X(60) (lines 16, 18) are gone. Same in SHPINQO.cbl.
apps/ORDR/cobol/ORDMAIN.cbl:29COPY ORDPRICE. → apps/ORDR/cobol/ORDPRICE.cbl: a LK-ORDER record that ORDMAIN does not declare.
The estate's key: WS-PRICE-PARM / WS-RATE-PARM have no layout (the member is not a copybook); the engine says so (bytes unknown).
Impact on a real estate
Wrong storage in a translation, with no refusal. The fallback exists for estates that keep copy members as .cbl (the comment in expand), so the fix is to refuse a member that is a program (it has an IDENTIFICATION / PROGRAM-ID), not to drop the fallback.
Acceptance criteria
A COPY that resolves only to a program source (a member with IDENTIFICATION DIVISION / PROGRAM-ID) raises CopyNotFound (or a named refusal).
A test, and the cross-check ledger cause translator-copy-program-member loses its entries.
Found during: #4273 engine-vs-translator fact cross-check (PR #4456)
bugUnintended behavior or logic failure in the enginedata-integrityIssues relating to RAM state or SQLite database fidelitylegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: highCore feature broken, but workarounds existscope:sweepCompletes a class the burned estates already touch (siblings); blocks no program
Activity
det: refuse a program whose COPY resolution differs from the engine's (…
det: take COPY resolution from the engine (#4468) (#4489)
det: expand a COPY after other text or with its member on the next li…
det: translate a SYSLIB collision through the engine's first-library …