Skip to content

cobol_coverage: LineMap pairs equal-size rewritten blocks as exact, hiding COMEN01C WHEN 147 #4620

Closed

Description

@squid-protocol

Part of #4270 (found in #4602).

cobol_coverage.LineMap._pairs pairs a replace block whose two sides have the same number of lines index by index, and marks each pair exact. When the harness rewrites a 4-line EXEC CICS INQUIRE (COMEN01C lines 148-151) into 4 compiled lines (MOVE / CALL / MOVE / MOVE), the compiled MOVE maps "exactly" to the EXEC line. The verb check then fails, so the trace never shows the WHEN arm at line 147 (WHEN COPAUS0C) as taken, even though the option-11-* scenarios of carddemo-menu run it.

Possible fix: pair lines of an equal-size block only where they are similar enough (>= SIMILAR, the rule unequal blocks already use), and map the rest loosely. A trial on menu's traces makes 147 covered, but IF EIBRESP = DFHRESP(NORMAL) at line 152 then becomes untraceable (raw 28/33 -> 27/31; 27/28 with #4602's entries). This changes shared code, so measure every case's coverage before and after (crucible coverage.json, the det-sweep ledger).

Activity

  1. added
    bug
    legacy-modernization
    testing
    on Oct 8, 2026
  2. added
    scope:core
    era:2
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugera:2legacy-modernizationpriority: mediumscope:coretesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions