Skip to content

equivalence: declared_differences case field and COMP-5 oracle byte reversal in the comparator (Part of #7646) - #7725

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/7646-20261104T1901Z
Nov 4, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/7646-20261104T1901Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #7646 (slice 3 of 3, after #7671 and #7673).

What

A case may now carry "declared_differences": ["comp5_byte_order"]. The comparator (diff_records) then reads each COMP-5 field of 2 or more bytes of the oracle record reversed, as z/OS holds it, and compares it with the port's bytes (the z/OS image, translate(zos_comp5=True) from #7673).

  • equivalence_common.py: DECLARED_DIFFERENCES, declared_differences(case) (unknown or repeated kind refused by name), declared_difference_records, comp5_zos_view, diff_records(..., oracle_comp5_reversed=).
  • equivalence.py: fixed-record datasets pass the flag; the run's report carries declared_differences.
  • evidence.py: record_proof stores them as differences of kind declared (replaced by every proof, like option).
  • Test: tests/tools/test_equivalence_declared_differences.py (2-, 4- and 8-byte fields, negative values, COMP unchanged, a real value difference still differs, a port holding the old little-endian image is not equal under the declaration, validation).
  • Register C7 updated.

Never loosened: only the oracle side of COMP-5 fields is reversed, nothing else; an undeclared case compares as before (no port, case or record moved).

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. Handled: the fixed-record dataset comparator (equivalence.compare_run -> diff_records). Sibling gaps (same mechanism, not here: separate call sites and their own tests; a case declaring the difference there shows false differences, never a false pass): variable-record diff_varseq; CALL items equivalence_call.compare_item / compare_dto; CICS files equivalence_cics.compare_files; IMS equivalence_ims.diff_db / diff_gsam; table comparison _compare_tables.

Remaining slices

  1. The reversal at the sibling comparators above (one file each plus tests).
  2. A real proof run on a burned program under the switch (case with the declaration, --record).
  3. HFP byte view for COMP-1 / COMP-2; census re-run.

Gates

pr_gates.py --fast: 9/9 PASS (lint, audits, secrets, xray, gen-docs, derived, workflows, gauntlet, affected ; ruff 0.17.2 pinned). Tree-wide guards and the new test pass (180 passed). ruff format --check flags evidence.py lines 1379 (an existing unformatted hunk, not touched here).
Not run: --ratchets / golden (no engine code touched), a real equivalence proof (needs Docker/GnuCOBOL; slice 2 of "Remaining").

Cross-repo

None.

🤖 Generated with Claude Code

… COMP-5 oracle bytes when declared (Part of #7646)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 4, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

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