Skip to content

COBOL paragraph header whose separator period is on the next line is not a unit #3419

Closed

Description

@squid-protocol

Found by the mainframe ground-truth ledger on CardDemo. Cause: header_period_next_line. The engine and the forge both have it, and so did the answer key's own draft reader until this PR fixed it.

Problem

app/app-transaction-type-db2/cbl/COTRTLIC.cbl has this header:

127400 2000-SEND-MAP
127500      .

It is a valid paragraph header: the separator period may follow on a later line. It is PERFORMed five times (PERFORM 2000-SEND-MAP THRU 2000-SEND-MAP-EXIT, lines 718–789). Neither the engine nor the forge makes it a unit, so:

  • units misses 2000-SEND-MAP (engine and forge);
  • the forge marks 2000-SEND-MAP-EXIT dead, because the start of its THRU range doesn't exist;
  • the function-level call graph loses the unit.

It is the only instance across the three corpora, but it's a legal shape that hand-edited code produces.

Acceptance

  • The engine | units and forge | units entries, and the forge dead false positive, stop reproducing.
  • A fixture for a header whose period is on the next line.

🤖 Generated with Claude Code

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 forging

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions