Skip to content

--copy-libraries: an unqualified COPY that no declared library holds falls back to the default resolver and links to a program source of the same name #4420

Closed

Description

@squid-protocol

Problem

With --copy-libraries (#4405), a COPY X whose member is in none of the importer's declared SYSLIB libraries falls back to the default resolver. That resolver can link it to a program source of the same name. In estate-crucible v0.4.0 (horror H-0053): COPY ORDPRICE in ORDMAIN resolves to apps/ORDR/cobol/ORDPRICE.cbl, and COPY SHPRATE in SHPINQ / SHPINQO to SHPRATE.cbl. The failure spills into those members' copy_members and layouts.

Expected

When the importer's SYSLIB is declared, a member missing from every declared library gets no edge, as the compiler would fail too. It should be reported as a gap. Runtime-supplied names (SQLCA, DFHAID, …) can stay unresolved without a fallback.

Acceptance criteria

  • Declared SYSLIB plus a member found in no declared library gives no import edge and a recorded gap; undeclared importers keep today's behaviour.
  • H-0053 passes; regression tests incl. a runtime-supplied member and an undeclared importer.

Related: #4265, #4405.

Found by estate-crucible v0.4.0 phase 3 (estate realism, #4317), scored on main by tests/tools/estate_crucible.py (PR #4418 has the scorecard).

Activity

  1. added
    bug
    core-engine
    legacy-modernization
    on Oct 5, 2026
  2. added a commit that references this issue on Oct 5, 2026
  3. 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-modernizationpriority: mediumscope:sweep

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions