Skip to content

COBOL engine: CALL to a sibling program in the same member (PAYMAIN → PAYCALC / literal-ID PAYRPT) resolves to nothing #4447

Closed

Description

@squid-protocol

What

Found by the estate-crucible gate's re-score of main (83756783c) against v0.4.0, for the CI gate in PR #4446. Horrors are 60/60, but 2 call-site facts fail:

  • apps/PAYR/cobol/PAYMAIN.cbl L42 CALL 'PAYCALC': the key expects it to resolve to the sibling program in the same member; the engine resolves it to nothing.
  • apps/PAYR/cobol/PAYMAIN.cbl L43 CALL 'PAYRPT': same.

PAYMAIN.cbl holds several programs. PAYRPT is declared with a literal PROGRAM-ID (PROGRAM-ID. 'PAYRPT'.), which is horror H-0029 (#4242 / D041). Since #4242 the engine records PAYRPT as a program, so H-0029 reads PASS. But the CALLs that depends_on H-0029 still don't resolve: a CALL to a program declared later in the same source member finds no target. Check whether this is specific to literal PROGRAM-IDs (PAYRPT) or applies to every sibling program (PAYCALC as well).

Do

  • Reproduce with a minimal multi-program member: one plain and one literal PROGRAM-ID sibling, each CALLed by the first program.
  • Fix the narrowest layer (invocation resolution across the programs of one member). Add regression tests, and confirm both call-site facts pass in the estate scorecard.
  • Once the gate (ci: estate-crucible scorer as a ratcheted CI gate (#4317 phase 5) #4446) is on main, update its baseline with the gate's --update-baseline in the fixing PR, so the improvement is locked in.

Side note for the scorer: a horror reads PASS even while facts that depends_on it fail. Consider showing a horror's dependent facts in its verdict, so a cascade like this is visible.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    core-engine
    legacy-modernization
    on Oct 5, 2026
  2. added
    scope:sweep
    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

    bugcore-enginelegacy-modernizationscope:sweep

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions