Skip to content

COBOL record_data: keep the OCCURS DEPENDING ON object's qualifiers (#4282; pins #4281) - #4348

Merged
squid-protocol merged 1 commit into
mainfrom
fix/4282-odo-qualifier
Oct 4, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/4282-odo-qualifier

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #4282
Fixes #4281

What was broken

The fix

The DEPENDING ON object is read with up to 15 OF / IN qualifiers, line breaks included. It is upper-cased and whitespace is collapsed to one space (BETA OF ALPHA), matching the det translator's spelling. IN is kept as written. A following INDEXED BY does not match, because IN must be a whole word. The galaxy_ir consumers only test whether the value is set, so they are unaffected.

Evidence

New tests in tests/cobol_mainframe/test_odo_qualifier_4282.py:

Golden-master diff (both legs regenerated, identical)

Record Layout only. 8 items gain their qualifier, and nothing else moves:

  • carddemo CSUTLDTC.cbl: VSTRING-LENGTH → VSTRING-LENGTH OF WS-DATE-TO-TEST / … OF WS-DATE-FORMAT
  • CBSA CRECUST.cbl: VSTRING-LENGTH → … OF CHRDATE / … OF PICSTR
  • cobol-check COPYR001(.padded).CBL: B → B OF A
  • cobol-check EXR001(.padded).CBL: BETA → BETA OF ALPHA

The CSUTLDTC and CRECUST cases show why this matters: two different VSTRING-LENGTH items, previously indistinguishable.

pytest -m golden_crucible passes in both venvs.

Ground-truth ledger

ground_truth_ledger.py check is clean. tests/cobol_mainframe and tests/extraction pass with the pinned corpora (10,966).

Local checks

mypy_audit --ci, ruff_audit --ci (0.16.0) and dead_key_audit --ci report nothing new.

🤖 Generated with Claude Code

…4282)

_DEPENDING_CLAUSE read one name, so `DEPENDING ON BETA OF ALPHA` was
recorded as `BETA`, which can name a different item. The object is now
read with its OF / IN qualifiers (a line break included), upper-cased and
single-spaced -- the det translator's spelling. Also pins #4281 (REDEFINES
target on the next line), already fixed on main by #4300.

Golden masters regenerated in both legs: 8 Occurs Depending On values gain
their qualifier, nothing else moved.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 4, 2026 18:39
@squid-protocol
squid-protocol merged commit 1a3f8d4 into main Oct 4, 2026
32 checks passed
@squid-protocol
squid-protocol deleted the fix/4282-odo-qualifier branch October 4, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

COBOL engine: the OCCURS ... DEPENDING ON qualifier is dropped COBOL engine: REDEFINES target on the next line is not read

1 participant