Repository navigation
Description
Problem
COBOL sources that name copybooks with a quoted file literal that includes an extension record zero COPY statements, in both free and fixed format:
* our own minimal example (fixed format, area B)
COPY "ws-state.cpy".
* free format (>>SOURCE FORMAT FREE), column 1
COPY "ws-state.cpy".Evidence: acherm/agentic-cobol-doom-cc (MIT, 117db757; a COBOL program built by a coding agent for a published study) has 7 such COPY statements in walker.cob and copy_statement_data = 0. A larger internal sample of GnuCOBOL free-format code shows the same (dozens of statements, 0 recorded). Everything else in those scans is healthy (rc=0, paragraphs, call sites, data moves and record fields all extracted), so this is isolated to COPY recognition. Copybook edges drive the dependency graph, blast radius and the copybook layouts.
Likely causes (to confirm)
- The member name is a quoted literal with a dot and extension (
"mapstate.cpy"); patterns that take({_WORD}+)inside optional quotes (e.g.gitgalaxy/tools/cobol_to_java/det/source.py:652_COPY) stop at the.. - Free format (
>>SOURCE FORMAT FREE):COPYin column 1, no sequence/indicator area. Check thesection_copiespath that feedscopy_statement_data(gitgalaxy/galaxyscope.py:1270) andgitgalaxy/core/mainframe_boundary.py(_COPY_IN_ENTRY,_COPY_LIBRARY).
Class (fix all members, test each)
COPY "name.cpy"./COPY 'name.cpy'.(quoted file literal with extension), free and fixed formatCOPY name.andCOPY "name".without extension (regression guard)COPY x OF lib/IN lib,REPLACING ==a== BY ==b==with a quoted member- the member resolves to the copybook file in the scanned tree (
sprstate.cpy→ the.cpyfile), so the copybook edge exists - indented COPY inside a group item
Acceptance
- Rescan of
acherm/agentic-cobol-doom-ccat117db757(clone outside the repo, never commit it): 7 COPY statements recorded, each resolving to its.cpyfile. - Fixtures (our own code) per shape above, free and fixed format; COBOL goldens and the estate/CICS crucibles show no unintended drift (any drift explained).
Found while extending the DOOM corpus to non-C languages (#5457).
🤖 Generated with Claude Code
Activity
squid-protocol commentedon Oct 19, 2026
Claimed by promoter-bot host
nyx, lease renewed 2026-10-19T14:48Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove theclaim:nyxlabel.squid-protocol commentedon Oct 19, 2026
Second, independent case:
acherm/agentic-cobol-doom-cc(MIT,117db757; built by a coding agent for a published study) is fixed-format COBOL withCOPY "ws-levels.cpy".in area B (column 12): 7 COPY statements inwalker.cob, 0 recorded. So the trigger is the quoted name with an extension, in both free and fixed format, not only free format. The acceptance rescan should include this repo too.🤖 Generated with Claude Code
squid-protocol commentedon Oct 19, 2026
Sibling gaps from PR #5626: (1) a plain COPY of a copybook with its own 01 records before a section's first entry gets a row, but galaxy_ir does not add its records to the layout; (2) plain COPYs attached to an entry stay in record_data.copy_members, so the count matches only for both tables together. Acceptance (cobol_doom rescan at ae3b0e1) still open.
[-]COBOL: free-format quoted copybook literals (COPY "x.cpy".) record no COPY statements (cobol_doom: ~40 missed)[/-][+]COBOL: quoted copybook literals with an extension (COPY "x.cpy".) record no COPY statements, free and fixed format[/+]COBOL COPY: generic fixture names; record procedure-division COPY sta…
COBOL COPY: file-extension class uses \w so the national-letter test …
COBOL: quoted copybook literals with an extension keep IN/REPLACING; …