Repository navigation
Description
Problem
The det translator resolves every COPY by searching a flat list of directories its caller hands it (a det-port case's copy_dirs, or every copybook directory of the estate). It has no notion of a program's SYSLIB concatenation, of COPY X IN LIB, or of a member that exists in several libraries. Where the same member lives in two libraries, the translator silently takes whichever directory comes first; the engine already resolves these from the estate's copy-library declaration (#4265) and reports collisions.
Evidence (origin/main e3ace8a, #4273 cross-check on estate-crucible v0.4.0, whose key states the resolution)
- H-0034:
apps/ACCT/cobol/ACCTPOST.cbl:45,apps/CUST/cobol/CUSTINQ.cblCOPY DATEWS→ key and engineshared/copylib/DATEWS.cpy(16 bytes); translatorapps/PAYR/copybook/DATEWS.cpy(18 bytes).WS-DATE-AREAcomes out 18 bytes withWS-CURR-TIME @10instead of@8. - H-0052:
apps/ORDR/cobol/ORDVOLD.cbl:14COPY ORDREC→ key and engineapps/ORDR/oldcopy/ORDREC.cpy(36 bytes); translatorapps/ORDR/copybook/ORDREC.cpy(41).apps/SHIP/cobol/SHPINQ.cbl:12likewise (key 36, translator 41). - Measured over estate-crucible: translator
offsetsvs the key 90.5% P / 90.8% R; engine 99.4% / 98.9% (same records).
Impact on a real estate
Any estate with copybook version drift across libraries gets a translation built on the wrong layout, with no warning. The equivalence proof would not catch it if the oracle is given the same directory list.
Acceptance criteria
- The translator takes each COPY's resolved member from the engine (
EngineFile.copy_deps/ the scan's copy-library resolution), or from the estate's SYSLIB declaration per program, instead of a first-hit directory search; an ambiguous member with no declaration is refused by name. - The cross-check ledger cause
translator-copy-search-orderloses its entries.
Decision recorded in docs/language_status/fact_ownership.md (PR #4456): the engine owns COPY resolution.
Found during: #4273 engine-vs-translator fact cross-check (PR #4456)
🤖 Generated with Claude Code
Activity
det: refuse a program whose COPY resolution differs from the engine's (…
det: a COPY member in several directories is refused by name, not fir…
fix(det): cics DTO field lookup refuses an ambiguous COPY member (#4461…