Repository navigation
equivalence: declared COMP-5 reversal at diff_varseq and the CALL comparators (Part of #7646) - #7729
Merged
Merged
Conversation
…m comparator (Part of #7646) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
This was referenced Nov 4, 2026
Merged
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 #7646 (slice 4: the declared COMP-5 reversal at the sibling comparators, after #7725).
What
A case declaring
"declared_differences": ["comp5_byte_order"]now has the oracle's COMP-5 bytes (2+ bytes) read as z/OS holds them at two more comparators; the port holds the z/OS image (translate(zos_comp5=True)). Only the oracle side of COMP-5 fields is reversed; an undeclared case compares exactly as before (tests pin this).equivalence_common.py:diff_varseq(..., oracle_comp5_reversed=)passes the flag to each record'sdiff_records; newcomp5_zos_record(rec, fields)reads every field from the original bytes, so a REDEFINES over one COMP-5 field is reversed once (the slice-3 in-place loop would have reversed it twice;diff_recordsnow uses the helper, byte-identical for non-overlapping layouts).equivalence.py: the variable-record dataset call passes the flag.equivalence_call.py:compare_dtoreads the declaration;compare_item(..., oracle_comp5_reversed=): the area path (port's bytes) passes it todiff_records; the DTO path reverses the oracle item before decoding and before reading ODO counts (decode_fieldreads COMP-5 big-endian, so the oracle's little-endian bytes would otherwise decode wrong).test_equivalence_declared_differences.py: varseq equal/undeclared-differs/value-difference/no-layout; REDEFINES once; compare_item area and DTO paths, declared and undeclared.Class / Sibling gaps
Class: comparators that read a record's bytes against the oracle's, each of which must undo the declared COMP-5 byte order for a case that declares it.
equivalence.compare_run)diff_varseqequivalence_call.compare_item(area + DTO paths),compare_dtoequivalence_call.run_casenon-DTOrecord_fieldscompareequivalence_cics.compare_filesequivalence_ims.diff_db/diff_gsamequivalence.py::_compare_tablesA case declaring the difference at a not-yet-handled comparator shows false differences, never a false pass.
Remaining slices
equivalence_cics.compare_files(one file + test).equivalence_ims.diff_db/diff_gsam(one file + test)._compare_tables(equivalence.py+ test) and the CALLrun_casetext-item compare.Gates
pr_gates.py --fast: 9/9 PASS (ruff 0.17.2 pinned).pytest tests/tools -k equivalence: 508 passed, 2 skipped. Not run:--ratchets/golden (no engine code touched), a real equivalence proof (Docker/GnuCOBOL).Cross-repo
None.
🤖 Generated with Claude Code