Repository navigation
det: refuse a COPY member found in several directories without an engine answer (#4461) - #4549
Merged
Merged
Conversation
…st-hit (#4461) Where no engine answer decides a COPY (a run without an engine, or a member outside the estate), the translator's directory search now collects one candidate per directory and raises CopyAmbiguous (a CopyNotFound) listing them when more than one distinct file holds the member. A single match still resolves; the same file via two directory spellings is one candidate; a copybook extension still beats a program extension; the shipped system members are a fallback, never a rival. Engine answers and CopyUnresolved are untouched (#4486 not decided). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR
Contributor
squid-protocol
marked this pull request as ready for review
October 6, 2026 07:24
This was referenced Oct 6, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4461.
What
The det translator's fallback COPY search (no engine answer: a run without an engine, e.g. det-port
copy_dirs, or a member outside the estate) took the first directory holding the member. It now collects one candidate per directory and raisesCopyAmbiguous(subclass ofCopyNotFound, so existing refusal handling applies) naming the COPY and listing every candidate when more than one distinct file holds it. A single match still resolves. Engine answers andCopyUnresolvedare unchanged; #4486 (SYSLIB-collision rule) is not decided here.Details: same file via two directory spellings is one candidate; copybook extensions still beat program extensions (CBSA INQCUST); the translator's shipped system members (DFHAID etc.) are a fallback only.
Evidence
tests/cobol_mainframe/test_copy_ambiguous_4461.py(8 tests: ambiguity listing, order is no substitute, single match, dedupe, ext precedence, shipped fallback, out-of-estate with an engine, engine answer still decides).det_port.py run --all-cases --translate-only; mortgage-mpmt 24/27 is its baseline). No case relied on first-hit order, so no case.json changed and no evidence re-proof was needed.--ratchets: 6/6 pass (ports, port-surface, estate, fact-crosscheck, completeness, ground-truth).translator-copy-search-orderledger cause stays empty.Left (why "Part of")
det/cics.pydeclared()still resolves a DTO field's copybook by first-hit name overcopy_dirs. That file is another lane's (#4534), so it was left alone; follow-up: route it through the same ambiguity check.🤖 Generated with Claude Code
https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR