Skip to content

Test: the det COPY fallback search is never reached for an estate member (Part of #8412) - #8415

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8412-20261113T1951Z
Nov 13, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8412-20261113T1951Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8412 (item [c:e1e3afb8]).

Checklist: done [c:e1e3afb8]

What

The item asked whether det/source.py _search_member (tries "", .cpy, .copy, .dcl, .cbl, .cob) must agree with the engine (which also takes .cobol, .pco, .cut and body-judged .inc), or be proven never reached for an estate member. Chosen: prove it, by test, with no engine change. With an engine, resolve asks EngineCopies.member first, so an engine-resolved member of any extension never reaches the fallback. When the engine resolved nothing and the fallback finds an estate file, EngineCopies.unresolved refuses CopyUnresolved. Without an engine the extra extensions give CopyNotFound, a refusal, never a wrong splice.

New test tests/cobol_mainframe/test_copy_fallback_never_reached_8412.py (one real scan of an authored estate, invented names FAKEG.cobol, FAKEH.pco, FAKEI.cut, FAKEJ.inc):

  • the fallback lacks those extensions (pins the premise);
  • the engine resolves all four, and program_lines expands them with _search_member patched to raise;
  • an estate file only the fallback finds is refused CopyUnresolved;
  • no engine: the extra extensions are CopyNotFound.

Burned estates only; no blind-draw candidate was read, listed or counted.

Class / Sibling gaps

Class: members the engine resolves for a COPY that the translator's own search cannot find (extension and body-judgement differences). Members: .cobol, .pco, .cut (engine-resolved: handled, tested); .inc body-judged (handled, tested with a COBOL body). The reverse direction (translator extensions not scanned by the engine) is #8074's test_copy_extension_parity_8074.py. Sibling gaps: none for the engine path. A no-engine run (a bare directory list) still cannot find .cobol/.pco/.cut/.inc members; it refuses by name, so it is a limitation not a wrong result, and no burned estate uses that path.

Tests: the new file, test_copy_extension_parity_8074.py and tests/test_source_reads.py pass (14 passed). Not run: pr_gates (test-only change).

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 13, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 13, 2026 19:58
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Nov 13, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 13, 2026 20:00
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit c096b5b into main Nov 13, 2026
61 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8412-20261113T1951Z branch November 13, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant